Example 1: Basic Communication - 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 1: Basic Communication

This example focuses on the basics of establishing communication between a
host computer and a GPIB device.
A technician needs to monitor voltage readings using a GPIB multimeter. His
computer is equipped with an IEEE 488.2 interface board. The NI-488.2M
software is installed and a GPIB cable runs from the computer to the GPIB port
on the multimeter.
The technician is familiar with the multimeter remote programming command
set. This list of commands is specific to his multimeter and is available from the
multimeter manufacturer.
He sets up the computer to direct the multimeter to take measurements and record
each measurement as it occurs. To do this, he has written an application that uses
some simple high-level GPIB commands. The following steps correspond to the
program flowchart in Figure 2-1.
1.
The application initializes the GPIB by bringing the interface board in the
computer online.
2.
The application sends the multimeter an instruction, setting it up to take
voltage measurements in autorange mode.
3.
The application sends the multimeter an instruction to take a voltage
measurement.
4.
The application tells the multimeter to transmit the data it has acquired to the
computer.
The process of requesting a measurement and reading from the multimeter
(Steps 3 and 4) is repeated as long as there are readings to be obtained.
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-2
© National Instruments Corp.
Chapter 2

Advertisement

Table of Contents
loading

Table of Contents