LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extract fractional part of division

Hello,

 

I am trying to acomplish having the case show up TRUE, if input 2 is a close multiple of Input 1.  In the default case provided, the ramainder is 3.00001837.  I was attempting to extract the fractional part of the division and pass that value to the comparson block to activate the TRUE/FALSE case structure.  If the fractional part is less than 0.0002, then the case will be true, otherwise false.

 

Any help will be greatly appreciated.

 

Thanks,

hiNi.

0 Kudos
Message 1 of 5
(2,372 Views)

You have the Quotient and Remainder outputs switched. Also, you want Absolute Value, not Round to Nearest. You do not need the case structure. Just  wire the Less Than output to Boolean.

 

Lynn

0 Kudos
Message 2 of 5
(2,362 Views)

Hello,

 

I am still having a problem extracting the decimal values even after using the absolute block.

 

Any other help will be greatly appreciated!

 

Thanks,

hiNi.

0 Kudos
Message 3 of 5
(2,348 Views)

Try something more like this

!1.png

 

Quotient and Remainder is not really useful for floating point math


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(2,344 Views)

Here is the way I modified your VI.

 

Lynn

0 Kudos
Message 5 of 5
(2,330 Views)