Comparison Between NI-VISA and NI-VXI APIs

As a VXI programmer you may be familiar with the NI-VXI API, but NI recommends that all new VXI applications be developed in NI-VISA, which provides additional flexibility, features, and performance. Fortunately, translating NI-VXI API code to VISA is made fairly simple by the close correlation between the two APIs. For users who are familiar with the NI-VXI API, the following table shows several common, but not all, NI-VXI API function calls and the corresponding VISA operations. You can see that 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.

Table 4. NI-VISA and NI-VXI Functions and Operations
C NI-VXI Function C VISA INSTR Operation LabVIEW NI-VXI Function LabVIEW VISA INSTR Operation
InitVXIlibrary viOpenDefaultRM, viOpen InitVXIlibrary VISA Open
CloseVXIlibrary viClose CloseVXIlibrary VISA Close
WSwrt viWrite WSwrt VISA Write
WSrd viRead WSrd VISA Read
WSclr viClear WSclr VISA Clear
WStrg, SrcTrig viAssertTrigger  WStrg, SrcTrig VISA Assert Trigger
VXIin, VXIout viInX, OutX  VXIin, VXIout  VISA InX, VISAOutX
VXImove viMoveInX, viMoveOutX VXImove  VISA Move InX, VISA Move OutX
MapVXIAddress viMapAddress MapVXIAddress VISA Map Address
AssertVXIint viAssertIntrSignal AssertVXIint VISA Assert Interrupt
EnableVXItoSignalInt viEnableEvent EnableVXItoSignalInt VISA Enable Event
WaitForSignal viWaitOnEvent WaitForSignal VISA Wait on Event
GetDevInfo viGetAttribute GetDevInfoLong VISA Property Node

An important difference between the NI-VXI API and VISA is the scope of the effect of certain function calls. In the NI-VXI API, many functions (notably, enabling for events) acted on the VXI controller directly and therefore applied to the entire VXI system. Since VISA is generally device-oriented rather than controller-oriented, the corresponding VISA INSTR operations act on a specific VXI device, not the entire system.