NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Exiting Batch Synchronisation Section in Cleanup

Solved!
Go to solution

Hi,
I have a test sequence which uses Batch Synchronisation in the following way:
1. Entering Batch Serial Section
2. Enter Batch One Thread Only Section
3. Set Temperature
4. Exit Batch One Thread Only Section
5. Test
6. Exit Batch Serial Section

 

I also use SequenceFilePostStepRuntimeError callback in the way that when error occurs ProcessCleanup callback is executed.

 

Now I want to know how to properly exit batch synchronisation section eg when error occured in step 3 or in step 5. I tried to access those steps ResultStatus properties but without any success 😞 (I mean they were always empty). I used: RunState.SequenceFile.GetSequenceByName("MainSequence").GetStepByUniqueId("ID#:wkly0AIqzUWmRLZ/hRtGVC" /* Enter One Thread Only (Low_Temp_Setup) */).ResultStatus

 

Capture.PNG

 

With status information I could create preconditions when to run which "exit steps".

 

Result recoding is disabled.

 

So what is the recommendation for emergency synchronisation exit strategy?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 4
(3,825 Views)

Hi bienieck,

 

From SequenceFilePostStepRuntimeError callback, you can get the Result.Status of a step from the MainSequence using the property: RunState.Main.RunState.Sequence.Main["<STEP NAME>"].Result.Status

 

SequenceFilePostStepRuntimeError also includes a reference to the Step that produced the error, so you can get information from it via Parameters.Step

 

From the MainSequence, you can get the Result.Status of any step in the sequence using the property: RunState.Sequence.Main["<STEP NAME>"].Result.Status

 

RunState.SequenceFile is a reference to the on-disk copy of the sequence file rather than the run-time copy, so it does not have access to run-time values.

Steven Gloor
Staff Customer Engineer - CTA, CLD
Message 2 of 4
(3,793 Views)
Is it possible to access this data from ProcessCleanup callback also?
Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 3 of 4
(3,786 Views)
Solution
Accepted by topic author bienieck

I decided that I will not exit synchronisation section explicitly in cleanup. In case of run time error, post step runtime error callback just terminates all. Process cleanup is executed anyway so proper cleanup is performed there 🙂

It works 🙂

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 4 of 4
(3,676 Views)