An Introduction to IEEE-488 Measurements |
An Introduction to IEEE-488
Measurements
Introduction
IEEE488 is a standard - written by IEEE -
for communication between computers and instruments. The standard covers both
hardware and software aspects of computer-instrumentation communication. Here
we will examine the basic things you need to do to make a typical IEEE488
instrument communicate with a computer.
Although you can write programs in many
environments including C (Console and Visual applications), Visual Basic and
LabView, the basic concepts of what transpires are all the same. We will
examine a simple task - a single measurement - and examine how to do that in
general, and then examine several specific environments.
Hardware
Issues
There are some things that you need to
take care of before you can address any software issues. Here are the things
you need to check.
IEEE488 requires a special
cable that connects the instrument to the computer. Actually, it connects
to a special card in the computer, and if that card is not present you will
not be able to use IEEE488 instruments with that computer. All of the
computers in the EE department have that card, but your own PC probably does
not have it. The card we use is manufactured by National Instruments (NI).
Check to be sure that the "fat" cable is connected between the computer and
the instrument you want to use.
The instrument and the
computer must both be turned on. That's not as funny as it seems. IEEE488
connections cannot turn on an instrument via software, so, despite any
assumptions you may have made, you have to turn it on.
Finally, when the IEEE488
card was installed in the computer, software should also have been installed
so that you can interface between your programming environment (C/C++,
Visual Basic, LabView, etc.) and the IEEE488 card. We will discuss what is
necessary in each of these environments when appropriate.
Once you have all of
the above taken care of, you are ready to use software to control an instrument.
The Sequence Of
Operations
If you want to use an
IEEE488 instrument to take measurements, the following sequence of operations is
typical.
First, you will need to know
the address of the instrument. The IEEE488 system uses a bus to which
various instruments may all be connected. Each instrument must have a
unique address on that bus.
Our example instrument
will be the Fluke/Hydra Data Acquisition Unit (DAU), and in our labs we
have set those instruments to have an address of 3.
Note also that some
software environments use an "alias" or "nickname" for the address. The
default for address 3 is "DEV3", but we have tried to set the alias to
"DAU" or "DAU1".
Secondly, you may need to get
a handle for the device using the alias. That happens in C, but not in
LabView, for example.
Next, you use the address or
handle to reset the instrument.
When you reset the
instrument you clear out old measurements and any "start-up noise" that
may exist in the memory of the instrument. You also restore the
instrument to a defined initial state.
In the Fluke/Hydra
you can use a command string *RST.
After resetting the instrment
you need to send command strings to the instruments. These command strings
are acted upon by the instrument to set scales and take the measurement.
After setting up the
instrument, taking a measurement and preparing the data, you must get the
instrument to set the string to the computer. Different programming
environments do that in different ways.
|