For GPIB users who are familiar with NI-488.2, the following table shows several common, but not all, NI-488.2 device-level function calls and the corresponding VISA operations. As you can see, the APIs are almost identical. The difference is that VISA is extensible to additional hardware interfaces. Therefore, if you are programming multiple devices that communicate over more than one bus type, it might be easier to use VISA for your entire system.
|C NI-488.2 Device Function||C VISA INSTR Operation||LabVIEW NI-488.2 Device Function||LabVIEW VISA INSTR Operation|
VISA Assert Trigger
GPIB Serial Poll
VISA Read STB
Wait for GPIB RQS
|Wait for RQS|
VISA Property Node
One difference in the event mechanism between NI-488.2 and VISA is worth noting. In VISA, you must always call viEnableEvent() prior to being allowed to receive events. While this was not the case with NI-488.2, this is required in VISA to avoid the race condition of trying to wait on events for which the hardware may not be enabled. Thus, you should enable the session for events not just immediately before calling viWaitOnEvent(), but before the device has even been triggered or configured to generate a service request event.