National Instruments NI-488.2M Software Reference Manual page 63

For os/2
Hide thumbs Also See for NI-488.2M:
Table of Contents

Advertisement

Chapter 3
Step 4. Initialize the Instrument
After you find the multimeter, use the DevClear routine to clear it. The first
argument is the GPIB board number. The second argument is the GPIB address
of the multimeter. Next, send the IEEE 488.2 Reset command to the meter.
DevClear(0, fluke);
if (ibsta & ERR) {
gpiberr("DevClear error")
}
Send(0, fluke, "*RST", 4L, NLend);
if
(ibsta & ERR) {
gpiberr("Send *RST error");
}
Step 5. Configure the Instrument
After initialization, the instrument is ready to receive instructions. To configure
the multimeter, use the Send routine to send device-specific commands. The
first argument is the number of the access board. The second argument is the
GPIB address of the multimeter. The third argument is a string of bytes to send
to the multimeter.
The bytes in this example instruct the meter to measure volts alternating current
(VAC) using autoranging (AUTO), to wait for a trigger from the Controller
before starting a measurement (TRIGGER 2), and to assert SRQ when the
measurement has been completed and the meter is ready to send the result
(*SRE 16). The fourth argument represents the number of bytes to be sent.
The last argument, NLend, is a constant defined in the header file that tells
Send to append a linefeed character with EOI asserted to the end of the
message sent to the multimeter.
Send (0, fluke, "VAC; AUTO; TRIGGER 2; *SRE 16", 29L, NLend);
if (ibsta & ERR) {
gpiberr("Send setup error");
}
© National Instruments Corp.
Developing Your Application
3-17
NI-488.2M SRM for OS/2

Advertisement

Table of Contents
loading

Table of Contents