NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I store active x and .net object references to be used later in VIs in TestStand

I am using generator sources that have OS which use either Active X or .NET for software/hardware integration.  I can use the objects once with LabView, but when I try to store the object reference to a variable, I lose the object reference.  Can anything be done.  I'm using LabView 2009 and TestStand 4.2.

0 Kudos
Message 1 of 2
(3,021 Views)

You need to store it in TestStand as an Object Reference.  So let's say in TestStand you have a Local of type Object Reference called MyHandle.  So to reference it you would use Locals.MyHandle.

 

You need to pass that into and out of the VIs.

 

Something like this:

 

Step1: CreateObject.vi passes the reference back and stores to Locals.MyHandle

Step2: Pass Locals.MyHandle to vi called SetVoltage.vi.  SetVoltage.vi passes handle back to TestStand and stores it as Locals.MyHandle.

Step3: CloseObject.vi takes Locals.MyHandle as an input and closes it.

 

You can have various steps between.  The key is using that same handle to pass around and not "breaking" the handle in one of the VIs.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 2
(3,020 Views)