NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you Edit Sequences or Variables during Runmode?

I'm writing a TestStand architecture document for a process to implement TestStand in place of the current VB test scripting, and learning to use TestStand.

Using VB, if I find any errors in my script, I can set a breakpoint or halt, edit the script and continue on.

1. Is there any way to do any editing in TestStand or do I have to Terminate, edit and Restart? My problem is that many test scripts have nested For/While loops that may take hours to work through and I don't want to have to restart after every problem. Or, is TestStand essentially compliled at runtime into a mode where it absolutely will not allow any editing?

2. Assuming that the answer to #1 above is "No", is there any way to change the value of a
variable at runtime? ...OK, so I found a script problem, terminate, edit and restart, but I want to restart my "Locals.TestNumber" (For Loop) at a value of "6" rather than "1". Can I change this at runtime? (I don't want to change the initial value for the test run because I may forget to change it back, and the test won't run correctly.)

Mike
0 Kudos
Message 1 of 6
(4,755 Views)
Hi Mike,

When you are using TestStand Sequence Editor and you logged on as Administrator or with an user with Administrator rights, then:

1. It is not possible to insert additional steps into a sequence during the Execution of that sequence or of any other sequence in the same SequenceFile which is run.

2. At runtime you can change the values of any variable (defined in StationGlobals, SequenceFileGlobals, Parameters or Locals) in the same sequence where the execution is Break, or in other sequences in the sequence file. The initial (default) values set to the variables when editing the sequences are not affected.
To do that editing, you have to browse the "Context" displayed by the execution window in the "Context" tab.
Further more, also substep properties c
an be changed at runtime (just right-click on the step in the execution window and select the "Show step in Context Tab" option). Same, the default (initial) substep values are not changed.

Additionally you can use the debugging option "Set Next Step" to jump the execution to the desired step and eventually to avoid running some hours to reach the debugging point.

Hope this helps,
Regards,
Silvius
Silvius Iancu
0 Kudos
Message 2 of 6
(4,755 Views)
Hi,

1. Short answer is NO.

But depending how you structure your sequences / sequences file you could provide a facility which will allow you to sort of achieve your objective.

If you set your lower level sequences to Load and Unload dynamically and the sequences are contained in seperate sequence files to the caller step. Then you should beable to step out of your sequence back to the caller. Edit the lower level sequence file, then setting the Set Next Step back so as to recall your newly editted sequence.

2. TestStand has the ability to set a watch on variables and properties so that you can change there values at runtime.
TestStand 3.0 has improved debug facilities which allow you to set up conditional breakpoints.


I have attached TS2.0.
1 two Sequence File to demonstrate Dynamically Load / Unload steps.
If you set a breakpoint on the step Pass/Fail Test 3 in Call Sequence Dynamically.seq. Then when execution stops at this break point, you can open the sequence file Load_Unload Example 3-Sub.seq. Make your changes to this sequence file. Save it.
Select the Step Sub Sequence Test in the Paused Execution of Call Sequence Dynamically.seq. Right mouse click and select Set Next Step. Then Resume / Step in / Step Over to execute the newly modified sequence file.

Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer
Download All
Message 3 of 6
(4,755 Views)
Thanks for the reply, but I would like to understand the context of these options...

I've loaded an run the example sequences. I did find the "Load Dynamically" option in the "Run Options" tab.

However, I looked up the "Load Dynamically" option in the documentation (TestStand 3.0 PDF manual), but it tells me nothing, other than that it exists.

What are the "gotcha's" with using this option? Why is it an option? Why not always use this option? Why use the "Preload" options?

Mike
0 Kudos
Message 4 of 6
(4,755 Views)
Hi Mike,

I surpose the one downsize is the speed of execution because before the step executes its got to load the sequencefile into memory then when its finished I've set to Unload.
If your sequencefiles are small and dont hold lots of arrays etc. you probably will not notice any difference from having it preloaded.


One reason why you wouldn't want to keep reloading it would be;
if you load data from the property loader via a network connection. Once you done it once, there is no need to read it again for repeated calls to that sequence, for the life of the execution.

Generally, the default conditions are suitable for most requirements and therefore do not required changing.

Hope this helps

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 5 of 6
(4,755 Views)
Hi,

First, there is a little description in Chapter 5 at the "Run Options Tab" description where the load options are described. You can check on those.

Load Option settings for one step:

"Preload when opening sequence file" � Loads the step module when TestStand loads into memory the sequence that contains the step.
"One of the advantages of using this is that the time needed for loading is spent only! at the begining of the sequence. Another could be that the memory needed for a sequence is loaded only when the sequence is oppened, and could be freed when the sequence closes"

"Preload when execution begins"�Loads the step module when any sequence in the sequence file that contains the step begins executing. This value is the default setting!


"Load dynamically"�Does not load the step module until the step is ready to call it.
"This loading time will increase the step execution time, for that step". If you are time critical for one step, do not use this option.

In your case, if the step module is loaded you cannot change it. So if you set the load option to "Load Dinamically", the step module will be loaded only when about to be executed and so you can modify the step before.

Hope this helps.
0 Kudos
Message 6 of 6
(4,755 Views)