NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

batch model error handling

I need clarification on how PostActions work in a batch process.

 

I am running a four site test in batch mode with each test set to serial synchronization. If one site fails, I need to power it down. Each site is connected to power through relays. To disable a site, I need to turn power off to all sites, open the relays to the failing site, and then re-enable power to the remaining sites. Obviously I can’t have other threads running while I disable a site.

 

I know that in batch serial mode all sites will complete the current step (one thread at a time) before any site begins the next step. But what about the PostAction? If a site executes a PostAction, will this complete before other threads execute either the current step or begin the next step? Or will the PostAction on one thread run in parallel with a test step in another thread?

 

Thanks,

Bob

0 Kudos
Message 1 of 4
(3,586 Views)
Hi Bob,

When setting the Model synchronization to serial (Configure->Model Options..), PostActions are treated like steps, and are synchronized with the PostActions of the steps in the other sockets in the running batch.  They are not executed before the step itself in the other sockets in the running batch.

When setting the individual step's synchronization to serial, and not setting the Model or Sequence synchronization to serial, PostActions can be executed directly after the step itself, and before the step in the other sockets in the running batch.

The text below explains the behavior of nested synchronization in a general way, and is copied from Appendix B (page B-15 in my version) of the TestStand Reference Manual, which has the default path of: C:\Program Files\National Instruments\TestStand 3.5\Doc\Manuals.

"Nesting of sections can occur either within the same sequence or as a result
of calling a subsequence inside of a synchronized section when the
subsequence also contains a synchronized section. When you nest one
section inside another, TestStand honors the inner section if the type of the
outer section is serial or parallel. For example, if you nest one serial section
in another serial section, each thread that enters the outer section proceeds
only until the Enter step of the inner section and then waits for the other
threads to reach the same step."

If you need more of a detailed answer for your specific situation, please explain the details of your synchronization settings.
I can also post a sample sequence if that helps.

Gavin Fox
Systems Software
National Instruments
Message 2 of 4
(3,558 Views)
Bob,

Just want to clarify, if you are using the model option to set batch synchronization to serial for all steps, but in the case of a particular post action that calls a sequence you want all the steps in the post action sequence to run before the next testsocket runs the step in the main sequence then you will need to set the batch synchronization setting on the steps in the post action sequence to 'none'. This will keep you from having nested synchronized sections in your post action sequence, thus the entire post action sequence itself will run and complete before the next testsocket execution runs the original step.

Hope this helps clarify things,
-Doug
Message 3 of 4
(3,553 Views)
Gavin,
Thanks for the background. It helped a lot. I write a lot of LabVIEW but not much TestStand. I find the TestStand manuals to be convoluted and with so much control controlled by the model file sometimes it gets hard to follow.
 
Doug,
Thanks, this is exactly what I want.
 
Bob
0 Kudos
Message 4 of 4
(3,547 Views)