Electronic Components Datasheet Search |
|
AN3991 Datasheet(PDF) 9 Page - STMicroelectronics |
|
AN3991 Datasheet(HTML) 9 Page - STMicroelectronics |
9 / 15 page DocID022332 Rev 2 9/15 AN3991 Controlling three motors with scripts 15 Three_motors script text MOTOR_A = 0 # Motor A is the 1st one MOTOR_B = 1 # Motor B is the 2nd one MOTOR_C = 2 # Motor C is the 3rd one #1.Establish the home position for all three motors wherever the shafts happen to be # Set motor A home position ResetPos(MOTOR_A) # Set motor B home position #ResetPos(MOTOR_B) # Set motor C home position ResetPos(MOTOR_C) #2.Spin MOTOR_A FW (forward) at 800 steps/sec for 5 seconds # Send the Run command # Device Dir Speed Run(MOTOR_A, True, 0xD1B7) # Wait (about) 5 seconds Delay(5000) # milliseconds # Stop the motor HardStop(MOTOR_A) #3.Wait (about) 2 seconds Delay(2000) # milliseconds #4.Move MOTOR_A BW 2 revs or 400 steps or 51,200 microsteps # Send the Move command # Device Dir microSteps Move(MOTOR_A, False, 0xC800) Delay(2000) #5.Spin MOTOR_B BW (in the opposite direction) at 500 steps/sec for 8 seconds # Send the Run command # Device Dir Speed Run(MOTOR_B, False, 0x8312) # Wait (about) 8 seconds Delay(8000) # milliseconds # Stop the motor HardStop(MOTOR_B) #6.Wait (about) 4 seconds Delay(4000) # milliseconds #7.Move MOTOR_B FW 4 revs or 800 steps or 102400 microsteps |
Similar Part No. - AN3991 |
|
Similar Description - AN3991 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |