LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control every digit of a numeric panel

Solved!
Go to solution

As it is shown in the pic, how to make

pressi S1 to control the highest digit of the number, so I can edit it.

pressi S2 to control the 2nd highest digit of the number, so I can edit it.

.......

pressi S6 to control the lowest digit of the number, so I can edit it.

 

Thanks a lot~

Snipaste_2019-03-27_16-02-56.jpg

0 Kudos
Message 1 of 3
(2,579 Views)
Solution
Accepted by whily

Hi,

you cannot follow your approach directly, i.e., limit editing to one digit. What you could do instead is, e.g., make use of a popup panel with a regular numeric control where you enter a number between 0 and 9. Then you use this number with the appropriate math (displayed number = s1-value + s2-value / 10 + s3-value / 100 ...) to calculate and display the new value on your panel.

0 Kudos
Message 2 of 3
(2,572 Views)
Solution
Accepted by whily

As an alternative approach I made up a quick and dirty example that leverages the increment value attribute to permit editing the individual digits of a numeric:

 

Screenshot 2019-03-28 09.39.43.png

 

This example does not handle the digit rollover as probably your instrument does (i.e. when incrementing hundredths it moves tenths as well: 0.080, 0.090, 0.100, 0.110....) since it actually operates on the numeric value and not on the digits.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 3
(2,531 Views)