NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Step insertion Cause -17301 for 2nd UUT

Hello,
Purpose :
---------
Inserting "None Adapter" step into sequence DURING execution using TS_API and DLL_Adapter.

Status :
--------
Thanks to the example "inserting a step using labwindows", I successfully inserted the step into the cleanup sequence from withing my DLL. And I can find the result in report 🙂

Trouble :
---------
If I put my call in the Setup and try to insert my step
in the mail sequence, It is working ONLY THE FIRST TIME the sequence is executed, the second Time It causes:
"UUT Result: Error, Invalid step index '1' for 'Main' phase in sequence 'MaSeq'. [Error Code: -17301, Index out of range.]

Please Help !!
0 Kudos
Message 1 of 2
(3,027 Views)
To TS_diver -
I am not sure which example you are referencing, but inserting a step into a run-time copy of a sequence that is running cannot be supported by TestStand. It may work in certain circumstances, but the key issue of non-support by TestStand is that for each step in the run-time copy of a sequence TestStand expects a corresponding step to exist in the edit-time copy of the sequence. Some of these references are by pointer and some are by index. TestStand uses the edit time copy of the sequence for various information. We do this for performance reasons and it also saves memory.

The only thing that I can recommend is to create a placeholder step that you call conditionally run using preconditions. If you need to configure the step, you
can use the API to update the properties of the step prior to running the step.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
Message 2 of 2
(3,027 Views)