08-31-2011 10:02 AM
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.
08-31-2011 10:33 AM
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.