NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to pass parameters between Process Model and dynamically assigned Main Sequence Callback

Solved!
Go to solution
Hello,

First of all let me state that I’m a newbie to TestStand and LabVIEW, and I’ve got a problem that has me stumped right now. 
I have searched through the discussion forums and haven’t really found anything similar to my problem.  I’m hoping that someone
on this forum can get me moving in the right direction.

First let me explain our use model here at work.  We use a common Process Model to handle all of the common sequences required
to test a UUT, such as PreUUTCallbacks for UUT setup and PostUUT Callbacks for standard report generation.  In the Process Model
we then have a MainSequence Callback for handling the Test Main Sequence which is custom for every UUT.  This Test Main Sequence
is usually comprised of a number of LabVIEW sub-Vis that do some specific test function of the UUT.

For my specifc problem I need to pass UUT information (Work Order and Lot numbers and UUT Serial Number) gathered from the Operator
UI and the Process Model into my Main Test Sequence.  I need to create a directory structure based on this information for storing
waveform data. 

The UUT information collected in the Process Model is stored as Local variables.  I’m trying to stick with keeping them Local to
the Process Model following the recommendation of using the smallest scope of variable that I can get away with.  I know I can make
the UUT FileGlobal, but I’m not sure what this might do to the number of existing test programs we already have, and I don’t want
to rewrite all the exsiting code.  Thus I want to mainly stick to Locals and Parameters, using FileGlobals, and stationGlobals very
sparingly. 

So I learned about using Parameters in my Main Test Sequence as a way to pass parameters from the Process Model into my Main Test
Sequence, and I thought great this is exactly what I want.  But here’s the problem that has me stumped.   Since we use a common
Process  Model with a different Main Test Sequence for every UUT, the Process Model uses a Main Sequence Callback to dynamically
assign the Main Test Sequence “File Path or Reference” using the RunState.ProcessModelClient expression.   Thus the Parameters I
create in my Main Test Sequence don’t show up in the Paramet Name list in the common Process Model’s Step Settings pane.

Has anyone ever needed to something similar to this, and what did you do to solve this problem?  If I’ve left out any details that
are important please let me know. 

Thanks in advance.
0 Kudos
Message 1 of 3
(4,615 Views)
Solution
Accepted by topic author Senor_Bob

Hi,

 

From your MainSequence, you can access your locals from your ProcessModel sequence by using

RunState.Root.Locals, eg if I have a Local variable in Single Pass call Model_Number, then I can access it by using RunState.Root.Locals.Model_Number

 

Hope this helps

Ray Farmer

Regards
Ray Farmer
Message 2 of 3
(4,610 Views)

For sequence calls that are specified by expression (as is the case in this case), you need to load the parameters for the sequence call step from an existing sequence (i.e. of the prototype you will be calling) using the Load Prototype button of the sequence call settings panel (located in the lower right corner on recent versions of TestStand).

 

Hope this helps,

-Doug

0 Kudos
Message 3 of 3
(4,593 Views)