NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Passing information between Main Sequence and Model Plugin

Go to solution

Hello everyone,


i have a problem concerning the passing of values between my model plugin and my main sequence. I am a newbie to Teststand, so i hope you can help me a bit here.


At the beginning of the test we need some information for the UUTs, for example LOT code and article number. So i created a LabView VI that collects the required information. I first did this in our Process model - PreUUT Callback. But i want to outsorce this steps to a model plugin, so we can use it with different Process models (at the moment we are just using the Sequential model). I thought i put it in the Model Plugin - Begin Sequence because i also have to define the logging database path, but i have no clue how to pass the data from the Model Plugin to my main sequence. 


Should i make a station global container for all the specific company data ? Or is there a better way, maybe to add additional data to the parameters of the Sequence ?


Many thanks in advance,



0 Kudos
Message 1 of 6

Because the Model Plugin is a process model type of sequence file you can create a model callback in there.  Then override it from the client file.  It won't show up green in the client unless you add it to the process model.


I put this on the idea exchange but it hasn't gotten much traction:


I really thing in order to truly make this a component/plug-in based application NI should make it so you can do callbacks in the model plugins without modifying the process model.


Let me know if you have any questions,

~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
Accepted by topic author StevieP

If a new callback is not desirable, you can still access your model plugin configuration data from your test sequence with a little digging.

1) Get the ModelPlugInConfiguration. This is available at RunState.Root.Locals.ModelPluginConfiguration.

Alternatively, it is also passed as parameter to existing callbacks, such as Pre UUT. You can save a reference to it there into a file global.

2) Iterate the Plugins array sub-property of the ModelPlugInConfiguration until you find the one where
ModelPlugInConfiguration.Plugins[locals.Index].Base.SequenceFileName == "YourPlugingFileName.Seq"

Note that there will be more than one match if you have more than one instance of your plugin configured.

3) Use the index to get to your plugin data, such as:

Message 3 of 6

Thank you very much for your answer!


I wanted to avoid overriding a model callback from the client sequence file, because it is necessary to do in every client sequence file i use. So i want that the process model does all the things, and the client sequence file only PCB-specific executions.


But i have another question concerning Process Model/Model Plugin Callbacks:


Is it practicable to make one "big" Model Plugin Callback for all my stuff i have to do every time ? (Set DatabasePath in Model Plugin - Begin, Get Fixture-Code/LOT-Code in PreUUTLoop, Get Serialnumber in PreUUT, Log to Database in PostUUT,...)

So it would all be in a Model Plugin Callback, and i don't have to make much customization in the different Process Models. 


Thank you,

Best regards,


0 Kudos
Message 4 of 6

I'm not sure I understand the question. All three models call all the model plug-in entry points. If you create a model plug-in file, you are free to put steps for various tasks in the different entry points, even if the tasks aren't related.

0 Kudos
Message 5 of 6

Yes i know this, thanks. My question was if it is wise to do it like that, or if it's better to do it in the Process model.


My decision is now to put everything i could in Model plugin callbacks, i hope this works. Otherwise you will hear from me 😉


Thanks for all your answers!


Best regards,




0 Kudos
Message 6 of 6