Step motor control


Results 1 to 23 of 23

Threaded View

  1. #18
    Join Date
    May 2010
    Posts
    43


    Did you find this post helpful? Yes | No

    Smile Re: Step motor control

    Thks man!
    I make this, you mean across + an -,from power!
    I see that many time in shema,why is that nessery?


    Now I testing this code:
    Code:
    Delay VAR BYTE
    i VAR WORD
    
    TRISB = 0           ' All outputs.
    
    Delay = 8           
    pause 1000
    For i = 1 to 512    '512 steps forward.
      PORTB =9
      Pause Delay
      PORTB =3
      Pause Delay
      PORTB =6
      Pause Delay
      PORTB =12
      Pause Delay
      
    NEXT
    pause 2500
    
    
    For i = 1 to 256    '256 steps reverse.
      PORTB =12
      Pause Delay
      PORTB =6
      Pause Delay
      PORTB =3
      Pause Delay
      PORTB =9
      Pause Delay
    NEXT
    Pause 2500
    
    For i = 1 to 256    '256 steps reverse.
      PORTB =12
      Pause Delay
      PORTB =6
      Pause Delay
      PORTB =3
      Pause Delay
      PORTB =9
      Pause Delay
    NEXT
    Pause 1500
    For now, working 2 hour fine,is precison,and dont have some reset,we will se for now!

    And one more question,is possible make some code for picbasic for this:

    If step motor work some,go to left,go to right,.......
    and I stop power,and turn again,is possible,motor back in some start position,(some zero posicion),and continue work same function,before stoping!
    Last edited by dragan77; - 6th September 2011 at 16:42.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts