07-08-2009 04:55 PM
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
Solved! Go to Solution.
07-09-2009 07:54 AM - edited 07-09-2009 07:54 AM
That might depend on why you need to change process models. When do you need to switch between process models?
-Jack
07-09-2009 09:36 AM
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"
07-09-2009 10:53 AM
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?
07-09-2009 12:57 PM
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,