NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically setting the Station process Model

Solved!
Go to solution

I've noticed in an existing post, that in order to dynamically set the active process model you use the property  Engine.StationOptions.StationModelSequenceFilePath. (Search for "How i can dynamically (at Run time) switch the Models?").

 

But where do you put the statement that sets it?

 

Thanks

0 Kudos
Message 1 of 5
(3,896 Views)

That might depend on why you need to change process models. When do you need to switch between process models?

 

-Jack

Message Edited by Capt. Jack on 07-09-2009 08:54 AM
0 Kudos
Message 2 of 5
(3,882 Views)

Hey Mike,

 

You will not want to change the process model when running a different process model.  But if you are creating a tool or something then this would be ok to do. 

 

You can place it in anything that accepts an expression.  So like a Status Expression, Expression Statement, Post Expression, etc...  Notice that you have to have an instance of the Engine.  So if you are chaning it outside of TS (like in LV or CVI or .NET) then you will have to create an instance of the Engine.

 

Just set that equal to the path like this:  

RunState.Engine.StationOptions.StationModelSequenceFilePath = "C:\\Program Files\\National Instruments\\TestStand 4.1.1\\Components\Models\\TestStandModels\\ParallelModel.seq"

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 5
(3,875 Views)

Hi Guys.  Thanks for your attention.

 

Please allow me to outline why I need to change the process model within the sequence file.

 

Basically I don't want to have the operator do it.

 

I've got multipurpose test stations in manufacturing that test several different products.  They're all tested using TestStand sequences which use the Sequence Process Model.  I am introducing a sequence for only one of the products that uses a customized version of the parallel process model.  

 

When the operator switches between products I don't want to make changing the process model something they need to do.  They will not have privileges to do so anyway.  I am hoping that I can change all the existing sequences to set the process model.

 

So for this situation where's the best place in the test sequence to set the process model?

 

 

0 Kudos
Message 4 of 5
(3,871 Views)
Solution
Accepted by mike_22

Oh yeah forgot to tell you in my last post-

 

You can make a sequence file require a specific process model.  So that no matter what the station model is set to the sequence file will always use the designated model you provide. 

 

With the sequence file that requires the new process model open go to Edit>>Sequence File Properties.  On the Advanced tab under Model Options select Require Specific Model.  You will then see a Model File box.  Browse to your new model and select it.  Click OK to exit.

 

Now every time that sequence file is opened it will use that process model regardless of what the station model is.

 

Hope this helps, 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 5 of 5
(3,866 Views)