LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Associate Numbers with Ring Menu Items

I made a ring menu control for various machine types, where the menu items are all just names. However, depending on which machine it is, I want to be able to associate a number with the machine, such as 0.1, 0.2, 0.3...so I can use this number in a calculation later on in my program.

 

How can I go about doing this?

 

Many thanks and kudos to anyone who can help.

0 Kudos
Message 1 of 4
(2,877 Views)

A menu ring control is a U16 numeric with a fancy cover on the front panel.  If you do not allow undefined items you can probably do some simple math on the ring value to get your machine number.  For the example you listed ( 0.1, 0.2, 0.3, ...)  you could use machine# = (ring + 1)/10.

 

Lynn

0 Kudos
Message 2 of 4
(2,874 Views)
  1. right click the ring control and set the representation to "DBL". The terminal will turn orange.
  2. right-click the ring control and select "edit items"
  3. uncheck "sequential values"
  4. enter the numeric value for each item as desired.

 

0 Kudos
Message 3 of 4
(2,872 Views)

Change the ring control to a double, uncheck Sequential Values and you can type in floating point numbers like 0.1,0.2 etc

0 Kudos
Message 4 of 4
(2,870 Views)