NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Model, Auto Schedule, and Go To Cleanup

Hello,

 

I created a sequence using the Batch model (for three sockets) that works well. This sequence runs a number of subsequence tests, each of which has the Post Action set to GoTo Cleanup on a failure. If a step fails then MainSequence goes to the cleanup section until the rest of the sockets have completed. So far, so good...

 

I then added an Auto Schedule to improve efficiency amongst the shared resources. This worked well when all the steps Pass - the resources are used as they become available and the test completes.

 

However, if one of the sockets Fails a step then it goes to Cleanup and doesn't close the lock created by the Auto Scheduler. The rest of the sockets now hang at that same spot waiting for it to be available, which it never is since the offending socket is now in Cleanup. If I remove the Post Action "GoTo Cleanup" from the failing step then the rest of the sockets complete successfully since it's not being held in a locked state anymore, but the socket that failed doesn't go to Cleanup as I need it to.

 

Am I doing something wrong here? I tried other options as well, but still seem to have the issue of not being able to exit the Auto Scheduler lock properly in order to allow the other sockets to continue without issue.


Thanks for the help!

0 Kudos
Message 1 of 5
(3,384 Views)

Hi Raydur,

 

Do you think you can post a small reproducible case so we can see the behavior ourselves? Might be easier to visualize and fiddle around with it if we were to see what actually happens.

 

Thanks!

Aulia V.
0 Kudos
Message 2 of 5
(3,326 Views)

Hi Aulia,

 

Thanks for the suggestion. I created a small sequence to reproduce this behavior and it actually led me to discover a nuance that I wasn't aware of before. This issue doesn't show itself unless there is a step in the cleanup with Batch Synchronization enabled. Please see attached example. It uses the Batch model and Auto Schedule, with one of those set to Forced Fail (and Post Actions set to GoTo Cleanup).

 

Interestingly, even if the cleanup step is skipped it still hangs at that spot. and the rest of the threads are unable to execute the Auto scheduled section that failed in the other thread. Seems like maybe a TestStand bug?

 

Note that the attached sequence has the sequence file properties set to use the default Batch Model. I saved it in TS2014 but am using TS2016 to run.

0 Kudos
Message 3 of 5
(3,320 Views)

Hey there,

 

Thanks for the reproducible case! I was able to see clearly the issue that is happening. While I don't think it's a bug in TestStand, I do think that the behavior is silly in that Test 4 doesn't "unlock" the resource for the rest of the UUTs. I have a good feeling that this is expected though not sure why R&D decided to make it this way. A potential workaround is to make some sort of conditional that allows the resource to unlock AND send the UUT to cleanup. 

 

In addition, I can look into this further to see if our other engineers have a better way of going this. I agree that auto-scheduling and locking your resources is the most efficient for testing multiple DUTs and keeping away race conditions so I wouldn't necessarily want to take that away. But maybe there's something we can implement in addition to it that might help. 

 

Does that make any sense? 🙂

Aulia V.
0 Kudos
Message 4 of 5
(3,306 Views)

I certainly can't say it's a bug with any real confidence, but if it isn't I'd be interested in the intended logic that defines the behavior. Smiley Happy  What gets me is that setting the run mode of the Batch Synchronization step in Cleanup to Skip still causes it to hang in other threads at the offending auto-schedule step (but doesn't hang if that step isn't there).

 

If I could manually release the lock is created by the Auto Schedule step then that would provide a workaround for the issue, but I don't seem to be able to do that. I've tried using an Early Unlock, but that doesn't affect the lock status from the Auto Schedule. Even trying to just gracefully get out of the Auto Schedule steps before going to Cleanup causes a TestStand error stating certain step syntax is required for Auto Schedule.

 

Any insight on how to manually release the lock created by the Auto Schedule step?

0 Kudos
Message 5 of 5
(3,296 Views)