LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RunTimeMenu and Pop-Up Window

Hi Everyone,

I have been working on this concept for a couple of days but I dont seem to get to where I want.

I have made a customed run time menu to a MainVI that is able to call 2 subVIs Z-Control and GraphSignal.

I can call the subVIs and then open them, both from the MainVIs menu tab while running (Module-MainSettings-GraphSignal) and the PopUp button. But when I close the subVIs front panel, I cannot open them again from the PopUp button or the mainVI menu tab.

I have played around with Vi properties, VI Call Setup and SubVI Node Setup but in vain. My code is attached. I use labview 2011.

What am I not doing right? Any suggestions will be highly appreciated.

 

 

0 Kudos
Message 1 of 2
(2,438 Views)

(Some of the ) problems to fix:

  • You should use a LabVIEW project to accommodate your files properly
  • That parallel While loop does not make any sense below the Event loop. It does not have any function. Delete it (not the buttons inside)!
  • Use that Stop button inside the Event structure, assign an Event to the Stop button to stop your main VI.
  • Put the POP button inside the corresponding Event case!
  • Your Timeout case does not do anything, delete it!

The reason you cannot open dynamically your subVIs after the first successfull open is that, you just did not program any stopping mechanism for these VIs! So when you close these subVIs via the top right "X" symbol, the only thing happens is you close its window Front Panel, but the VI is still running in memory. So when you try to open it second time of course nothing happens: it is still running with closed front panel.

You need to program a proper stopping mechanism for these subVIs, like using the template "Dialog Using Events". Here you could use the "Panel closed?" event to capture when the user wants to stop the VI...

 

EDIT: very important: never use the red "Abort" button to stop your VIs! Always program a stop properly! See this example for a main VI Event loop (no need for that Stop button, just use the "X" to stop the VI running):

 

rrrrrrrr.png

 

0 Kudos
Message 2 of 2
(2,386 Views)