05-05-2023 10:26 AM
Using teststand 2022
I have a test that will loop back on itself pending a certain flag
Ex.
Sequence 1
Sequence 2
Sequence 3
Flag = True
The sequence will then loop back to Sequence 1 for the second iteration of test
During the second iteration of test , Using the SequenceFilePreStep Engine callback , i have a step test number increment using the following statement
"Parameters.Step.TestInfo.TestNumber = Parameters.Step.TestInfo.TestNumber + 10000"
My question is how do i reset the TestNumber property at the start of the next UUT test to its initial value, as it stands currently the testnumber keeps its incremented value during the same execution.
Tried to use the SequenceFilePostStep engine callback to decrement by 10000 but then this just cancels out the statement from SequenceFilePreStep
Is there a way to access the PreviousStep Property ?
05-24-2023 10:50 AM
I'm not sure the entire structure of this test, and it depends how you are doing the reports. Is each iteration it's own report, or on the same report? I can give some answers below, but they may not be 100% applicable to how your sequence it setup.
1. Make use of the process model and the PreUUT callback. This by default shows a dialog to enter a UUT Serial Number. You can add in your conditionals here to just loop the test again, and increment some number (use a fileglobals for the flag and number). This would give you different reports for each iteration.
2. Wrap the sequences in a While Loop, and before the while loop runs initialize a local variable to the default count. Then at the beginning of the while loop increment the local variable as needed, and use that to set any steps that need it. While loop conditional is the flag you are already looking for. You won't need the PreStep or PostStep callbacks.