01-26-2009 02:55 PM
Hi
I'm developing a user interface for a programmable telecom instrument. It is a highly versatile instrument as it can be loaded with 8 different kinds of subsystem.
I developed a vi for each kind of subsystem. As I can't know in advance the configuration of the instrument I'm trying to load one at a time the vi corresponding to an existent subsystem in a subpanel.
I get 2 issues:
First issue
When I use the method:run VI the vi is restarted. It works great for the first call but after I would like instead the vi to keep running in memory and display its front panel in the subsystem pragmatically without restartind it.
Second issue
I can't figure out how to get multiple instances of the same VI in memory with their dedicated set of data. For example the telecom instrument can have 8 independant subsystem of the same kind so I would need to load 8 copies of the same vi with 8 different set of data.
I enclose a simplied version of my program.
Thanks
Charly
Solved! Go to Solution.
01-26-2009 03:01 PM
CharlyStardust wrote:Second issue
I can't figure out how to get multiple instances of the same VI in memory with their dedicated set of data. For example the telecom instrument can have 8 independant subsystem of the same kind so I would need to load 8 copies of the same vi with 8 different set of data.
Settng the subsystem to 'Reentrant' should do the trick. (in LabVIEW 8.5+ don't share clones).
Ton
01-26-2009 04:12 PM
Hi Ton,
I set my 2 subVIs to reentrant (preallocate clones between instances; maintains state for each instance)
How do you get a new instance? I get error 1000 "The VI is not in a state compatible with this operation." when I call a second instance of the same vi.
I may fix the first issue too.
Charly
01-27-2009 11:09 AM
Charly,
Here is a KnowledgeBase that gives a couple solutions to the error 1000 that you are receiving.
01-27-2009 01:35 PM
First issue
The method:run VI needs to be used only once to load the VI in memory then use only method:insert VI to display the VI in your subpanel dynamically.The VI keeps running and updating the controls’ values. Great!Second issueTo get multiple instances of the same VI in memory with a dedicated set of data you have to set the VI as reentrant. I chose VI properties->execution-> reentrant (preallocate clones between instances; maintains state for each instance)To get rid of the error 1000 you have to prepare the Open VI Reference Function to open a reentrant vi by setting the “option” input parameter as 0x08 That’s it!
Thank you Jon and Ton
Charly