NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand Object Reference strange behavior with LabVIEW Module

Hi to all

 

I have a strange behavior with a LabVIEW Module which I use in a Subsequnce and use an Object Reference for Value passing.

I have created an exmaple to demonstrate the behavior.

 

I have the "MainSequence" in which I call three times the Subsequence "GetRandomNumber":

python007_0-1766050412903.png

As Paramter I use an ObjectRefrence:

python007_1-1766050451361.png

In the "GetRandomNumber" Subsequence I call a LabVIEW Module and assign its Output (a Variant) to the ObjectReference:

python007_2-1766050603892.png

 

The strange behavior is that I get three times the same RandomNumber in the ObjectReference. It seems something strange with the ObjectReference.

 

I have alos added a direct call of the LabVIEW Module and assign its Output to the ObjectReference:

python007_3-1766050739035.pngpython007_4-1766050754921.png

 


With the direct call of the LabVIWE Module I get three Times a different Value in the ObjectReference

 

 

What I'm doing wrong?

 

Download All
0 Kudos
Message 1 of 4
(151 Views)

Disclaimer: I haven't looked at the code you have attached

 

Just for the sake of completeness, there is a random function in TS also, so unless you need something very fancy here 😉

 

What you are describing sounds odd! Do you get the expected (three different) results, if you set the ObjectReference to Nothing  in between the sequence calls? 

0 Kudos
Message 2 of 4
(128 Views)

Hey Oli, thanks for your reply

 

I just use the Random function to ilustrate my Problem.

 

I already tried to set ObjectReference to Nothing in between the sequence calls but without a effect.

 

Does somebody has an Idea what I'm doing wrong?

 

Best regards

0 Kudos
Message 3 of 4
(29 Views)

OK, I took a look at your code and I can confirm the behaviour as described.

 

The Parameter of the SubSequence is updated within the SubSequence, confirmed using single-stepping and checking the variables pane.

Nevertheless, the Local (in the caller) assigned to the SubSequence-Parameter is only updated for the very first call.

 

Since I haven't seen this issue with other data types than variants, my gut feeling is, that this has to do something with the variant itself.

It smells like a bug to me.... I'd recommend contacting NI Support! They should be able to work with the information you have collected

 

 

0 Kudos
Message 4 of 4
(23 Views)