If LastW0.15 = 1 then the result is negative.
I'm not familiar with your display, so I don't know how to show the minus sign.
<br>
If LastW0.15 = 1 then the result is negative.
I'm not familiar with your display, so I don't know how to show the minus sign.
<br>
DT
Thanks a million Sir Darrel Taylor. My project is over.
i add this line,
Now my next step is "Calibration Factor" with Pitch of machine's screw.Code:If LastW0.15 = 1 then E6 = $BF ELSE E6 = $FF ENDIF HC_Latch=0 shiftout HC_data, HC_Clk, MSBFIRST,[E1,E2,E3,E4,E5,E6] pauseus 1 HC_Latch=1 '--------------------------------------- ' endif GOTO LOOP
I will start it Using Floating Point
Thanks again.
I doubt that you need to use Floating Point.
It's a real pain.
Do you know the numbers yet?
pulses/mm or something like that?
<br>
DT
Sir my plan is,
When motor's pully moves 68 turns then Screw( worm gear ) turn 1 time.
Screw = 6 TPI ( then plateform moves 1 inch = 25.40 mm )
so 1 turn of screw = 25.40/6 = 4.233333 mm.
so 68 turns of pully = 4.233 mm
so 1 turn of pully = 4.233/68 = 0.062205882 mm
I will attach encoder of 6 PPR direct to motor pully.
code
pitch var word
pitch = 10368 ; (62208 / 6 = 10368)
dummy var word
loop: dummy = (pitch * ABS(lastw0))
w1 = div32 10000
so w1 = .01 mm least count
motor's 68 turns = encoder's 408 turns (10368 * 408 )/10000
so plateform moves 4.230 mm
This is my calculation
.
Last edited by precision; - 13th July 2007 at 14:01.
Oh, OK.
I thought you meant the microchip Floating Point routines.
Sounds like you got it covered.
<br>
DT
Bookmarks