From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

InBuf NOT getting reset each step

I have a custom step that has a string buffer named InBuf'. My application is iterative in nature. The first time I execute step_xx I get the appropriate text from InBuf into my TestReport. The second time I execute step_xx, the report entry for the second execution of step_xx contains the contents of InBuf from the first execution of step_xx as well as the contents (appended) of the second execution of step_xx. This behaviour is repeatable for the third and fourth execution of step_xx (that's all I tried).
 
I've also seen this same behaviour in a multi-threaded application where each TestStand thread executes the same sequence.
 
I don't want past history in the TestReport, only the current step. Is there an attribute somewhere that I can set to eliminate the history and only output the text for the current step_xx?
 
Hurst
0 Kudos
Message 1 of 4
(2,965 Views)
Hi Hurst,

You can clear the data out of this string buffer in the post-expression of the step.  To do this, right-click on your step and select "Properties".  Go to the "Expressions" tab and in the Post-Expression box, you can enter the expression to clear the buffer.  This will clear the buffer after the step runs.  Try this out and let me know if you have any questions.
0 Kudos
Message 2 of 4
(2,947 Views)

Terry,

I found one of the steps where the appending effect was happening and I added the following in the PostExpression property:

Step.Result.Info = ""

I guess I used the wrong name of the variable in my original post. But anyway, when I inserted this expression it eliminated all text output for that step. I would think that to get the effect I want, I would have to clear 'Info' before the step executes.

Hurst

0 Kudos
Message 3 of 4
(2,936 Views)

Terry,

After some more experimenting I found that I can get the effect that I want by placing the above expression into the Pre Expression Property of the step.

Thanks for getting me close.

Hurst

0 Kudos
Message 4 of 4
(2,931 Views)