Example of Interface Independence
- Updated2025-01-24
- 1 minute(s) read
Example of Interface Independence
Now that you are more familiar with the architecture of the VISA driver, we will cover an example of how VISA provides interface independence.
Many devices available today have both a Serial port and a GPIB port. If you do not use VISA, you must learn and use two APIs to communicate with this device, depending on how you have it connected. With VISA, however, you can use a single API to communicate with this device regardless of the connection. Only the initialization code differs—for example, the resource string is different, and you may have to set the serial communication port parameters if they are different from the specified defaults. But all communication after the initialization should be identical for either bus type. Many VISA-based instrument drivers exist for these types of devices.
The existence of multi-interface devices is a trend that will continue and likely increase with the proliferation of new computer buses. This trend is also true of non-GPIB devices. Several VXI device manufacturers, for example, have repackaged their boards as PXI devices, with a similarly minimal impact on their VISA-based instrument drivers.
This example shows how VISA removes the bus details from instrument communication. The VISA library takes care of those details and allows you to program your instrument based on its capabilities.