Can anybody please give me some details about what exactly happens inside VISA open, read, write vis?
How exactly it communicates with the instrument?
How it identifies the interface used to connect the instrument?
How it generalizes the communication with different interfaces USB, GPIB, Ethernet, Serial?
Ananda H S
VISA provides a layer of software abstraction that helps isolate the specific interface type from your application code. If you use VISA then usually (serial is the easiest exception to use as an example) you don't need to worry about the interface type in your application.
The VISA descriptor specifies the interface type. So specifying GPIB0::5::INSTR tells VISA that you want to connect to a device using the GPIB and the device is at address 5 on the GPIB.
As I mentioned, serial is a bit of an exception becuase there are interface parameters that aren't included in the descriptor used to connect. Serial involves baud rate, stop bits, parity, etc. as parameters of the connection so you might need to use a VISA property node to set the serial port settings if the connection is via serial port.
But once you've opened the connection, then it's the same read and write functions to perform transactions with the device regardless of whether the interface is serial, USB, GPIB, or ethernet.
Thanks for the response.
Please give me some more details.
If it is GPIB, then from the VISA address it will detect the protocol is GPIB and for serial communication from the address where will mention COM ports, but how will it detect in case of USB, Ethernet.
Ananda H S
The VISA address has the protocol specified in it. "GPIB0::12::INSTR" is a GPIB bus 0, instrument address 12. ASLR::1::INSTR is serial port 1, etc. USB is a bit differnet and RAW USB is a tough thing to program. Most USB emulates a serial port.
But VISA does not detect the protocol but is specified by sending the correct VISA address string.