NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

teststand 2012 plugin architecture

"How do I create the configuration entry point in the plugins(to avoid editing Process model) which shall reflect in the Configure menu of seq. editor ...??"

 

Currently this still requires a (very small) modification to the model. Alternatively, you can add menu items to the tools menu without modifying the model.

0 Kudos
Message 11 of 14
(1,357 Views)

James,

Thanks for your replySmiley Very Happy

 

1) In parallel process model the controller thread and socket thread both executes the ModelPlugin-Begin and ModelPlugin-End. I have a step in the "ModelPlugin-Begin" entry point of a plugin which opens a reference to an instrument. So this step is executed by controller thread & socket thread two times. That means socket thread is again opening the reference to the instrument which is already opened in controller thread..?? If so how can I avoid it ..??

 

2) In one of the plugin(add-on) sequence file, the FileGlobals.ModelPluginComponentDescription.Default.Base.Enabled is been set to False and saved. But still the Process model invokes this addon instance. How can I disable the addons/plugins from being called in the process model rather than deleting the addon/plugin ..??

 

3) I have two addons say A.seq and B.seq  set with different Run Order(FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder), A.seq with 1 and B.seq with 2. So A.seq should be invoked first and then B.seq. But in ModelPlugin-Initialize entry point the B.seq is invoked first and then A.seq. Later execution will be as expected like ModelPlugin-Begin- A.seq then B.seq and so on... Why the order of execution is not as expected in ModelPlugin-Initialize ..?? any other way to change the order of execution of plugins/addons...??

0 Kudos
Message 12 of 14
(1,339 Views)

1. Only do your initialization if Parameters.ModelThreadType.IsController is true.

 

2. The purpose of an addon is to alway run without requiring the user to enable or configure it. You could do one of:


a) Use a non-addon plugin instead.

 

b) Move the file in and out of the addons directory.

 

c) Set the value of Parameters.ModelPlugin.Base.Enabled at runtime in your Model Plugin - Initialize entry point.


3.The RunOrder property can be changed in Initialize, but does not apply to Initialize. Perhaps you could move your order dependent actions to Begin?

Message 13 of 14
(1,333 Views)

Someone private messaged me concerning having a plugin in an arbitrary location. I can't find the mechanism to reply directly.

 

I'm not in context on this topic anymore so all I can say about that is that it isn't supported functionality, but the source code for the model plugin mechanism is provided and you can search through it to find out how this part works.

 

Also, instead of making it find a plugin in a non-standard location, perhaps it would be simpler to copy/synchronize from your source control location to the required location?

0 Kudos
Message 14 of 14
(569 Views)