NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing information between Process Model and ModelSupport sequence

Hi All,

 

I have a vi that is called during PreUUT to acquire various pieces of user input. I want to have this information available to my results plugin. I am modifying the process model, not using callbacks.

 

The process model is based on the sequential process model. I am trying to pass information into the "Model Plugin - UUT Start" sequence but I have discovered it is a runtime call and the file path is only available at run time.

 

I am obviously going about this the wrong way. How should it be done?

 

Thanks

 

0 Kudos
Message 1 of 4
(2,613 Views)

Presuming the information is per-socket, add a field to the <MyPlugin>PerSocketRuntimeVariables data type in your plugin. In PreUUT, iterate through Parameters.ModelPluginConfiguration.Plugins until you find the element with Parameters.ModelPluginConfiguration.Plugins[Locals.PluginIndex].Base.SequenceFileName == "YourPluginSequenceFileName.seq"  (there could be more than one if you've configured more than one instance of your plugin)

 

Then set

Parameters.ModelPluginConfiguration.Plugins[Locals.PluginIndex].PluginSpecific.RuntimeVariables.PerSocket[RunState.TestSockets.MyIndex].YourNewProperty = DataYouDetermineInPreUUT

 

Now, you can get the data in your plugin entry points at Parameters.ModelPlugin.PluginSpecific.RuntimeVariables.PerSocket[RunState.TestSockets.MyIndex].YourNewProperty 

0 Kudos
Message 2 of 4
(2,608 Views)

Thank you for the detailed response James. I must admit I found it a little hard to understand. I am still fairly new to Teststand.

 

With your method, does that mean I have to modify "ModelSupport" sequence? Ideally I don't want to touch that sequence.

 

I have managed to programmatically add my data to the Additional Data container. This field is already included in all sequence files.

 

Thanks

0 Kudos
Message 3 of 4
(2,591 Views)

You don't need to modify ModelSupport.seq

 

You should be able to set the data in the VI you mentioned or alternatively, in the PreUUT callback that calls it.

 

Now, if you were already calling your vi from ModelSupport, then it begs the question of why you don't just call it from your plugin to begin with instead. If the answer is that you want the data shared by multiple plugins and only computed once, you could either used some sort of global variable in your code module (at which point it is a LabVIEW question and out of my jurisdiction), or you could compute and set the data in an "add-on" plugin that always runs first. Most likely, this is not what you meant. In that case, just ignore what I said in this paragraph.

0 Kudos
Message 4 of 4
(2,572 Views)