NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is the failed step recorded in Variables?

I'm running a sequential batch model, followed by printing labels at the end.

 

For the units that failed, I would like to print the failed step name on the label.

 

I know test stand records all the results in variables, but is there a single variable I can read which will tell me the name of the step where it failed?

 

For example, in the result files(html), TS always list the failed step at the top. I'd like to know where this is stored ?

 

Any advice appreciated.

 

Thanks

0 Kudos
Message 1 of 2
(3,008 Views)

Morngoose,

 

Not sure what a sequential batch model is???

 

However, if you look in the ModifyReportHeader Callback you will have a parameter called UUT.  This is a container with a bunch of info about, believe it or not, the UUT.  One of the elements in the container is an array called the CriticalFailureStack.  This contains info about what failed (i.e. the step name, the step sequence, the resultid, etc...).  I'm assuming the 0th element is the first failure and the 1st element is the second failure and so on and so forth. 

 

This CriticalFailurStack gets generated by a dll called the modelsupport2.dll, which is called from the reportgen sequence file.  I'm sure they, meaning NI TestStand developers, use a veritable hottub of algorithms and API calls to determine that array inside of the modelsupport2.dll.  You do have the source code for that dll located in the Components\Models\TestStand Models folder in your TestStand folder.  It was written in CVI which is an ansi C development environment, also created by NI. 

 

Personally, I recommend just using the ModifyReportHeader Callback and print the labels inside of that sequence.

 

Hope this helps!

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 2
(2,988 Views)