06-29-2015 02:31 PM
I want to create a program that when an integer is input into the numeric constant, a floating-point number with all zeros to the right of its decimal point will light the LED on the front panel. The LED will remain unlit for any other floating-point number. I know I want to use a Round to Nearest function, but not sure where to go from there.
Solved! Go to Solution.
06-29-2015 02:35 PM
06-29-2015 02:38 PM
@rtufaro wrote:
I want to create a program that when an integer is input into the numeric constant,
You mean CONTROL, right?
You just need a type of rounding. Doesn't matter if you round up or down. So you just round and then compare the input to the rounded value. If they are equal, you light up your LED. So all you need is a numeric control, 2 functions, and a boolean indicator.
06-29-2015 03:30 PM - edited 06-29-2015 03:31 PM
Here is basically Gerds suggestion, but in plain LabVIEW.
Note that this (AND Tim's solution above) is only relatively safe for user-entered values. If the vaue is the result of some operations, you might run into typical issues with floating point math, so watch out for that.