NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing information between callbacks

Solved!
Go to solution

So I'm trying to make my current test sequence a little more general and I've come up with this problem.

 

I'm venturing into using callbacks as it really cleans up my sequences and I can make my sequence more general to accommodate different products and tests at the same time.  I'm testing devices on a wafer (65k+ DUTs per wafer) and I was using the single pass execution entry point with a loop inside my test sequence to loop through all the devices on my wafer.  It was really ugly with just about all information passed by local variables.  After I wrote it again using callbacks I really see the advantage of going this way.

 

Here is my problem.

 

Since I don't want the tester to prompt an operator every time the probe station probes a device I'm using a callback which reads information from the probe station and this information is used as the DUT serial number (actually a message saying it's a valid die as well as X & Y coordinates).  The practical location for me to save this information is in File Globals however according to

NI TestStand I: Introduction Course Manual

Lesson 9 - Best Practices for Test Development

Section B. Using Appropriate Data Scope

Course Software Version 4.0 July 2007 Edition

 

Avoid using file global variables for continuous communication among sequences.  File global variables are appropriate for data items that you set once in a single-threaded portion of the sequence and do not set again.

 

So my use of a file global to store information produced during the pre UUT sequence callback clearly violates these guidelines.  So in order for me to pass this information to the MainSequence callback where I'm executing the test it seems I should be using Parameters instead.  So this leads to my question

 

How do you use parameters to pass information between sequence callbacks?  Do I need to modify the process model?  I hope not 

0 Kudos
Message 1 of 9
(5,521 Views)

Just wanted to clarify that I'm also using the Test UUTs execution entry point now

0 Kudos
Message 2 of 9
(5,514 Views)

Going for the execution entry point which loops the MainSequence by default is a good idea. For the automated test system, you have to replace both PreUUT and PostUUT callback. Often, PostUUT callback can be overridden by an empty sequence.

But when overriding PreUUT, you have to take care of two parameters the callback sequence supplies:

- Serial Number

- Continue Testing

 

The second parameter is used for termination of the UUT loop within the process model. Therefore, you should not forget this parameter in order to have the chance to shutdown the system properly.

Attached you can find a small example (do not run it!) with a general design idea of this.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 9
(5,500 Views)

"Avoid using file global variables for continuous communication among sequences.  File global variables are appropriate for data items that you set once in a single-threaded portion of the sequence and do not set again."

 

 

This is just advice. Following this advice can help keep you away from certain types of common trouble such as excessive coupling or race conditions. However, assuming you can manage the downsides of globals, you might decide their convenience is worth employing them in violation of this advice.

0 Kudos
Message 4 of 9
(5,489 Views)
Solution
Accepted by topic author chilidog

Hi Chilidog,

 

if this would be my task i can see two ways for reaching it without changing the model

 

1.) Create a local variable during execution time in the model entry point.
    Pre UUT will create in a statement a new variable in models entry point by using
    Runstate.Root.Locals.AsPropertyObject.NewSubProperty ("strMyVariable",PropValType_String,False,"",PropOption_DoNothingIfExists)
    and then in another step access it via PropertyObject and add new value.

    Note: This is also working with containers

    In the Main access it via Property Object in the same way and get the value.

 

2.) Use a queue.
     for more information use this thread
    http://forums.ni.com/t5/NI-TestStand/Generating-Multiple-Reports-in-Subdirectories-with-Nested/m-p/1...

 

hope this helps

juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 9
(5,488 Views)

thanks j_dodek

 

I found a queue was exactly what I needed.  Simple and effective.

0 Kudos
Message 6 of 9
(5,471 Views)

Norbert B

 

why is it necessary for me to use the Serial Number parameter?  What happens if I don't use it?  I've disabled the reporting options

0 Kudos
Message 7 of 9
(5,467 Views)

 


@chilidog wrote:

[...]

Since I don't want the tester to prompt an operator every time the probe station probes a device I'm using a callback which reads information from the probe station and this information is used as the DUT serial number [...]


 

Well, i thought this is exactly what you are after..... therefore my suggestion to use the default location for this information Smiley Tongue

 

Of course nothing "bad" will happen if you do not use this parameter of the PreUUT callback, but instead of bringing in new techniques which are customized, why not use default functionality?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 9
(5,447 Views)

Actually I don't need a serial number.  I'm getting X and Y coordinates from the probe station at this step and these values identify the device on the wafer.

0 Kudos
Message 9 of 9
(5,444 Views)