From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-07-2012 02:32 AM
hi nijams,
I have modified some of the VI properties and I can open any SubVI even if other is running.
08-07-2012 02:35 AM
hi jcarmody
jcarmody's wrote
In that case, you can use a standard global variable, notifier, queue or FGV to communicate to all sub VIs that they need to close and handle whatever needs handling in them when the main VI is closed. Each sub VI can also handle their own Panel Close event in an Event Structure.
Can you tell me what is FGV??
08-07-2012 05:11 AM
FGV stands for Function Global Variable
http://labviewwiki.org/Functional_global_variable
https://decibel.ni.com/content/docs/DOC-2143
Did you give a try using boolean Globals to stop the sub vis ?
08-07-2012 05:35 AM
Hi
I have some suggestions:
1. the block diagram design is not the best approach. suggest you to use event strcutures. you can have a single event case handle more than a single event. attached image uses and event structure
2. in your design, if you do not close the sub vi, other sub vis cannot be opened. so, you can use dynamic vi calling as shown in the image attached with this post. you must set 'wait until done' to false.
3. i would suggest using functional globals to pass the 'panel close' event or stop event to the sub vis. for example, i had shown a global variable. you can write to the global variable in the event for panel close or for stop button event. pass this event value to the sub vis using FGV or a normal global variable.
this design will help you in scaling your code in future and to handle the user events in a better way.
Note: place your boolean controls correspondign to each event inside the respective event cases and set the mechanical action of the buttons to latch when pressed.
08-09-2012 02:11 AM
HI all
Thanks for your suggestions.
I will try it and come back to you.
Thanks agian.