Crunky Member C Join Date Feb 2005 Location Loxton Posts 1 Feb 21, 2005 #1 I need to scale a register from 0- 32000 to represent an engineering unit of 0-60. Any ideas ? Thank You
I need to scale a register from 0- 32000 to represent an engineering unit of 0-60. Any ideas ? Thank You
Doug_Adam Member D Join Date Sep 2002 Location Perth Posts 948 Feb 22, 2005 #2 What accuracy do you need? Method 1, very accurate. Convert to floating point, divide by 32,000 then multiply by 60. Method 2, not very accurate. Divide by 533, you get an integer value from zero to 60.
What accuracy do you need? Method 1, very accurate. Convert to floating point, divide by 32,000 then multiply by 60. Method 2, not very accurate. Divide by 533, you get an integer value from zero to 60.
Keeper523 Member K Join Date Sep 2004 Location Pittsburgh Posts 29 Feb 22, 2005 #3 In both cases you need to insure that your value is not equal to 0
Doug_Adam Member D Join Date Sep 2002 Location Perth Posts 948 Feb 22, 2005 #4 Zero in the neumerator should be OK.
Keeper523 Member K Join Date Sep 2004 Location Pittsburgh Posts 29 Feb 22, 2005 #5 your correct I apologize reation quicker than thought