04-18-2012 07:04 AM
Hi!
One of my sequences in TS has about 20 steps that all give out a cluster containing potential errors. I'd like another VI to run after each step to check what type of error it is and give a warning/abort.
How can I do this without adding 20 copies of the same VI, but using some flow control instead?
Thanks
04-18-2012 07:57 AM
Just add the SequenceFilePostStepRuntimeError callback and you can capture any error and run whatever code you'd like.
04-18-2012 10:50 AM
Take a look at the example for what jigg is referring to in the Examples\Callbacks\PostStepRuntimeErrorCallback folder.
04-20-2012 02:21 AM
Thanks! This is exactly what I've been looking for.
I'm having some trouble understanding it though. The example uses pre-expression, but I'd like to use the step.result.numeric.
I have several different types of errors that I would like to check for, and then run the SequenceFilePostStepRunTimeError if any are found. How would you do this by checking the output of VIs that have been executed?
04-20-2012 02:56 AM
I found another example that I could just copy from into my own sequence. It now runs the error handler every time a sequence fails.
I would like it to run if there are other errors than just the numeric limit test. My VI contains GPIB and file open VIs that I also would like to run the error sequence if fail. Is it possible to do this if you use the error cluster from say, the VISA function, as an output? How can you check many errors of this type, a numeric result and a string result when a step finishes and then pass/fail the step?
Thanks!
04-20-2012 09:24 AM
If an error occurs the step's status is set to Error rather than Passed or Failed and then the SequenceFilePostStepRuntimeError callback will execute. You can access the step's information by looking at Parameters.Step inside of that callback and then execute whatever code you would like based on the step and error information inside that step variable.
04-20-2012 10:24 AM