NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Failure/Error Information in Postbatch

I have a custom DLL that prints a string I feed it to an attached Epson Receipt Printer. The intention is that if a TestStand socket has a Failure, Error, or Termination I will print a receipt for that socket which shows what step failed or had an error and if it was a measurement what the measurement was.

 

I am trying to figure out what variable in the Batch model PostBatch sequence stores information about what test step failed or had an error and also where I can get measurement details for that particular step. The intent is to construct a string based on this information and feed it to the Receipt Printer DLL. I wish to only grab the first failure/error encountered in the chain if there are multiple steps failing.

 

Can someone point me to the variables I need under the Batch model to gather these details? Also, if it is a variable, inside an array, under a cluster etc. what is the structure to the path of the variables I need to be concerned with?  

0 Kudos
Message 1 of 7
(5,553 Views)

Hi,

 

Please find the attached sequence which tries to capture what you need.

I have overriddent the post UUTcallback.

 

The result list is iterated to find the first failure and the string is updated.

You can put a breakpoint in the post uut and trace it to understand it better.

 

This failure tries to capture the results for a numeric limit step but the variables maybe different for differnt step types.

You need to consider failures of different step types (as variables will change) before coming up with the final failure string.

 

Hope this helps.

 

Ravi

0 Kudos
Message 2 of 7
(5,532 Views)

Ravi,

 

I am using the PostBatch not the PostUUT Callback. In PostBatch under Parameters I have Parameters.ModelData and Parameters.ModelPluginConfiguration. Is this same data you show under PostUUT Parameters.TestSocket.MainSequenceResults.TS.SequenceCall.ResultList available under PostBatch Parameters.ModelData.TestSockets[index#].MainSequenceResults? The cluster variable MainSequenceResults seems to be populated at RunTime so I am having dificulty figuring out what info exists under that structure.

 

Thanks,

Aaron

 

 

0 Kudos
Message 3 of 7
(5,517 Views)

OK I did some more digging and here is what I found under PostBatch. Below is data from variables I pulled after a manual search when I ran my test. The ResultList[18] represents the first subsequence that had status=failed and the ResultList[6] was the first step within that subsequence that failed. This is going to be pretty difficult and involved to parse out because how deep the levels go with SubSequences. Also, different step types will require me to pull in different fields (ie NumericLimitTest vs. Pass/Fail steps. Any suggestions on how to make a simplified expression for this?

 

Parameters.ModelData.TestSockets[3].MainSequenceResults->Status = Failed (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].Status = Failed (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.StepName = Test Audio Loopback (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].Status = Failed (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].TS.StepName = Primary_Mic_Test Frequency 200Hz (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].Numeric = 1715.853958 (number)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].Units = Hz (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].Limits.Low = 199.000000 (number)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].Limits.High = 201.000000 (number)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].Comp = GELE (string)
Parameters.ModelData.TestSockets[3].MainSequenceResults->TS.SequenceCall.ResultList[18].TS.SequenceCall.ResultList[6].TS.StepType = "NumericLimitTest" (string) 

0 Kudos
Message 4 of 7
(5,514 Views)

Latest update....I have a sequence together that almost works. See attached. The attached sequence won't run but I am attaching just to show the logic. The code I have here will run in my test sequence.

 

This code works for sequence failures that are nested Main-->Sub-Sequence-->Failing Step. However, if you have failing steps that are nested within for loops, case statements, if statements, etc. or any other variation the code returns nothing because its nested differently within the ResultsList[] array. 

 

Does anyone have any ideas how I can handle that? Looking at this it seems like it would be impossible to cover all possible senarios as to how the failing steps are nested within the ResultsList[] array in order to make the output rock solid. Is there a different way to do this? I imagine that there is a way to find this information within NI_ReportGenerator.seq somehow (after all its in the report) but all of my other details to make this work like socket, serial number, and status of each socket (ie. passed, failed, error, disabled, terminated, etc.) is all under PostBatch.  

0 Kudos
Message 5 of 7
(5,502 Views)

Hi 

Please can you save the sequence file for version 5 which is 2012.

0 Kudos
Message 6 of 7
(3,922 Views)

Sorry mevelin but I have since moved to a different company and no longer have a TestStand license (only Labview). You may want to download the file I uploaded back in 2015 and post it here....http://forums.ni.com/t5/Version-Conversion/bd-p/VersionConversion

 

0 Kudos
Message 7 of 7
(3,912 Views)