LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I force decimal input from user?

I am working with a temperature controller that converts all user given setpoints to have an accuracy to the tenths place or one decimal (i.e. user inputs 36 controller reads 3.6).  Overcoming this has not been a problem but given my block diagram logic the user has to input the value they want and include the one decimal.  Other than verbalizing that with a note or sign on the front panel, how might I structure my "heatersetpoint" control box on the front panel to force them to enter a decimal even if it is zero (0.0)?  I have seen this type of forced structure at online banking sites so I know it can be done with code, but wondered if there was a quick and easy way on LabVIEW, maybe a preference or property change that I have missed?

 

Thank you,

 

Lakeisha

0 Kudos
Message 1 of 3
(2,690 Views)

This may be a little overboard but it does the trick.

You just make an Event Structure, that uses a value change in the user's inital input as the event.

Then divide the value by 10 (or multiply by 0.1) and using a property node change the value automatically. 

 

Message Edited by Cory K on 12-31-2008 09:57 AM
Cory K
0 Kudos
Message 2 of 3
(2,687 Views)

lakeisha a écrit:

I am working with a temperature controller that converts all user given setpoints to have an accuracy to the tenths place or one decimal (i.e. user inputs 36 controller reads 3.6).  Overcoming this has not been a problem but given my block diagram logic the user has to input the value they want and include the one decimal.   [...]


 

Is there any legitimate reason why you should do that ? I believe that handling the user input without constraint should not be an issue, whatever the "logic" in your diagram : take the input whatever it is, multiply by 10, round it and that's it.

This being said, there are a number of possible solutions. One of the most straightforward would be to mimic an old style wheel control as in the attached picture.

 

Message Edité par chilly charly le 12-31-2008 05:19 PM
Chilly Charly    (aka CC)
0 Kudos
Message 3 of 3
(2,678 Views)