Shop OBEX P1 Docs P2 Docs Learn Events
Stepper Drive control — Parallax Forums

Stepper Drive control

bennettdanbennettdan Posts: 614
edited 2007-05-16 18:41 in BASIC Stamp
Hello,

··· I have a Stepper drive that accepts 200 pulses to rotate a motor 1 revolution. What I want to do is send it say 2000 pulses to rotate it 10 revolutions will this work or is their a better way? Also if I want to vary the speed then I can just change the Pause statement right?
FOR pulses = 1 TO 2000
PULSOUT 14,100
PAUSE 20
NEXT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-05-14 03:54
    How many wires does the motor have and do you have it connected to a stepper controller or directly to the stamp? If it's a normal stepper your code won't work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • bennettdanbennettdan Posts: 614
    edited 2007-05-14 04:46
    No I have a stepper contoller drive and I just give it pulses and it wires to the motor. I want to send it a certain amount of pulses because the stepper controller takes 200 pulses in and spins the motor 1 revolution.
  • AmaralAmaral Posts: 176
    edited 2007-05-14 12:39
    Bennettdan

    The simplest way is the way that you are doing, but you can use variables for you instruction, say:

    FOR Pulses = 1 to numdesired

    PULSOUT Pin , length

    PAUSE period

    NEXT

    Note that what I called "length" is probably not necessary because you are using an stepper controller drive, witch will probably ingore this information, it may have a maximum and an minimum pulse width, for faster control use the minimum value.

    Hope to Help

    Amaral
  • bennettdanbennettdan Posts: 614
    edited 2007-05-15 02:39
    The drive will rotate the motor faster or slower depending on how fast it recieves pulses. I just want to be able to send it a certain amount so the motor will rotate a know amount. I also want to be able to control the speed of the drive by controlling how fast the pulses get their.

    Post Edited (bennettdan) : 5/15/2007 3:40:26 AM GMT
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-05-16 11:35
    It might help if you tell us the make and model of the driver board... did the driver board come with any instructions?
  • bennettdanbennettdan Posts: 614
    edited 2007-05-16 18:41
    Yes I have the instructions and the drive is a stepper drive that is connected to a CNC mill I just bought. the instruction state their is a direction pin-High is CW Low is CCW that part is easy. The pulse pin accepts 200 pulses to equal one revolution of the stepper motor and the spped depends on how fast the pulses come. So i need to send it a certain amount of pulses to equal a certain amount of revolutions on the motor also I want to control how fast it pulses. I think the code I have will work I have just not have time to test it yet but was wondering if anyone has a better way.
Sign In or Register to comment.