Application Examples Chapter 2
NI-488.2 User Manual for Windows 2-14 © National Instruments Corp.
Example 6: Basic Communication withIEEE 488.2-Compliant DevicesThis example is 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
determine 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 the setting of each GPIB address
switch. 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 all of the devices
detected on the GPIB in Step 2.
4. The application reads the identification information returned by each of the devices
as it responds to the query in Step 3.
5. As a cleanup step before exiting, the application returns the interface board back to
its original state by taking it offline.