From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get data of the failed step that caused sequence failure

Solved!
Go to solution

Hi!

I'm developing a test system that can measure a range of different products, one product at a time. The test system software consist of a main sequence and product specific client sequences which are loaded dynamically based on product identifiers.

If a test sequence fails, I would like to print the failed step name, parameters and results and their limits on a paper in PostUUT callback. Unfortunately I have not found a way to do this as I can't get the required data of the failed step.

 

 

What I've tried so far:

  • Use SequenceFilePostStepFailure callback. This is far from optimal since, as the name suggests, it affects only the sequence file where this callback is in. This means that I would need to have duplicate code in every single product specific client sequence and if I ever want to change something I would need to replicate the changes to all those client files again.
  • Create custom process model where I included the ProcessModelPostStepFailure callback. This way I could pass the failed step all the way to PostUUT callback but I couldn't find out how to access the parameters of the called step.

Is there any reasonable method to get the name, parameters and results from the failed step in PostUUT callback?

Using TS2014.

0 Kudos
Message 1 of 10
(5,131 Views)

Hi,

 

Thanks for getting in contact with us! I've recreated a very simple TestStand File below. My numeric step test is linked to a VI which is adding 5 to a given number. Some screenshots of this program are below.

image.pngimage.png

My TestStand sequence is shown below. The for loop simulates running through difference pieces of hardware (the loop connects with a numeric array inserting different numbers into my LabVIEW program).

image.png

I also inserted some additional information into additional results for my numeric limit step test.

image.png

I ran this sequence on a single pass and it generated the following report:

image.png

As shown in the image above, I have captured the parameters and result of each one of my steps.

 

Hopefully this helps!

 

Many Thanks,

 

Chris

 

0 Kudos
Message 2 of 10
(5,099 Views)

Hi,

 

Thank you for taking your time to answer me.

Unfortunately, this is not exactly what I was after. Perhaps I wasn't clear enough, so I'll try to clear things up.

 

We are not using the default report as shown in your images. All reporting is automatically done to a database by a 3rd party module which is a TestStand plugin. An operator is not interested about the report at all. An operator only cares about the failed step since when the product fails on the automated test system it is manually inspected by a person. For this person to be able to inspect the failed product he needs to know the step where it failed as well as the logged parameters of the step. E.g. was the failed step "test display" or was it "test button" as well as the parameters of that step. "Test button" could have a parameter "buttonId" which identifies the button that failed.

The failed step info should be printed on a small piece of paper which is then attached to the product that has failed.

 

Now the problem is that the "Step" parameter in the process model callback "ProcessModelPostStepFailure" does not contain logged parameters. Otherwise this callback could do the trick.

 

I know that the ResultList in the process model file locals contains the parameters but I don't know the ResultList index that was the failed step. Also ResultList seemed to be updated only after the callback was completed.

 

I hope you got a more clear picture of the problem.

 

Thanks,

munaleipä

 

0 Kudos
Message 3 of 10
(5,094 Views)

Hi Munaleipä,

 

Sorry you have had no reply to this Forum! Are you still seeing this issue?

 

Amy

0 Kudos
Message 4 of 10
(5,007 Views)

Did you get a solution? I'm in need of the same functionality - getting the info of the step that caused sequence failure after the test sequence is finished.

CLA, Teststand and advanced SQL
0 Kudos
Message 5 of 10
(4,988 Views)
Solution
Accepted by topic author munaleipä

One way to do this would be to change your process model to add the ProcessModelPostStepFailure Callback.  

 

In the attached, I first test to see if the Failing step was a LabVIEW step with Parameters.Step.Module.Adapter.DisplayName == "LabVIEW"

 

Then, I loop through all of the parameters in the for loop with Parameters.Step.Module.AsLabVIEWModule.Parameters.Count

 

Just as an example, I compile a message with all of the LabVIEW VI parameters' label names (Parameters.Step.Module.AsLabVIEWModule.Parameters.Item(###).Label) and values (Parameters.Step.Module.AsLabVIEWModule.Parameters.Item(###).ArgVal)

 

Pulido Technologies LLC

0 Kudos
Message 6 of 10
(4,984 Views)

Hi all.

 

I ended up using a custom process model with ProcessModelPostStepFailure callback as pulidotech recommends. This is what I initially tried before I opened this discussion. What I didn't realize back then was that looking at the Parameters.Step variable in the aforementioned callback at runtime, TestStand shows only the failed step type's variables and not the generic Step variables. This is why I thought that the parameters of the failed step are not in the callback anymore. Looking at the API docs made me realize my mistake. Parameters of the failed step are found in Parameters.Step.AdditionalResults.

 

Rest of my initial problem  was simple to solve as I just made a local variable to Test UUT's entry point which references the first failed step. I can then access this variable in PostUUT callback in my client sequence and do whatever I want to it.

 

 

0 Kudos
Message 7 of 10
(4,973 Views)

Hello manualeipa,

 

I am new to Teststand and actually facing the exact same problem. I want to put the StepName of the first step causing the whole sequence to fail (The StepName actually displayed in the Failure chain of test report) to a variable in StationGlobals that I could use in the future but I am not quit there yet. 

I have downloaded the Modelsequence that pulidotech attached. I have checked the Parameters of the failing step causing the ProcessModelPostStepFailure callback and I couldn't find the Step's Name, as you said, I have only found the failed step type's variables and not the generic Step variables.

Could you please provide me with more details on how to get the step's name and what have I done wrong ?

Thank you

 

0 Kudos
Message 8 of 10
(4,583 Views)

Hi,

 

The property "Name" should be there. TestStand just doesn't show it to you since it is the actual StepType object that is passed as a parameter. StepType always extends the generic Step class. See class hierarchy.

You should be able to access the step name in the callback with an expression "Parameters.Step.Name".

 

Best regards,

munaleipä

0 Kudos
Message 9 of 10
(4,578 Views)

Hello munaleipä,

Thank you so much for the quick reply, it works just fine now.

Another question that came to my mind which I certainly want to figure out is that if I use another ModelSequence which doesn't have the "ProcessModelPostStepFailure" sequence Callback, how is this sequence called once a step fails and how could I call it in the ModelSequence that I actually have in case I don't have the ProcessModelPostStepFailure.seq in the TestStand 2016 path?

Thank you so much for your consideration.

Chaima

0 Kudos
Message 10 of 10
(4,569 Views)