Chapter 3 151
Easy Ways to Control Instruments
Using Direct I/O
Figure 3-19. Direct I/O Setup Using an Input Variable
6. (Optional) Connect an HP3325B to your computer, if you have one, and
edit the configuration of this Direct I/O object to include the address of
the instrument. Run the program and you will see the instrument
generating these frequencies.
Reading Data From an Instrument
Instruments send data to a computer in many different formats. To read data
from an instrument, you must know the datatype you want to read, and
whether the data is returned as a single value (scalar) or an array. You must
also know if the instrument returns data as text (ASCII) or binary.
You can find this information in the instrument documentation, or you can
use the VEE
Bus I/O Monitor in the I/O menu to examine the data
being returned. This information determines how to configure the I/O
transaction.
In this example, an HP3478A Multimeter is connected to the HP3325B
Function Generator described in the last exercise. When the generator sends
out a certain frequency, the multimeter triggers a reading and sends the
results back to VEE. The following steps describe how to configure the
transactions for the multimeter.
Note This example describes a READ TEXT transaction. Other choices for READ
include
BINARY, BINBLOCK, and CONTAINER, which are discussed in detail
in the VEE Pro Advanced Techniques manual.