NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Gracefully Handling Batch Synchronization Error -17500

Solved!
Go to solution

Hi all,

 

Using the batch model, in a few places we have "One Thread Only" synchronization either on specific steps or sections within our sequences. (Pretty common.) We occasionally see a run-time error inside the "One Thread Only" section, and then all the other threads that are waiting on that section throw error -17500.

 

Has anyone come up with an elegant solution such that when an error occurs in a "One Thread Only" section, the error is gracefully handled thereby preventing the waiting threads from throwing -17500?  The only solution I can think of is to predict and prevent the original run-time error from occurring, which can sometimes be daunting in obscure, unforeseen scenarios.

 

I did attempt a cursory search that yielded many results - if this topic has already been specifically addressed feel free to point me to another post.

 

Thanks as always,

 

Mr. Jim

0 Kudos
Message 1 of 3
(2,451 Views)
Solution
Accepted by Mr._Jim

I recommend to implement a kind of "intelligent" error handling in the PostStepRuntimeError callback. The station setting for error behavior would be "ignore" in that case. This enables you to identify steps and, in case they are part of synchronized sections, to react as such on that error that the thread is not stopped leaving other threads 'hanging around'. Please note that just ignoring errors is usually a bad thing, so if you proceed with the thread, you have to implement measures to either get rid of the error gracefully or to 'postpone' the error.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(2,416 Views)

Thanks Norbert - I was thinking along the lines of the PostStepRuntimeError callback, but I wasn't sure if someone else had a specific approach, or maybe if there's another way I hadn't considered - hence the question.

 

You're right - in some way you have to truly handle the error (you can't just optimistically ignore it), but using the callback is probably one of the better ways of doing that.

 

I truly appreciate the input - thank you!

 

Mr. Jim

Message 3 of 3
(2,407 Views)