LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Basics

Hello all,

 

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?



Thanks,

Ananda H S

0 Kudos
Message 1 of 4
(2,313 Views)

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.

Message 2 of 4
(2,276 Views)

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.

 

Thanks,

Ananda H S

0 Kudos
Message 3 of 4
(2,254 Views)

Ananda,

 

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.

LabVIEW ChampionLabVIEW Channel Wires

Message 4 of 4
(2,242 Views)