06-03-2022 01:31 AM
Hello Everybody,
I'm, testing a failsafe routine in my sequence.
as you can see in this picture, there's an error in the module, which I produced on purpose, there's also a test variable pointing on that error.
, however that test variable which is pointing directly on the step.result.error.occured is false. As seen in the variables window.
I can clearly see the Error in the trace window, and howevering above it, I can also see the ErrorCode, as well as in the ResultList, but the variable Error.occured always stays false.
I don't understand that behavior at all, how comes he clearly displays status "Error" with the errorCode, but the Error Occured remains false ??
06-03-2022 08:54 AM - last edited on 10-24-2024 02:20 PM by Content Cleaner
How do you know that the error.occured is still false? You are setting the local variable in the pre-expression which means nothing. Of course it's false at that point. I'm assuming your error is happening after your code module executes. If you look at the step actions here:
https://www.ni.com/docs/en-US/bundle/teststand/page/step-execution.html
You'll notice that the pre-expression happens before the code module gets called. Try setting the local variable in the post-expression. It's very clearly being put in the result because you can see an error in your status column.
Another option is to break after the step executes and then look in the runstate property and see what error.occured is set to.