Servo Drive Controller
Posted: Sat May 21, 2016 1:56 pm
Hello ,
I ma using a 1.5 KW AC servo motor with Panasonic microstep servo controller.That is using in a big size flat bed printer for Y axis .My motion card generate 2 bit pulse to control this motor, (00) when no printing(idle state), (01) for reverse moving, (10) in print command, and (11) for servo step after print one line.
NOTE: Motion card did not use any encoder or strip for feedback on Y axis, just one one encoder strip using for X axis.
Microstep drive have 6 wires for control, Dir+ ,Dir- , Pulse+ , Pulse- , 24 volt+ , Gnd.
In my scenario Dir- , Pulse- ,and Gnd are connected to pcb GND , while Dir+ connected to portC.0 , Pulse+ connected to CCP1 on portC.2 ,
I have design a program using 16f887 to control a this motor for these tow bit pulse on portD.0 and portD.1 use masking. Whole program is very simple.
crystal = 12MHz
Pwm enabled on 7 KHz by adjusting the period registor and prescaler
duty cycle = 0
in program i am using input icon to check portD 0 and 1 bit only , and a switch icon with three cases 0 , 1 and 3
if case = 0 // do nothing (set duty cycle 0)
if case = 1 // set bit on protC.0 for direction,and set duty cycle for 50% (or any other frequency, that's not matter because step can be adjust in micro step controller)
if case = 3 // cr bit on portC.0 , and set duty cycle
---------------------------------------------------------------
this program is working on machine but not real time , for example if i print a 500 mm line to Y axis , the result will not 500 mm , it could be 505 mm ,507mm or less then 500 ,496 or 492mm ,
every test gives different result, with few mm difference on Y axis.
Now i have design a program using portB.0 Interrupt, but did not test yet.because my physical environment is too far from my location.so due to long distance i want your suggestion before test,
just guide me if port interrupt method work in real time , or suggest me any other solution.
any suggestion will be appreciated.
Best regards
Sysprofessional,
I ma using a 1.5 KW AC servo motor with Panasonic microstep servo controller.That is using in a big size flat bed printer for Y axis .My motion card generate 2 bit pulse to control this motor, (00) when no printing(idle state), (01) for reverse moving, (10) in print command, and (11) for servo step after print one line.
NOTE: Motion card did not use any encoder or strip for feedback on Y axis, just one one encoder strip using for X axis.
Microstep drive have 6 wires for control, Dir+ ,Dir- , Pulse+ , Pulse- , 24 volt+ , Gnd.
In my scenario Dir- , Pulse- ,and Gnd are connected to pcb GND , while Dir+ connected to portC.0 , Pulse+ connected to CCP1 on portC.2 ,
I have design a program using 16f887 to control a this motor for these tow bit pulse on portD.0 and portD.1 use masking. Whole program is very simple.
crystal = 12MHz
Pwm enabled on 7 KHz by adjusting the period registor and prescaler
duty cycle = 0
in program i am using input icon to check portD 0 and 1 bit only , and a switch icon with three cases 0 , 1 and 3
if case = 0 // do nothing (set duty cycle 0)
if case = 1 // set bit on protC.0 for direction,and set duty cycle for 50% (or any other frequency, that's not matter because step can be adjust in micro step controller)
if case = 3 // cr bit on portC.0 , and set duty cycle
---------------------------------------------------------------
this program is working on machine but not real time , for example if i print a 500 mm line to Y axis , the result will not 500 mm , it could be 505 mm ,507mm or less then 500 ,496 or 492mm ,
every test gives different result, with few mm difference on Y axis.
Now i have design a program using portB.0 Interrupt, but did not test yet.because my physical environment is too far from my location.so due to long distance i want your suggestion before test,
just guide me if port interrupt method work in real time , or suggest me any other solution.
any suggestion will be appreciated.
Best regards
Sysprofessional,