Application Examples Chapter 2
NI-488.2 User Manual for Windows 2-20 © National Instruments Corp.
Example 9: Non-Controller Example
This example illustrates how you can use the NI-488.2 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 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 to become listen-
addressed, become talk-addressed, or receive 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 was talk-addressed, it writes data back
to the Controller. If the device was listen-addressed, it reads in new data from the
Controller.