NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Automation refnum missing

On TestStand I loose the reference of one Activex object. The Labview vi ( 2017) generates the reference but I cannot pass the value to the successive TestStand(2020) step because the variable ( Local.Ref) where I want to memomorize it , is empty ( Nothing)

 

Labview 2017_32 bit.jpgTestStand 2020_64 bit.jpgis empty

0 Kudos
Message 1 of 9
(1,961 Views)

Since you did not provide the DLL, I have replaced it with a random other DLL in your OpenComm.vi and run your sequence.
When reaching a breakpoint in TestStand after the OpenComm.vi, I can see a reference ID in the Locals.Ref variable.

 

So it is not possible for me to replicate your issue with the sources your provided.

Btw the Locals.Ref variable would show a ref ID even if it was invalid, as long as the Vi passed out an actual reference ID.

 

I am not sure what the screenshot of the Open_Read_Close.vi is supposed to show.

Can you show a screenshot of your paused Teststand sequence after the OpenComm step which proves the step has passed a "Nothing" ref to the local variable?

0 Kudos
Message 2 of 9
(1,937 Views)

TestStand screenshot.jpg

0 Kudos
Message 3 of 9
(1,928 Views)

The reference is not nothing, it is IUnknown -> not a known reference to TestStand.
But it is a reference which you can use in the next VI.

0 Kudos
Message 4 of 9
(1,914 Views)

Yes, I agree. If I debug the sequence, I go inside the first Labview step, I see that Labview generates the reference number !! but when I set this output ( reference out) to Local variable I see nothing, I loose the reference!!.

If you see on Teststand sequence I backed the Reference out ( the object ref of OpenCom vi ) to one Local variable named “Ref” because I need to pass this variable to the next step that need it.

My problem is that at the end of  OpenCom vi the Local.Ref if empty , the content is “nothing” as you can see on my photo

0 Kudos
Message 5 of 9
(1,903 Views)

That is not what your screenshot is showing.

You screenshot is showing that after the OpenComm.vi the reference in Locals.Ref very well exists.
Hence the scissors next to it which allow you to release manually it -> You can only release a reference that exists.


Be careful when you check the reference. After your sequence completes the execution, the reference is released automatically.

0 Kudos
Message 6 of 9
(1,897 Views)

At the end of first step ( open Com) I have to find ( for ex.) Local.Ref=62784563 because I backed the reference out of my vi to one Local variable ( Local.Ref)., but instead I see "Nothing".

 

0 Kudos
Message 7 of 9
(1,878 Views)

Hi, how I can mantain the reference that the first step create and pass to second step. Because I need it on input on second step. For this raison I set the output of first vi Reference=Local.Ref in order to memorize my reference on Local.Ref

I dont understand your :

"Hence the scissors next to it which allow you to release manually it"

I dont knok hao to manage the "scissors"

 

0 Kudos
Message 8 of 9
(1,850 Views)

I've tried to manually relaise the Local.Ref clicking on "scissors" but I receive this error message :

RunTime  error on second step.jpg

0 Kudos
Message 9 of 9
(1,845 Views)