Communicate with message-based devices in NI-VISA or the NI-VXI API
Message-based devices implement a second set of registers in addition to the VXIbus configuration registers. These registers, called VXIbus communication registers, are located within the 64-byte device configuration space. Word Serial Protocol, the defined communication protocol for message-based devices that is similar to the IEEE 488 protocol, is based on these VXIbus communication registers. All message-based devices, regardless of manufacturer, must follow the same procedure when using Word Serial Protocol for communication.
You can communicate with your VXI message-based devices using NI-VISA with the viRead() and viWrite() functions. Once you have opened a session to the message-based device that you want to communicate with, you can write message strings to it using viWrite() and read messages back from the device with viRead(). There is an example of how to do message-based communication in the VISA examples directory called RdWrt.c.
You can also use the NI-VXI API Word Serial functions. (National Instruments recommends using NI-VISA, rather than the NI-VXI API, to develop your application.) Wswrt() is the function you use to send a message string to a device with a particular logical address. Wsrd() is the function you use to receive a message from a device. An example of how to do message-based communication with the NI-VXI API is in the examples folder in the NI-VXI directory. Open the file called VXIws.c in Notepad.