Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB adress format change

I have got the problem with identifing GPIB adress by the VI in our programme. We have GPIB in the whole program identified just by its number (for example 8), but just this one VI needs it in the format : GPIB::8: . It is supposed to be called VISA adressing. Does anybody know how to solve this problem that means how to change the data format just for this one sub VI ?
0 Kudos
Message 1 of 4
(3,374 Views)
VISA has been the standard for instrument development for quite a few number of years. VISA is an API that sits above GPIB. It is a common interface that allows for a single driver to work with not just GPIB instruments, but also serial, VXI, PXI, USB, and Ethernet. While GPIB will be around for a while, these other interfaces are becoming more and more popular and many instruments are available with one or more of them. VISA also alows for portability since yo can use a GPIB board from another vendor as long as that board has a VISA driver.
 
If you are using integers for the addressing in your current app and don't want to convert all to VISA, then you have a couple of options. You could replace all of the VISA Read/Write functions in the driver with the traditional GPIB Reads/Writes. I've often done it the other way, but this way would work just as well. Another option I can think of is to use a VISA alias. VISA allows you to assign an alias to an instrument. Instead of referring to GPIB0::5:INSTR, you can assign it the alias of "DMM" for example and not have to try and remember the actual address number. You can assign it the alias "8" and just before passing the number to the driver, convert it to a string. The VISA Resource Name input will accept strings as inputs.
Message 2 of 4
(3,355 Views)

Krakow,

Depending on whether the GPIB address is a numeric or string, the address conversion to a VISA resource varies slightly.  Have a look at this LabVIEW VI for how to convert each type.  Hope this helps clear things up, have a good day!

Sincerely,

RossC

0 Kudos
Message 3 of 4
(3,345 Views)
Oops, forgot to attach the VI.  Here you go!  Looks like Dennis beat me to the reply as well, I hope I was still able to help.
0 Kudos
Message 4 of 4
(3,344 Views)