LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Increment numeric input between set values

I am making a camera calibration application. Want to force the numeric input to scroll between 10 different set values for the camera exposure. Under the "Data Entry" tab (properties for the numeric input) I can set a Min, Max & Increment value. If I set the Increment too big I skip a bunch of the low range values and if I set it too small I have to click the increment arrow a lot before it changes. Any suggestions on how to make it just increment between 10 different set values (like a table with the 10 values in it)?

0 Kudos
Message 1 of 6
(3,351 Views)

What you do will likely depend a lot on how you have your application set up but would you be able to use a numeric array and auto increment through those values?

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 6
(3,328 Views)

If this is strictly for a GUI, then I would just use a Ring.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(3,297 Views)

Due to not using arrays like this before has me stuck! Here is what I came up with. I have the Array off to the side so it is not viewable when the program is running. Filled in the 10 values used. Set the Index input to only go between 1 and 10. It outputs the exact setting for each click.

 

 

Capture.JPG

0 Kudos
Message 4 of 6
(3,289 Views)

@JohnPaulJones wrote:

Due to not using arrays like this before has me stuck! Here is what I came up with. I have the Array off to the side so it is not viewable when the program is running. Filled in the 10 values used. Set the Index input to only go between 1 and 10. It outputs the exact setting for each click.

 

 

Capture.JPG


If that is how you are going to do it, I stand by my suggestion of using a Ring.  It would eliminate the need for that array and the Index Array and give you a nice drop down so you know what values you can select.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(3,280 Views)

Hi John,

 

I have the Array off to the side so it is not viewable when the program is running.

Hide the array - or convert it to a constant to have better, self-documenting code!

Or follow the very good advice on using a ring…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,277 Views)