LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get a list Box from two values Min and Max

Hi! 

I have two controls Min and Max (int), I want to have the range of values between these 2 values in a list box.

For example : if  Min = 10 and Max = 20 , i want to have, as an indicator, a list box where there are all the values (int) between 10 and 20 (10,11,12...20).

Thank you in advance for your help. 

 

0 Kudos
Message 1 of 5
(2,838 Views)

Hi

 

Looking for something like this?

 

Range Listbox.png

 

Regards

 

J

0 Kudos
Message 2 of 5
(2,829 Views)

Hi samehA,

 

if  Min = 10 and Max = 20 , i want to have, as an indicator, a list box where there are all the values (int) between 10 and 20 (10,11,12...20).

- create an array of your numbers

- convert that array to strings

- set those strings in your listbox using a "item names" property node

Which of these steps is a problem for you?

 

Edit: As you got a solution in the mean time I can suggest a variant too:

check.png

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(2,828 Views)

Didn't think of the ramp.. this is why you're a Knight i guess! Smiley Wink

 

Cheers

 

J

0 Kudos
Message 4 of 5
(2,816 Views)

Hi J,

 

Didn't think of the ramp.. this is why you're a Knight i guess!

The ramp is just for fun, using the FOR loop as you did is my preferred way too.

But I'm a Knight because I would place the Add function after the loop - it's polymorphic… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(2,811 Views)