LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling certain functions from a drop down menu

I am using the run-time menu along with case statements to control the flow of my program.  I would like to ensure that a certain option is disabled until a number of other options have been selected.  It is for a near field emissions scanning program.  Basicly I would like to make sure that the file path and any notes about the sweep (product serial number, position, mode) are entered prior to selecting "run sweep" from the drop down menu.  I know that an option can be disabled permenately by selecting disabled and grayed while the run-time menu is being setup, but this not what I want to do.  I simply the "run sweep" option to be disabled until the sweep info and file path have been setup.  How can I go about doing this?  Thanks everyone!
 
 
 
Kirk Fabbri
Associate EMC Test Engineer
Gentex Corporation
Zeeland, MI
(616)772-1800 ext 4571
0 Kudos
Message 1 of 6
(3,436 Views)
Use the "Disabled Items [ ]" property node.  Wire in a numeric array of the item numbers to be disabled.  The list starts with 0.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 6
(3,436 Views)
What class is the disable items under?  I really have hardly ever used the property node functions in LabView so any help will be appreciated. 
0 Kudos
Message 3 of 6
(3,424 Views)
On the block diagram, right click on the list control, select Create -> Property Node.  Usually this will create a Visible property node.  Left click on the word Visible, and select Disabled Items [ ] from the list.  Then right click again and select Change to Write.  You can then wire a numeric 1D array into the property node.  Whatever numbers are in the array, those corresponding elements in the list will be disabled.  So you can disable whatever you want before a certain action, and then use the property node again to enable items after the action is done.  To enable all items, wire in an empty numeric array.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 6
(3,420 Views)

Everything looks good except I am using the menu function...another wards the menu options show up on the top of the VI only when you run the VI...None of the menu options are on the front pannel...You set up the run time menu by going to edit-- Run Time menu, which allows you to select certain options to use... Will this method you suggested work with the menu control method?? Thanks again!

 

Kirk

0 Kudos
Message 5 of 6
(3,417 Views)

No, I don't think you can get property nodes for the menu bar.  Why don't you switch to using Text Rings or Menu Rings on the front panel instead of a menu from the menu bar.  Then you could use the property nodes.  If using menu bar, you would have to test for certain things before taking action and display messages to the user to select certain things before selecting others.  All in all, front panel menu items are better than menu bar menus for your purpose.

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(3,404 Views)