NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

labview instrument handle data type in teststand

I have an instrument handle in labview (says 'visa session of class Instr') that I need to store in TestStand.  Once I open do a VISA open on a Vector Network Analyzer, I get a "Visa Resource Name Out".  I would like to store that in a TestStand File Global.  What TestStand type equates to this labview type?

0 Kudos
Message 1 of 6
(5,933 Views)

I have always used the

 

LabVIEWIOControl (Container) for anything relating to VISA.  Serial Ports, GPIB instrumentation, etc...

 

Select Type -> LabVIEW -> LabVIEWIOControl when creating your FileGlobals.

 

Thanks,

 

PH

Message 2 of 6
(5,931 Views)

I'm wondering, then, what to do with the DeviceName and SessionNumber on the LabVIEW side.  How do I convert back and forth between a LabVIEW Instrument Handle and the TestStand LabVIEW IO Control (made up of the String and Number)?

0 Kudos
Message 3 of 6
(5,926 Views)

Hi,

 

Just pass back the open session back into the LabVIEW IO Control, you dont have to do anything.

 

The other way to using the LabVIEWIOControl is to use the old fashion way and that is to pass back the session handle as a U32, there are some TestStand VI's i the TestStand palette that you can use to do the conversation.

 

 

Regards
Ray Farmer
0 Kudos
Message 4 of 6
(5,906 Views)

You don't need to pass the VISA session handle back up to TestStand. VISA will either keep the session open, or each step will do VISA Open and Close automatically at the beginning and end of the VI execution. I've benchmarked this and there is no difference in speed if you keep the session open or do many open-closes. So if you just put the VISA address in a Local or StationGlobal, you can pass it to each step and forget about passing it back. You can use a string variable or a LabVIEW IO variable in TestStand to put your VISA address in. In your steps, The LabVIEW VISA control will show up like a container with two fields, name and session. You can just input a constant of 0 for the session, and the VISA address string for the name. BTW there's nothing wrong with passing the VISA out session back up to TestStand, it just seems more messy to me. Does anyone have any cases where this would be a bad idea?

cc

0 Kudos
Message 5 of 6
(5,887 Views)

Good Idea, the only case I can think is if you are unloading your Sequence / Steps.

 

 

Regards
Ray Farmer
0 Kudos
Message 6 of 6
(5,884 Views)