From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

For loop in teststand

Solved!
Go to solution

Brzhou123_0-1589891816459.png

inside the for loop, there is a step, i can choose pass or fail, if pass, go out of the for loop, otherwise will loop.

But not sure why, as long as i have ever choose fail, the result of the whole sequence is fail

Thanks

Keep moving
0 Kudos
Message 1 of 7
(4,135 Views)

Let's say I am looping through a bunch of digital output lines from a UUT.  In a FOR loop, I set the value the UUT should output and then read the output.  By your logic, as long as the last output worked correctly, it is an overall pass.  That is not desired.  Each output that is tested contributes to the overall pass/fail of the sequence.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(4,120 Views)

Thanks for your quick reply.

You mean the output of each loop, will contribute to the overall pass fail ?

I want the output of last loop, to decise the overall pass fail, how to make it ?

Thanks

Keep moving
0 Kudos
Message 3 of 7
(4,117 Views)

You can use SequenceFilePostResultListEntry engine callback and set Parameters.DiscardResult=True if e.g. (RunState.Caller.Step.Name == "Test") && (Parameters.Result.Status == "Failed")

 

Or use for loop only for measurements and compare with the result after looping.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 4 of 7
(4,091 Views)

Thanks, it is a pity, i use teststand 2013.

Keep moving
0 Kudos
Message 5 of 7
(4,086 Views)
Solution
Accepted by topic author Brzhou123

I saved it in 2013 but I don't have this version so I can't promise it will work 😕

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
Message 6 of 7
(4,046 Views)

Hi Sir

 

I have run your file, still the same, failed, maybe need other solution, but still very appreciate for your quick response

Keep moving
0 Kudos
Message 7 of 7
(3,983 Views)