NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Set Sequence Call step

Solved!
Go to solution

I have code (in LV 2015) that modifes a step in a TS sequence (TS 2014), changing the sub-sequence being called.

The code works, but an error is thrown (indicating resources haven't been released), and in the end LabVIEW crashes.  Strangely, the resources that it' complaining about are ones that I haven't accessed.

Here us the offending code:

TS Fail.png It is the conversion of the Module reference to a SequenceCallModule that seems to be causing the trouble.

Here is the dialog box that appears:

warn dlg.png

Here us the complete text of the error:

References to PropertyObjects were not released properly.
Total number of objects: 1024
Number of top-level objects: 17

Note: Some top-level objects may be included if they are referenced by
an incorrectly released top-level object. For example, an unreleased
SequenceContext object references a SequenceFile object.

The following top-level objects were not released:

Type Definitions [5 object(s) not released]
Type Definition #1:
Name: SeqCallStepAdditions

Type Definition #2:
Name: SequenceArgument

Type Definition #3:
Name: NI_SequenceParameterResult

Type Definition #4:
Name: Expression

Type Definition #5:
Name: Path


And the following uncategorized objects:
SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

SequenceCallModule (SeqCallStepAdditions)
Name: SData

 

Can anyone tell me what I need to do the release resources after changing a subsequence call?

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 6
(4,435 Views)
Solution
Accepted by topic author paul_cardinale

I don't see a close reference for the Module or the Step objects.

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

The code is in a subVI/  The step reference is passed to it, and closed by the caller.

I had thought that the Close Reference should close the module because the SequenceCallModule reference should be the same as the Module reference.

But it's not.  When I added a Close Reference for the Module the problem went away.

Thanks.

Apparently using Vartiant To Data to change the type of a reference doesn't just change the type, but rather creates a new reference.

 

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 6
(4,427 Views)

Yes you are correct.  Using variant to data makes a copy, not a typecast.

 

So you always need to close both references.

 

Glad it is working now.

 

Cheers,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 6
(4,401 Views)

Hi All,

I tried this method, I am not able to run the Subsequence.

 

Thanks

Saran

0 Kudos
Message 5 of 6
(3,134 Views)

Hello Saran!

 

In the future, it would be best to create a new thread to ensure a faster response.

 

However, for me to understand, you added a close reference after the Module Unload Invoke Node in the code above?  I have included a screenshot of this implemented below.  After doing this, you were still unable to run the subsequence successfully?  It is also important to consider that the above code is in a subVI, so the Step Invoke Node at the end will also need to have a Close Reference VI.

 

TestStand Close Ref.JPG

 

Best,

Casey L.

Applications Engineer

0 Kudos
Message 6 of 6
(3,120 Views)