LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a menu

Hello!
How can we create a menu where we can choose more than one alternative from the menu? We have a textfile from which we pick out different signals. These signals we want to create a menu from (that is, we want to see these on the menu). Then we want to be able to choose one or moore of these signals, and then use them. Anyone got a tip for us? Best regards!
0 Kudos
Message 1 of 8
(5,558 Views)
Anyone?
0 Kudos
Message 2 of 8
(5,549 Views)
Hello Ex-Jobb,

you can have checkmarks on your menu items. You can control them with "Set Menu Item Info".
So you can make a menu and set a checkmark, when the user selects on of your options. When the user finally
selects a start button (or whatever) to start your measurement, then all menu items with checkmark are selected...

It's helpful to remember the checked items in a global (or shift register of your while loop controlling the menu).

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 8
(5,543 Views)
Hello GerdW 🙂

How can we take from a stringarray and get the strings in the menu? We would like to use Menu Ring but then one can not choose more than one alternative, right?
0 Kudos
Message 4 of 8
(5,533 Views)
Hello Ex-jobb,

you have to differentiate between a "menu ring" and a "menu". Do you want to have a menu ring on the front panel or do you want to change the runtime-menu of the vi?

My last reply uses the runtime-menu, which you can change before you "compile" your vi (Edit->Run-Time Menu). But you can also change it in runtime via the functions in the menu palette (in Application control palette). So you can insert your options from the text file to the menu, check the user input and set checkmarks on those menu items.

When using the front panel there will be several options too. One I can think of consists of two arrays, one array indicator of strings with your options and one array control of boolean switches (perhaps Dialog checkbox from classic controls). You can read in your text file, display the strings in this array indicator and the user sets the appropriate checkboxes. With some property nodes you can adapt the shown number of elements (of both arrays) to the number of strings. But be aware: it's tricky to change the size of dialog checkboxes (there are threads on this in the forum).

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(5,526 Views)
Hello!

What is a runtime menu? Is that one that updates during the time the program runs?

Best regards.
0 Kudos
Message 6 of 8
(5,523 Views)
Hello Ex-jobb,

"menu" means the line with "File, Edit, Operate, Tools, Browse, Windows, Help" at the upper border of a vi window...

You can change this with Edit->Run-Time Menu or with the described functions from the menu palette. It's called "Run-Time Menu" because you can change this only for the runtime of a vi. When in edit-mode you are always stuck to LabView standard menus.

Best regards,
GerdW
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(5,517 Views)
Ahaa!!

Alright 🙂 No that is not how we meant. We want to create a menu (a list to say) in our frontpanel where from we can choose different signals. So that is what we are trying to do 🙂 So we keep on with your first suggestion with the two arrays with indicators and boolean knobs that is controllers. We think that might be something to work on. Thank you for your help 🙂
Best regards
0 Kudos
Message 8 of 8
(5,512 Views)