NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How is Parameters.Result used in callback? How is it different from Parameters.Step.Result?

Solved!
Go to solution

Hello,

 

I have searched TestStand reference manuals, help, and the forums, and I haven't yet found exactly how Parameters.Result should be used in callbacks (if at all).

 

I'm trying to figure out how to take a step that normally is not recorded in the result list, and force it to be recorded on the infrequent occasions that it fails. I'm thinking I should be using the Result, but I'm not sure how.  If I set Parameters.Step.RecordResult = True then the step does get set to record results, but that seems to be permanent in the sequence file and AFTER the failure goes unreported.

 

Thanks in advance for your expert help!

- Gizmogal

 

 

0 Kudos
Message 1 of 6
(3,376 Views)

Look at table 3-3 in the TestStand Reference Manual. The very first thing that happens when a step executes is that the step result is allocated. This is essentially another element in the Locals.ResultList array.

 

If you have Record Result turned off for that step, nothing gets allocated for that array which means that no results will be recorded, even if you set RecordResult to true in a PostStepFailure callback.

CTA, CLA, MTFBWY
Message 2 of 6
(3,374 Views)

So, if I understand correclty, I should shift my paradigm... turn on result recording for all steps and then decide in the callback whether to discard the result?

0 Kudos
Message 3 of 6
(3,371 Views)

Yes

CTA, CLA, MTFBWY
Message 4 of 6
(3,369 Views)

Okay, thanks. I'll even kudo you if you answer the original subject question about Parameters.Result! Smiley Wink

 

- Gizmogal

0 Kudos
Message 5 of 6
(3,365 Views)
Solution
Accepted by topic author gizmogal

In stepping through the SequenceFilePostResultListEntry I finally discerned the difference between Parameters.Step.Result and Parameters.Result, which is only visible at run time:

 

Parameters.Result has a TS container which refers to the current step, giving information such as StepGroup, StepName, StepType, among others. Its results-related properties are equivalent to the Parameters.Step.Result properties as far as I can tell.

 

Parameters.Step.Result has a much more extensive TS container of type TEInf which appears to be test executive information.

 

It seems kind of backwards from what I would expect, but there it is.

 

I'm partway through shifting my paradigm - recording all results and then discarding those not of interest. I ended up adding a status string "RecordAlways" to force some steps to be recorded every time, and I toss any that are not equal to that or "Passed", "Failed", "Error", or "Terminated". It's working pretty well so far.

 

Thanks again for your help!

 

- Gizmogal

 

 

0 Kudos
Message 6 of 6
(3,360 Views)