07-26-2016 05:23 AM - edited 07-26-2016 05:25 AM
I'm using a subpanel in my program which opens in the consumer loop. when the program is stopped the reference to the VI in the subpanel is closed, however when i then go to open the vi which I run in the subPanel I can't open it as it is still in memory or something. this mean i have to close all of labview down just to switch VI's. Does anyone know why my subpanel VI isn't closing correctly?
Labview 14.0
Thanks
Solved! Go to Solution.
07-26-2016 06:26 AM
Anyone?
07-26-2016 06:28 AM - edited 07-26-2016 06:32 AM
Closing the reference to the VI in the subpanel is not enough. You need to tell the VI to stop executing. Typically for this I would use a user event/queue and pass the reference into the VI but you could also have a 'shutdown?' FGV.
Edit: Also, your Variant 1, 2, 3 etc. is surplus to requirements. You could have a single 'data' variant and give it a cluster containing the 3 different elements which you then convert using variant to data in the 'process video and data' case of your state machine.
07-26-2016 07:13 AM
Okay thats sounds great, just to clarify what you mean however as I'm reasonably new to labview. I've now put a stop function in my lower level VI which is in the sub panel so that when i hit 'stop application' it stops the program running. This works, however ideally i would like to stop it also when i press the stop button on the top level VI. Do I do this by passing an input in the to the start asychronous call function which could be a boolean and would then make a 'stop app' case in the subpanel VI. Or does the inputs to the subpanel only get passed once?
07-26-2016 07:43 AM
07-26-2016 08:52 AM
Hi, thanks for replying! I just read most of the post and I don't see how that is relevant to the issue i have. Forive me if it's obvious. All i need to do is pass a stop boolean to a subpanel VI which will then use that in an event driven state machine to stop the VI running. How does what you link solve that, also I can't afford to be changing the whole artitecture of my VI.