NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Parameters On Custom Step Types

Hi everyboby, 
I'am trying to set up my own step type: I'd like to have customized sequence call step with some special parameters like a
name and a dedicated number (no problem so far). The trouble starts wanting to access those parameters for result logging at the end of the sequence.
I can see the result of my custom step in Locals.ResultList[] and following down the chain via TS.SequenceCall also the results of the subseqeunce called. But no trace of my custom parameters. Already tried some things with the property flags for the parameters with no result.
Am I looking at the wrong place? 
 
Thanks in advance! Have a great weekend! 
 
Oli
0 Kudos
Message 1 of 3
(3,081 Views)
There are various methods, to add a property to the Locals.ResultList[] object. Unfortunately just setting the PropFlags_IncludeInReport flag is not enough.

method1: All subproperties of the Step.Result object are copied automatically to the Locals.ResultList[]. If it is possible to add all additional properties you want to have to the Step.Result object of your custom step type, this would be the recommended and easierst method.

Method2: Use the AddExtraResult(xxx,"Test") method. You should call this function of the TestStandAPI at the beginning of your sequence. Whenever a follwing step has the property xxx it will be added to the Locals.ResultList[]. This method is usefull, when your property, that you want to add is outside the Step.Result object, and you want to add the property to the ResultList for every step that has this property.

Method3: Use thr SetValNumber, SetValString or SetValBoolean mehtod of the PropertyObject class to add single properties to the Locals.ResultList[] directly. Don´t forget to use the "InsertIfMissing" option, so that the properrty is created, if it is not jet available in the Locals.ResultList[]. After you added the property with this function, you have to set the PropFlags_IncludeInReport for this property.


Hope this helps!
Message 2 of 3
(3,068 Views)

Thank you! I'm now using method two as a pre-step... works perfectly!

Cheers

Oli

0 Kudos
Message 3 of 3
(3,051 Views)