LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB::13 13

What does the following mean GPIB::5 11 in the visa resources?
0 Kudos
Message 1 of 8
(2,772 Views)
The last number tells which instance. You can open a VISA Reference to a GPIB device at address 5 and then open it again without closing the first one. You will get GPIB::5 2 the second time.

Wire your VISA reference through each call to make sure you are using the same reference. Close all references when you are finished with them.

Daniel L. Press
PrimeTest Corp.
www.primetest.com
0 Kudos
Message 2 of 8
(2,772 Views)
I use the same wire from the initialize vi through to the close vi. Is this what you mean when you say "Wire your VISA reference through each call to make sure you are using the same reference." I close my references with the close.vi
0 Kudos
Message 3 of 8
(2,772 Views)
If you have one close for each open or initialize, you wouldn't have multiple instances.
0 Kudos
Message 4 of 8
(2,772 Views)
Yes, that's what I mean. There must be someting else in there opening extra references. It's hard to say without seeing the code.

- Dan
0 Kudos
Message 5 of 8
(2,772 Views)
One thing to try is to use NI Spy. You will see when your LV code is causing viOpen to get called.

Another thing to look for is in the initialization in your LabVIEW VI. Check for VISA Open and make sure of 2 things:
1) It is "VISA Open" and not "Old VISA Open". If so, replace it.
2) The input parameter "Duplicate Session" is set to F not T. If it is T, then this will cause new sessions to be created. If it is F, then LabVIEW will reuse your existing sessions.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 6 of 8
(2,772 Views)
Thanks.
Is it necessary to use Open and Close visas?
0 Kudos
Message 7 of 8
(2,772 Views)
Required? No. Recommended? Yes.

It makes the code easier to understand in terms of what you intend. In other words, "I am just now starting to use this resource here", and "I am completely finished with this resource here".

For some resources, like Serial, it is more important to close the resource when you are done with it in LabVIEW, in case you want to use the resource in a different module or application. For example, you might want to do debugging in VISAIC or HyperTerminal. This is because only 1 application can use a given Serial resource at a time. But for other types of resources, the 1-app-only use scenario is not a restriction.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instru
ments
0 Kudos
Message 8 of 8
(2,772 Views)