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: 

Adding failing step(s) to a label

Solved!
Go to solution

Hi guys,

 

I feel as though this probably isn't a big deal to implement but I'm still somewhat new to teststand and hope you can help.  I am currently printing a label on passing UUTs which include:

 

1. Product part number

2. Product serial number

3. Test date and time

 

To do this I am calling a labview VI to handle this and passing the parameters.  However, now I need to implement a label that is printed when the UUT fails.  The information needed is the three above items as well as the addition of the name of the failing step(s).  

 

How can I go about getting the n ame of the failing step(s) to pass it to a VI to print a label?  Also, would the use of a callback make sense in a case like this?

 

Thanks in advance.

0 Kudos
Message 1 of 5
(4,367 Views)

I have done a little digging and it seems as though a SequenceFilePostStepFailure callback could work here.  I created a FileGlobal string that is updated with Parameters.Step.Name when the step fails which is great.  However, if that step is in a subsequence then the step name is overwritten by the subsequence name when you exit the subsequence.  Is there a way around this to either only grab the step name and/or the subsequence name depending on your preference?

0 Kudos
Message 2 of 5
(4,359 Views)
Solution
Accepted by rdp08

Hi,

 

I have attached a sequence which stores the failure names of all failed steps except sequence call.

Check file globals.FailureStr which contains all the step names.

Hope this helps.

 

Ravi

0 Kudos
Message 3 of 5
(4,328 Views)

Hi Ravi,

 

This is great!  Nice solution.  Thank you very much.

 

I have one other question to add to this I'm hoping you may be able to help with.

 

I have many sequences that this change would need to be implemented in.  From my reading it seems as though in a case like this it would make more sense to add this change to the process model.  To do this, would you just add this callback in the process model itself?  The other piece of this is it seems as though the process model has its own FileGlobals.  What is the way to pass these between the process model and the sequence?

 

Thanks again.

 

 

0 Kudos
Message 4 of 5
(4,314 Views)

Hi,

 

In this particular case i have used a engine callback and not process model callback.

Refer this :

http://www.ni.com/white-paper/6605/en/

 

So you need to use engine callback modifiations i.e.

http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/callbacks_engine/

 

Open "C:\Users\Public\Documents\National Instruments\TestStand 2014 (32-bit)\Components\Callbacks\Station\StationCallbacks.Seq" and modify as per attached file.

 

You will need to use stationglobals instead of fileglobals.

Hope this helps,

 

Ravi

 

0 Kudos
Message 5 of 5
(4,287 Views)