Application Examples
Chapter 2
NI-488.2M UM for Windows NT
2-18
© National Instruments Corp.
Example 8: Parallel Polls
This example illustrates how you can use NI-488.2 routines to obtain information from
several IEEE 488.2-compliant devices at once using a procedure called parallel polling.
The process of manufacturing a particular alloy involves bringing three different metals
to specific temperatures before mixing them to form the alloy. Three vats are used, each
containing a different metal. Each is monitored by a GPIB ore monitoring unit. The
monitoring unit consists of a GPIB temperature transducer and a GPIB power supply.
The temperature transducer is used to probe the temperature of each metal. The power
supply is used to start a motor to pour the metal into the mold when it reaches a
predefined temperature. The three monitoring units are connected to the IEEE 488.2
interface board of a computer that has the NI-488.2M software installed. An application
using NI-488.2 routines operates the three monitoring units. The application will obtain
information from the multiple units by conducting a parallel poll, and will then determine
when to pour the metals into the mixture tank. The following steps correspond to the
program flowchart in Figure 2-8.
1.
The application initializes the GPIB by bringing the interface board in the computer
online.
2.
The application configures the temperature transducer in the first monitoring unit by
choosing which of the eight GPIB data lines the transducer uses to respond when a
parallel poll is conducted. The application also sets the temperature threshold. The
transducer manufacturer has defined the individual status (
ist
) bit to be true when
the temperature threshold is reached, and the configured status mode of the
transducer is assert the data line. When a parallel poll is conducted, the transducer
asserts its data line if the temperature has exceeded the threshold.
3.
The application configures the temperature transducer in the second monitoring unit
for parallel polls.
4.
The application configures the temperature transducer in the third monitoring unit for
parallel polls.
5.
The application conducts non-GPIB activity while the metals are heated.
6.
The application conducts a parallel poll of all three temperature transducers to
determine whether the metals have reached the appropriate temperature. Each
transducer asserts its data line during the configuration step if its temperature
threshold has been reached.
7.
If the response to the poll indicates that all three metals are at the appropriate
temperature, the application sends a command to each of the three power supplies,
directing them to power on. Then the motors start and the metals pour into the mold.
If only one or two of the metals is at the appropriate temperature, Steps 5 and 6 are
repeated until the metals can be successfully mixed.