Math Help Please


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Divide by 5252, not multiply it.

    RPM = 12000
    STRAIN = 210
    TORQUE = 140
    VALUE = 5252

    A = STRAIN * TORQUE
    B = RPM
    C= A * B
    C= C DIV32 VALUE

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by markcadcam View Post
    Divide by 5252, not multiply it.
    I knew that
    Ok,
    12000 x 210 x 143 = 360,360,000 which will fit into 31/32 bits.
    but that result x 100 won't...so...
    x100 /5252 is the same as x25 /1313
    rpm x strain x torque / 1313 x 25 = result (with decimal point shifted over)
    assuming you've used LONG variables.

  3. #3
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Where is the x100 coming from?

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by markcadcam View Post
    Where is the x100 coming from?
    Another...'OH YEAH' moment just happened.
    You've already got the 'torque' value multiplied up for the decimal point.
    Disregard the stuff about x100/5252.

    12000 x 210 x 143 = 360,360,000 which will fit into 31/32 bits even when getting maximum values.
    Divide that by 5252 and you get 68613, which is 100x too much, right?
    So divide that by 100, gives you 686, take the remainder (modulus) and you get 13.
    Should be easy enough to display that (until you get to the leading zeros...PBP CAN handle that too if you read far enough into the LCDOUT and/or SEROUT section of the manual).

  5. #5
    Join Date
    Feb 2006
    Location
    Ohio
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    I think I got it now. Thanks for the help.

    Mark

Similar Threads

  1. Resolution integer math assistance?
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th January 2010, 03:01
  2. Line Graph, math problem...
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th May 2009, 04:20
  3. Pulsin Math question
    By ruijc in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 2nd April 2008, 16:15
  4. PBPL Math...new math takes more cycles...Always?
    By skimask in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th February 2008, 10:22
  5. not quite understanding the MATH function
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th January 2006, 20:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts