【正文】
sure you turn on the instrument you want to use. The instrument must be powered on to use the Instrument I/O Assistant Express VI.2. Select the Instrument I/O Assistant Express VI on the Input palette and place it on the block diagram.3. Click the Show Help button, shown at left, in the upper right corner of the Instrument I/O Assistant dialog box.Notice how the Show Help button displays the help to the right of the dialog box. The help window on top contains procedural information about using the Instrument I/O Assistant. The help window below provides contextsensitive help about various controls and indicators in the dialog box.4. Follow the procedures in the help window on top to select the instrument with which you want to municate.5. If necessary, configure the properties of the instrument.6. Click the Hide Help button, shown at left, in the upper right corner of the Instrument I/O Assistant dialog box to minimize the help window.Acquiring and Parsing Information for an InstrumentAfter selecting the instrument, you can send mands to the instrument to retrieve data. In this exercise, you will learn to use the Instrument I/O Assistant Express VI to acquire and parse identification information for an instrument. Complete the following steps to municate with your instrument.1. Click the Add Step button, and select Query and Parse.2. Enter *IDN? in the Enter a mand text box.*IDN? is a query that most instruments recognize. The response is an identification number string that describes the instrument. If the instrument does not accept this mand, refer to the reference manual for the instrument for a list of mands the instrument does understand.3. Click the Run Sequence button.The Instrument I/O Assistant sends the mand to the instrument, and the instrument returns its identification information.4. Parse the instrument name as an ASCII string. You also can use Instrument I/O Assistant to parse ASCII numbers and binary data.5. Click the Parsing help button, shown at left, in the Instrument I/O Assistant dialog box for more information about parsing data.6. Assign a name to the token in the Token name text box.A token is a parsed data selection.7. Click the OK button to return to the block diagram.Notice that the name that you entered in the Token name text box is the output of the Instrument I/O Assistant Express VI, shown at left.SummaryThe following topics are a summary of the main concepts you learned in this chapter.DAQ Assistant Express VIYou can use the DAQ Assistant Express VI to graphically configure channels or mon measurement tasks. Using the DAQ Assistant Express VI, you can interactively build a measurement channel or task.Place the DAQ Assistant Express VI on the block diagram to configure channels and tasks for use with NIDAQmx for data is a programming interface for municating with data acquisition devices. You can use the DAQ Assistant Express VI to control devices supported in NIDAQmx.Refer to the Taking an NIDAQmx Measurement in LabVIEW help tutorial for information about the DAQ Assistant. To launch this help tutorial, select Help187。Graph Indicator.Notice that you can create controls and indicators from the block diagram. When you reate controls and indicators using this method, LabVIEW automatically creates terminals that are labeled and formatted correctly.5. Using the Wiring tool, wire the Mean output in the Sample Compression Express VI to the Sine terminal. Notice that the Merge Signals function appears.6. Arrange the objects on the block diagram so that they appear similar to Figure 32.Tip You can rightclick any wire and select Clean Up Wire from the shortcut menu to have LabVIEW automatically arrange the wires for you.Figure 32. Block Diagram for the Reduce Samples VI7. Display the front panel.Notice that the controls and indicators you added automatically appear on the front panel with labels that correspond to their function.8. Save this VI.Configuring the VI to Run Continuously Until the User Stops ItIn the current state, the VI runs once, generates one signal, then stops executing. To run the VI until a condition is met, you can add a While Loop to the block diagram. Complete the following steps to add a While Loop.1. Display the front panel and run the VI.Notice how the VI runs once and then stops. Also notice how there is no STOP button.2. Display the block diagram and select the While Loop on the Execution Control palette.3. Move the cursor to the upper left corner of the block diagram. Place the top left corner of the While Loop here.4. Click and drag the cursor diagonally to enclose all the Express VIs and wires, as shown in Figure33.Figure 33. Placing the While Loop around the Express VIsNotice that the While Loop, shown at left, appears with a STOP button wired to the condition terminal. This While Loop is configured to stop when the user clicks the STOP button.5. Display the front panel and run the VI.Notice that the VI now runs until you click the STOP button. A While Loop executes the functions inside the loop until the user presses the STOP button.Controlling the Speed of ExecutionTo plot the points on the waveform graph more slowly, you can add a time delay to the block diagram. Complete the following steps to control the speed at which the VI executes.1. On the block diagram, select the Time Delay Express VI on the Execution Control palette and place it inside the loop.2. Type .250 in the Time delay (seconds) text time delay specifies how fast the loop runs. With a .250 second time delay, the loop iterates once every quarter of a second.3. Close the Configure Time Delay dialog box.4. Save this VI.5. Display the front panel and run the VI.6. Click the Enable switch and notice the change on the graph.Notice how if the Enable switch is on,