NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting limits from the sequence context problem

Trying to get the limits of a multi numeric from the sequence context in a labview vi test step.

I have two numerics.  So I access the step as property object and feed in Result.Measurement[0].Limits.High and Result.Measurement[1].Limits.High into the GetValNumber.  I get the Measurement[0] limit but not the Measurement[1] (gives me 0) - what am I doing wrong? thx

ET_0-1752864482588.png

 

0 Kudos
Message 1 of 3
(187 Views)

Any ActiveX reference that you obtain from within the VI using Property Node or Property Method must be closed using Close Reference; but only after it is no longer used.

 

1) Bug: Move the Close Reference to outside the loop. You are calling Close Reference inside the For Loop on the reference returned from AsPropertyObject during the first loop, which will result in the 2nd loop erroring on GetValNumber, so the default value is 0 and error will indicate the issue.

 

2) Bug: You need to use a Close Reference on the Step reference.

 

3) Correct: Sequence Context was passed in as a parameter, so the VI should not call Close Reference on it.

Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 3
(159 Views)

Thanks - yeah I figured out the close reference in the for loop was the issue - was rushing to get it done.  I do close the step ref later in the vi.  

0 Kudos
Message 3 of 3
(121 Views)