Shop OBEX P1 Docs P2 Docs Learn Events
step-u motor controller — Parallax Forums

step-u motor controller

B WolfB Wolf Posts: 4
edited 2009-09-10 17:42 in BASIC Stamp
I am using a BS2p40 and a step-U to drive a stepper motor.· My question is in regards of the remote operation of the step-U using the IP1 & IP2 ports for direction and steps.·
·The following is used to initialize the step-U
· 'StepU#1· -- wire pull
· LOW O_SU1_Sin··························· ' set StepU#1 input low
· LOW O_SU1_IP1
· LOW O_SU1_IP2
· SEROUT O_SU1_Sin,SU_Baud,[noparse][[/noparse]"{A,0}"]······ ' StepU#1 speed 0
· PAUSE 250
· SEROUT O_SU1_Sin,SU_Baud,[noparse][[/noparse]"{B,0}"]······ ' StepU#1 ramp time 0 seconds
· PAUSE 250
· SEROUT O_SU1_Sin,SU_Baud,[noparse][[/noparse]"{C2}"]······· ' StepU#1 half step mode
· PAUSE 250
· SEROUT O_SU1_Sin,SU_Baud,[noparse][[/noparse]"{P1}"]······· ' StepU#1 powered windings
· PAUSE 250
· SEROUT O_SU1_Sin,SU_Baud,[noparse][[/noparse]"{S}"]········ ' StepU#1 remote mode
·
The following routine is used to step the motor
TU_Pulse:
· FOR Temp = 1 TO TU_Pulse_Cnt
··· PULSOUT O_SU1_IP1, 7
··· PAUSE 1
· NEXT
RETURN
·
As I understand the literature for the step-U, a pulse to the IP pin will provide for one step (leading edge to trailing edge of pulse).· What I am seeing, is if I adjust the pulsout variable longer, the stepper motor is receiving more pulses. ·The BS2p40 pulse rate is 0.8usec times the variable number for the pulse width. ·What am I missing?
·thanks,
Brian
Sign In or Register to comment.