Lon: Thanks for the help. You said there was a ramping program to experiment with for the MMBe. I need to speed up and down, in stages, the 12 vdc motor that's in my project... a linear actuator that travels back and forth. I don't want to start the motor at full rpm and stress the motor and circuits. Please post when available.
Page 1 of 1
ramping 12 volt dc motor
#2
Posted 25 April 2006 - 09:02 AM
Here's some code fragments for the MMBe that should work for your application. You may have to check some syntax with the BS2 manual, but this should get you where you need to go
SPEED VAR BYTE
FM CON 7'pin#
BAUD CON 1021'baud value bs2p 2400BPS
PAUSE 500
START:
RAMP_UP:
FOR SPEED = 0 TO 250 STEP 10
SEROUT FM,BAUD,[$55,$03,SPEED]
PAUSE 100
NEXT
RUN:
PAUSE 6000
RAMP_DOWN:
FOR SPEED = 250 TO 0 STEP -10
SEROUT FM,BAUD,[$55,$03,SPEED]
PAUSE 100
NEXT
WAIT:
SEROUT FM,BAUD,[$55,$01]
PAUSE 2000
GOTO START:
SPEED VAR BYTE
FM CON 7'pin#
BAUD CON 1021'baud value bs2p 2400BPS
PAUSE 500
START:
RAMP_UP:
FOR SPEED = 0 TO 250 STEP 10
SEROUT FM,BAUD,[$55,$03,SPEED]
PAUSE 100
NEXT
RUN:
PAUSE 6000
RAMP_DOWN:
FOR SPEED = 250 TO 0 STEP -10
SEROUT FM,BAUD,[$55,$03,SPEED]
PAUSE 100
NEXT
WAIT:
SEROUT FM,BAUD,[$55,$01]
PAUSE 2000
GOTO START:
Share this topic:
Page 1 of 1

Help










