LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with customizing the run time menu bar...!

Solved!
Go to solution

I am creating a UI and want to give all selectable options to user through cutomized run time menu bar.However,I am facing a problem with that:

 

If I click on any of the menu item in the customized bar, I am not able to select any other option till the execution of the first is over.For example for controlling the execution of a certain test if I give "run" and "pause" items under "test" in the menu bar and click on "run", the control does not come back to the menu bar for selecting other option ("pause" in this case) till the execution of the test gets over.Thus making "pause" option useless.Is there any way to overcome this?

0 Kudos
Message 1 of 11
(3,404 Views)

How are you handling the selection of a menu point?

 

You need to show us what you are doing, to be able to help you in the right way.

0 Kudos
Message 2 of 11
(3,394 Views)

I am customizing the run time menu bar as:

 

fp.JPG

and for programming it I am using user event structure:

 

bd.JPG

0 Kudos
Message 3 of 11
(3,382 Views)

One way to do that is to have your test on a separate While loop running in parallel, waiting for the signal. The menu option signal the separate While loop to start or stop the test. See image for example:

 

trig_menu.png

www.vartortech.com
0 Kudos
Message 4 of 11
(3,373 Views)

Hi Enrique,

 

Thanks for responding.Instead,can I use dynamic events concept here?

0 Kudos
Message 5 of 11
(3,370 Views)

Hey Enrique,could you please post the vi from which you have posted these images?

0 Kudos
Message 6 of 11
(3,368 Views)

Hi all, any suggestions on how to accomplish this?

0 Kudos
Message 7 of 11
(3,334 Views)
Solution
Accepted by mnx

Attach is the example.

www.vartortech.com
Message 8 of 11
(3,321 Views)

Thanks alot Enrique...Smiley Happy..Instead, Can I use dynamic events here?

0 Kudos
Message 9 of 11
(3,307 Views)

The problem in your code is that, as you have all you code inside the Event Structure. The Event structure can not handle more events until the code inside the structure has completed. So as long as the code inside the "Run" case is runing, your Event Structure can't do anything with you selecting of menu's.

 

As Enrique has suggested, you need to seperate your runing code from the Event Structure.

Just one commet to Enrique's code, don't use local variables to signal between to while loops. Use Queue's or Notifiers for that.

0 Kudos
Message 10 of 11
(3,267 Views)