音频信号发生器毕业设计外文翻译(编辑修改稿)内容摘要:

to search the help for a word or phrase. Customizing the Block Diagram Code There are many controls, indicators, Express VIs, and structures that you can use to customize a VI. To customize a VI, you can create controls and indicators, control when a VI stops running, and display generated data in a table. Creating Controls and Indicators Create controls and indicators that are wired to Express VIs from the block diagram by rightclicking the Express VI input, output, or wire, and selecting an option from the Create shortcut menu. Controlling When a VI Stops Running Use the While Loop to continually run the code enclosed within the loop. The While Loop stops running when a stop condition is met. When you place or move an object in a While Loop near the border, the loop automatically resizes to add space for that object. The Execution Control palette includes objects that let you control the number of times a VI runs, as well as the speed at which the VI runs. Displaying Data in a Table The table indicator displays collected data. Use the Build Table Express VI to build a table of collected data. 9 Acquiring Data and Communication with Instruments This chapter introduces you to the Express VIs you use for data acquisition and instrument munication on a PC running Windows. Refer to the LabVIEW Measurements Manual for information about data acquisition and instrument munication on all platforms. Acquiring a Signal In the following exercises, you will use the DAQ Assistant Express VI to create an NIDAQmx task. Refer to the Taking an NIDAQmx Measurement in LabVIEW help tutorial for information about additional methods you can use to create NIDAQmx tasks. To launch this help tutorial, select Help187。 Taking an NIDAQmx Measurement in LabVIEW. Note The following exercises require that you have installed NIDAQmx and an NIDAQmxsupported device. Refer to the National Instruments Web site at DAQmx installed or an NIDAQmxsupported device, refer to the LabVIEW Measurements Manual for information about using Traditional NIDAQ for data acquisition. Complete the following exercises to create an NIDAQmx task that continuously takes a voltage reading and plots the data on a waveform graph. You can plete the exercises in approximately 30 minutes. Creating an NIDAQmx Task In NIDAQmx, a task is a collection of one or more channels, timing, triggering, and other properties that apply to the task itself. Conceptually, a task represents ameasurement or generation you want to perform. For example, you can create a task to measure temperature from one or more channels on a DAQ device. Complete the following steps to create and configure a task that reads a voltage level from a DAQ device. 1. Open a new VI. 2. Select the DAQ Assistant Express VI, shown at left, on the Input palette and place it on 10 the block diagram. The DAQ Assistant launches and a Create New dialog box appears. 3. Click the Analog Input button to display the Analog Input options. 4. Select Voltage to create a new voltage analog input dialog box displays a list of channels on each DAQ device installed. The number of channels listed depends on the number of channels you have on the DAQ device. 5. In the My Physical Channels listbox, select the physical channel to which the signal is connected, such as ai0, and then click the Finish button. The DAQ Assistant opens a new window, shown in Figure 41, which displays options for configuring the channel you selected to plete a task. Figure 41. Configuring a Task Using the DAQ Assistant 6. In the Input Range section of the Settings tab, enter 10 for the Max value and enter 10 for the Min value. 7. In the Task Timing tab, select the Acquire N Samples option. 8. Enter a value of 1000 in the Samples To Read input box. 11 Testing the Task You can test the task to verify that you correctly configured the channel. Complete the following steps to confirm that you are acquiring data. 1. Click the Test button, shown at left. An Analog Input Test Panel dialog box appears. 2. Click the Start button once or twice to confirm that you are acquiring data, and then click the OK button to return to the DAQ Assistant. 3. Click the OK button to return to the block diagram. 4. Save this VI as Read to an easily accessible location. Graphing Data from a DAQ Device Using the task you created in the previous exercise, you can graph the data acquired from a DAQ device. Complete the following steps to plot the data from the channel in a waveform graph and change the name of the signal. 1. On the block diagram, rightclick the data output and select Create187。 Graph Indicator. 2. Display the front panel. 3. Run the VI three or four times and observe the waveform graph. Notice that Voltage appears in the waveform graph plot legend. 4. Display the block diagram. 5. Rightclick the DAQ Assistant Express VI and select Properties to rename thechannel. 6. Rightclick Voltage in the Channel List listbox and select Rename to display the Rename a channel or channels dialog box. Tip You also can select the name of the channel and press the F2 key to access the Rename a channel or channels dialog box. 7. In the New Name text box, enter First Voltage Reading, and click the OK button. 8. Click the OK button to apply this configuration and return to the block diagram. 9. Display the front panel and run the VI. Notice that First Voltage Reading appears in the waveform graph plot legend. 10. Save this VI. 44 12 Editing an NIDAQmx Task You can add a channel to the task so that you can pare two separate voltage readings. You also can customize the task to acquire the voltage readings continuo。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。