DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Helper Loop and cloneable modules

Solved!
Go to solution

Thank you Darren.  I thought the rule was if a subVI DOES maintain state in a cloneable module that it should be set to preallocated clone and if it doesn't maintain state that is could be a shared clone or even a non-reentrant (like the request/broadcast VIs).

 

Since these VIs need to maintain the specific event references for the specific module instance, I am approaching this as if they all need to maintain state.  Thus I have been setting every local event VI to preallocated.

 

Again, this is specifically for cloneable modules that need the helper loops to maintain their individual instance timings.

 

Please correct any errors in my logic.  Thanks

0 Kudos
Message 31 of 32
(477 Views)

Since cloneable module instances are launched dynamically, the preallocated vs. shared clone setting doesn't really matter.

 

If you're wanting to maintain state locally within a cloneable module main VI, I'd suggest using a (properly initialized) shift register (on the MHL or helper loop) instead of trying to store that state in a subVI. You never know when a cloneable module shuts down and a new one starts up if the same instance will be used from the clone pool and mess things up.

 

For state data that is shared globally across all instances, that's when my recommendation of the non-reentrant setting applies.

 

Message 32 of 32
(475 Views)