beye6976
04-19-2007, 01:03 AM
I am a Mechanical Engineering student who has recently undertaken an EE's problem. I am using a basic stamp II board of education to try and drive two applied motion step motors. I need to run one motor out a distance, run the other out and back in, and finally return the original motor to its starting point. I am able to run the motors in one direction using the example program:
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
DEBUG "Counterclockwise 10 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "All done."
END
But I can not get the motors to toggle and run in the opposite direction. I have tried using the HIGH/LOW command but have had no result. Could this be the result on not powering the BOE with the same supply as the motors. Any help with this would be great.
Post Edited By Moderator (Chris Savage (Parallax)) : 4/18/2007 9:23:25 PM GMT
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
DEBUG "Counterclockwise 10 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "Clockwise 2 o'clock", CR
FOR counter = 1 TO 2500
PULSOUT 14, 200
PAUSE 20
NEXT
DEBUG "All done."
END
But I can not get the motors to toggle and run in the opposite direction. I have tried using the HIGH/LOW command but have had no result. Could this be the result on not powering the BOE with the same supply as the motors. Any help with this would be great.
Post Edited By Moderator (Chris Savage (Parallax)) : 4/18/2007 9:23:25 PM GMT