Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA addressing over PCMCIA/GPIB interface

Platform: Win 2k Professional
LabVIEW version: 6.1

At the outset, the following VISA address strings work
just fine:

GPIB0::5::INSTR for an HP 6632A dc Power Supply; and
GPIB0::14::INSTR for an HP 33120A Arbitrary Waveform Generator.

After running the first instrument, a whole host of addresses
is generated in the control list. The addresses are similar to
the one set above save for appended numbers -
"GPIB0::5::INSTR 1" etc. After the huge addresses list has been
generated, the set address, GPIB0::5::INSTR, no longer works. a
number of the new addresses, GPIB0::5::INSTR 1, for instance,
work.

GPIB0::14::INSTR is also rendered inoperable and attempts to
write to the HP 33120A trigger the attached
error message.

What am I doing wrongly?


Thanks in advance,

Andrew
0 Kudos
Message 1 of 3
(3,367 Views)
Andrew:

The extra number at the end of the resource name means that you have more than 1 session open to the same resource. This is usually a sign that you are doing something unintended. In this case I'm sure that's the source of your problem.

If you are (or an instrument driver VI is) calling VISA Open directly in LabVIEW, then make sure that the "duplicate session" parameter to VISA Open is set to F (False). If your VI is using Old VISA Open, then replace it with the newer one. The old one opened a new session each time it was encountered; the newer one reuses the same LabVIEW session to that resource if one is already open.

Also, you need call hp33120a Initialize With Options only once. Calling it multiple times may be the source of your
problem, because it may be calling a DLL that calls viOpen each time.

The effect in either of the above cases is similar. The instrument driver is using per-session data to represent state of the instrument, and multiple sessions are wreaking havoc. The correct model is to use only 1 session.

Good luck, and hope this helps.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
Message 2 of 3
(3,367 Views)
Just remember for each instrument you open you must close that session to release memory. LabVIEW has a VISA open and a VISA close VI.
0 Kudos
Message 3 of 3
(3,367 Views)