08-29-2015 09:21 PM
Hello
I need help from one of you guys which is how can I do a LED light works when I use integer numbers like ( 1, or any integer value ), and turns off when I use non-integer numbers like ( 0.6, or any non-integer value )
Thank for any help...
08-29-2015 09:23 PM
Compare the number to the rounded version of itself.
08-29-2015 09:28 PM
Sounds a lot like this topic. Is this the same calculator?
08-29-2015 09:34 PM
Thank you so much for every one who is trying to help me, but I am new in using this programe this is why I hope from u to give me more explanation,,,,
I use labview 2014
08-29-2015 09:35 PM
I do not think so
08-29-2015 09:48 PM
Is the number equal to the number when you round it to the nearest integer. Yes? It must be an integer. No? It must not be an integer.
08-30-2015 01:32 AM
hi,
1. Divide your number by 1, use 'Quotient & Remainder' function.
2. If the remainder = 0 then LED is ON otherwise OFF.
Note: Change the data entry if you want it only for positive numbers
See the attached VI.
08-30-2015 01:50 AM - edited 08-30-2015 01:50 AM
Of course all this only works well if the number is not derived from a calculation involving fractions. For example, the following will deny that 1 (e.g. 10x0.1) is an integer.
You need to be careful!