01-23-2018 03:56 AM
Hi Community,
I have an action step which has only an "error out" output. I think this step really should fail the sequence so I changed the step type to PassFailTest and looking for a way to fail the step if the error cluster indicates an error.
(I really dont want to touch the source code, so there will be no "PassFailFlag" output)
The error out cluster indicates pretty effectively if the step failed or not, so I was thinking about adding the following expression to the "post-expression" field of my step:
Step.Result.PassFail = !(Step.Result.Error.Occurred)
This doesnt work. Also tryed a custom condition on the post action tab, without any success. (Step.Result.Error.Occurred == False)
What would be the right solution to this problem?
thanks!
01-23-2018 05:53 AM
Hi 1984
Instead of passing Error Out from your VI to Step.Result.Error in TestStand, create a variable of type Error and pass the Error Out from your VI to that (lets assume it is Locals.ErrTmp. Next change the Data Source of your PassFail Test from Step.Result.PassFail to (Locals.ErrTmp.Occurred == FALSE).
Hope this helps
Steve
01-23-2018 10:38 AM
Can you explain me what is the difference between using Locals.ErrTmp.Occured == False and using Step.Result.Error.Occured == False
Cause for me it looks the same, from the condition standpoint, so any difference should come from how TS works under the hood.
01-23-2018 10:59 AM
From my testing, the real problem is that status is coming up as "Error" instead of "Passed" or "Failed". So what I did was to just set the Occurred output to Step.Result.PassFail and then set the Data Source to !Step.Result.PassFail.
01-24-2018 04:19 AM
If you want the status of your Step to show "Passed" or "Failed" rather than "Passed" or "Error" (assuming error is the failed condition) you need to avoid returning error information from your VI into Step.Result.Error. Both suggestions (Tim's and mine) do this, I am sure there are others, it is about what works best for you and anyone who might have to support your code in the future.