Chapter 2
Application Examples
© National Instruments Corp.
2-21
NI-488.2M SRM for OS/2
Example 9: Non-Controller Example
This example illustrates how you can use the NI-488.2M software to emulate a
GPIB device that is not the GPIB Controller.
A software engineer has written firmware to emulate a GPIB device for a
research project and is testing it by using an application that makes simple GPIB
calls. The following steps correspond to the program flowchart in Figure 2-9.
1.
The application brings the device online.
2.
The application waits for any of three events to occur: the device becomes
listen addressed, becomes talk addressed, or receives a GPIB clear message.
3.
As soon as one of the events occurs, the application takes an action based
upon the event that occurred. If the device was cleared, the application
resets the internal state of the device to default values. If the device is talk
addressed, it writes data back to the Controller. If the device is listen
addressed, it reads in new data from the Controller.