General Program Steps And Examples - National Instruments NI-488.2M Software Reference Manual

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

Advertisement

Chapter 3

General Program Steps and Examples

The following steps demonstrate how to use the NI-488 device functions in your
program. This example configures a digital multimeter, reads 10 voltage
measurements, and computes the average of these measurements.
Step 1. Open a Device
Your first NI-488 function call should be to ibfind or ibdev to open a
device.
ud = ibdev(0, 1, 0 , 12, 1, 0);
if (ibsta & ERR) {
gpiberr("ibdev error");
}
The input arguments of the ibdev function are as follows:
0
Board index for gpib0
1
Primary GPIB address of the device
0
No secondary GPIB address for the device
12 –
I/O timeout value (3 s)
1
Send END message with the last byte when writing to the device
0
Disable EOS detection mode
When you call ibdev, the driver automatically initializes the GPIB by sending
an Interface Clear (IFC) message and placing the device in the remote
programming state.
© National Instruments Corp.
Developing Your Application
3-9
NI-488.2M SRM for OS/2

Advertisement

Table of Contents
loading

Table of Contents