Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Bishop_v7.62 on June 27, 2011, 10:04:59 AM

Title: PLC as stepper controller
Post by: Bishop_v7.62 on June 27, 2011, 10:04:59 AM
hi to all!
I'm working on a school project and i need some help. I'm trying to wire up l297 and l298 as stepper controller, dir, clc and enable signals will be provided by siemens s200 plc. Is it possible to have micro stepping with this setup? my plc has 2 20 kHz outputs, btw, and stepper is bipolar. If you have any tips, even better, examples, i would be grateful, especially on pcb, i have wiring schematics but not pcb layout. And if you need more information, let me know, thank you all in advance.
Title: Re: PLC as stepper controller
Post by: waltr on June 27, 2011, 12:09:18 PM
No, those chips do not support micro-stepping only half-step, normal and wave as per the data sheet. See the Circuit operation section of the data sheet.

The L297 & L298 are rather old chips so if you need micro-stepping I recommend using a newer chip that supports micro-stepping.
Allegro, ST and others offer micro-stepping controller/drivers.
Title: Re: PLC as stepper controller
Post by: Bishop_v7.62 on June 27, 2011, 04:10:55 PM
i am limited as to i have to use those chips. i was wondering, if i bring pwm on Vref pin, perhaps, anyone tried it?
Title: Re: PLC as stepper controller
Post by: Bishop_v7.62 on June 28, 2011, 03:38:25 PM
Ok, i managed to drive my step motor using pwm and fast outputs, i even tried using timers, it worked, but pwm subroutine is more elegant in my opinion. Now i wonder, there are two inputs for that subroutine, cycle and pulse. I locked my pulse to 1 ms but i would like my motor to gradually ramp up speed, and after some time, gradually stop. Is there a way to program cycle input of my pwm so it changes values from, let say 200, in increment of 5 every 1 s to 2, stay like that for 10 s and thay goes back, in increment of 5s form 2 to 200?