NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying report text based on step result

For reference, I am using TestStand 4.0 and CVI 8.0
 
I have a CVI numeric limit test step where I would like to print out a report text message only if the step fails.  What I think I need to do is to set Step.Result.ReportText based on the result of the step.  It seems like using a post-expression or a post-action should work, but either I don't know how to use them for this purpose or neither one is capable.    It seems like setting Step.Result.ReportText can only be set from the actual step thats reporting so jumping to another step to perform the action is not an option.  I was also thinking that possibly the SequencFilePostStep engine callback could be overridden but I think that would affect all steps when I just want to affect a few. 
0 Kudos
Message 1 of 10
(6,261 Views)

Hi,

What about using Engine Callback SequnceFilePostSepFailure ?
It is only called when a Step failed.

Greetings

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 10
(6,259 Views)
That's an option, but it still affects every step that fails which complicates things.
0 Kudos
Message 3 of 10
(6,254 Views)

HI,

OK, then i would try the Post Actions in the Step properties.

There you can select for example "On Fail" a sequence call.

See the exsample to attach the report text 

Greetings

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 10
(6,241 Views)
Hi,
 
you could also use the Post-Expressions.
With the following command in the Post-Expressions, you can delete the ReportText when your Step passed.
 

Step.Result.PassFail==True ? Step.Result.ReportText="" : Step.Result.PassFail

Greeting from Lake of Constance

Message 5 of 10
(6,216 Views)
Hi Schnurpsl,
 
a nice piece of code you figured out  !
It seems that I will use your stuff in future tasks. I 'll give you 5.
 
Greetings
 
Juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 6 of 10
(6,210 Views)

Hi,

Just a note, Step.Result.PassFail is only available in the Steps of PassFail step-type. For NumericLimitType, you would have to use something else. You can't use StepResult.Status because this will not have been evaluated when the Post Expression is invoked.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 7 of 10
(6,196 Views)

Hi,

yes you´re right. I just thought about the Pass/Fail Test.

But for a NumericLimitTest I´ve got another solution.

In this small sequence I integrated both Tests. To delete the ReportText at the NumericLimitTest, you have to use the Post Actions

Greetings



Message Edited by Schnurpsl on 01-30-2008 08:20 AM
0 Kudos
Message 8 of 10
(6,187 Views)
Sorry, the first Sequence works only with LabView 8.2
 
This Sequence works without an adapter


Message Edited by Schnurpsl on 01-30-2008 08:36 AM
0 Kudos
Message 9 of 10
(6,182 Views)
Thanks for your help.  I will try the ternary operator method first, it looks like that is a useful statement for the expression fields.
0 Kudos
Message 10 of 10
(6,172 Views)