Summary: For this exercise, the objective is to build a VI that communicates with an RS-232 device. Complete the following steps to use the Instrument I/O Assistant to build a VI that communicates with the NI Instrument Simulator.
Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.
![]() |
![]() |
Place the Instrument I/O Express
VI, located on the Functions>>Input
palette, on the block diagram. Complete the following
steps in the Instrument I/O Assistant
dialog box that appears to configure the Express VI.
COM1 (or COM2
depending on the connection port of the NI
Instrument Simulator) from the Select an
instrument pull-down menu.
Add Step button and click
Write. In the command field, type
*IDN? and select \n as the
Termination character.
Add Step button and click
Read and Parse.
Add Step button and click
Read and Parse again.
*IDN? is
sent to the instrument, the response must be read
twice.
Run button (not the Run
this step button). The Run
button runs the entire sequence.
Read and Parse step.
Auto parse button. The value
returned is the size in bytes of the query response.
Token to String
Length in the Token name text
box.
Read and Parse step.
Auto parse button. The value
returned is the identification string of the NI
Instrument Simulator.
Token to String in the Token name text
box. The configuration window should be similar to
the Figure 3.
![]() |
OK to return to the block
diagram.
String output and select
Create>>Indicator from the shortcut menu.
String Length output and
select Create>>Indicator from the shortcut
menu.
Simple Error
Handler VI to error out.
Serial Communication.vi in the
C:\Exercises\LabVIEW Basics I directory.
"A full introductory course on programming with LabVIEW."