Example 6: Basic Communication With Ieee; Compliant Devices - National Instruments NI-488.2M Software Reference Manual

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

Advertisement

Application Examples
Example 6: Basic Communication with
IEEE 488.2 Compliant Devices
This example provides an introduction to communicating with IEEE 488.2

compliant devices.

A test engineer in a metal factory is using IEEE 488.2 compliant tensile testers to
find out the strength of metal rods as they come out of production. There are
several tensile testers and they are all connected to a central computer equipped
with an IEEE 488.2 interface board. These machines are fairly voluminous and it
is difficult for the engineer to reach the address switches of each machine. For
the purposes of his future work with these tensile testers, he needs to determine
what GPIB addresses they have been set to. He can do so with the aid of a simple
application he has written. The following steps correspond to the program
flowchart in Figure 2-6.
1.
The application initializes the GPIB by bringing the interface board in the
computer online.
2.
The application issues a command to detect the presence of listening devices
on the GPIB and compiles a list of the addresses of all such devices.
3.
The application sends an identification query ("*IDN?") to a device
detected on the GPIB in Step 2.
4.
The application reads the identification information returned by the device as
it responds to the query in Step 3.
Steps 3 and 4 are repeated for each of the devices detected in Step 2.
5.
As a cleanup step before exiting, the application returns the interface board
back to its original state by taking it offline.
NI-488.2M SRM for OS/2
2-14
© National Instruments Corp.
Chapter 2

Advertisement

Table of Contents
loading

Table of Contents