NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get my Teststand report to only show the step data for the last iteration of a DoWhile loop ONLY?

Solved!
Go to solution

Hi all,

 

since I have the same issue, not only concerning DoWhile loops, also for While and For loops, I want to ask if there is, after more than 3 years probably a better solution for that.

 

I dont want to filter all results at the end of the execution since it takes long time and I have a huge number of loop iterations in the ClientFile which is currently causing TestStand 2014 (x86) to run into memory problems.

 

My current solution is using ProcessModelPostStep in ProcessModel to get the information whether the current step was a start or end of loop step. At start of the loop I save the Id of that step in FileGlobals, and in the next iteration, if Ids match, I enhable the DiscardResult flag for that step. At each end of loop step I disable the DiscardResult flag.

 

By doing this, I am having the only the FIRST iteration results in my report. But my goal is to have only the LAST iterations result in report.

 

Do you have any suggestions? I would be very glad to find a solution.

Hint: I dont want to modify the ClientFile statically (i.e. by manipulating any Callbacks), I can only modify it temporarily at runtime.

0 Kudos
Message 11 of 13
(1,742 Views)

Hi Paul,

I have tried that but couldnt get the last iteration status of the while loop.

But its discarding all the failed status.

 

prsricharan_0-1597332790628.png

 

Thanks 

Sricharan

0 Kudos
Message 12 of 13
(1,066 Views)

Hint: I dont want to modify the ClientFile statically (i.e. by manipulating any Callbacks), I can only modify it temporarily at runtime.


My solution may not be compatible with that, but here's what I do:

 

(pre- or post- step I want to dynamically decide whether to discard)

Step.Result.NewSubProperty("Discard",PropValType_Boolean,False,"",0x5),
#NoValidation(Step.Result.Discard = True) // <-logic goes here

 

(statement in SequenceFilePostResultListEntry)

precondition:PropertyExists("Parameters.Result.Discard")

statement:Parameters.DiscardResult = #NoValidation(Parameters.Result.Discard)

 

 

0 Kudos
Message 13 of 13
(1,048 Views)