LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Comparisons

The attached VI is designed to ask a question with the string control, get a numeric input from the user and determine whether the numeric input is greater than 10M (10 X 1,000,000) or not.
 
Can anyone tell me why, if you enter 10.1, the VI determines that the entry is less than 10M?  How can I fix it?  Let me know if you have any questions.
 
Thanks,
 
Drew
0 Kudos
Message 1 of 3
(2,558 Views)
Your problem lies in the fact that you're using "Decimal String to Number" to convert the string to the number (integer...that should tip you off 🙂  ).  Change it to "Fractional String to Number", and your problem should go away.

Another thing, is that it doesn't consider 10.1 (consequently 10 in the current case) to be LESS than 10M, it's just not greater than 10M.  You may want to change your comparison to "Greater than or Equal" depending on what functionality you're looking for.
0 Kudos
Message 2 of 3
(2,556 Views)
Thanks!  That was an easy one.  I have other problems that may be much harder to solve.  I'll get back to you guys on those.
0 Kudos
Message 3 of 3
(2,553 Views)