06-18-2018 03:46 AM
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,
Solved! Go to Solution.
06-18-2018 10:51 AM
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: https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Create-a-configurable-Model-Callback-list/idi-p/...
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,
06-18-2018 03:17 PM
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:
06-25-2018 05:23 AM
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.
06-25-2018 10:21 AM
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.
06-25-2018 11:03 AM
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!