Driving SEW Motors
07 Nov 2012 14:45 #26330
by Alfadeko
Replied by Alfadeko on topic Driving SEW Motors
Hi from Spain.
I think you should check some other things in your protocol:
- Your SEW drive probably has it's own interpolator, so you must send (485) a final position, a speed and some other protocol bits (Start, reset, enable,...). I don't know how can you manage with "Position" (Maybe sending a "far position" and changing the speed "on the fly").
- Some drives include an encoder ouput which can echo the resolver signal, converted in standar ABZ signals, and also an analog "Speed reference" input. In this case, you can feed the "Simulated encoder" in paralell port (In case you don't need too much speed or resolution), and use an analog output card in EMC, (Or maybe sending a 485 Speed command to arduino and converting it to analog).
I think you should check some other things in your protocol:
- Your SEW drive probably has it's own interpolator, so you must send (485) a final position, a speed and some other protocol bits (Start, reset, enable,...). I don't know how can you manage with "Position" (Maybe sending a "far position" and changing the speed "on the fly").
- Some drives include an encoder ouput which can echo the resolver signal, converted in standar ABZ signals, and also an analog "Speed reference" input. In this case, you can feed the "Simulated encoder" in paralell port (In case you don't need too much speed or resolution), and use an analog output card in EMC, (Or maybe sending a 485 Speed command to arduino and converting it to analog).
Please Log in or Create an account to join the conversation.
07 Nov 2012 20:42 #26336
by andypugh
Actually, if that is the case then you can do it all with the parallel port, using PWM from the p-port converted to voltage. (This may be as simple as an RC filter on the drive input terminals.)
It's not a high-speed or high-precision method, but it is probably OK for a foam cutter, and would certainly be very educational.
Replied by andypugh on topic Driving SEW Motors
- Some drives include an encoder ouput which can echo the resolver signal, converted in standar ABZ signals, and also an analog "Speed reference" input. In this case, you can feed the "Simulated encoder" in paralell port (In case you don't need too much speed or resolution), and use an analog output card in EMC, (Or maybe sending a 485 Speed command to arduino and converting it to analog).
Actually, if that is the case then you can do it all with the parallel port, using PWM from the p-port converted to voltage. (This may be as simple as an RC filter on the drive input terminals.)
It's not a high-speed or high-precision method, but it is probably OK for a foam cutter, and would certainly be very educational.
Please Log in or Create an account to join the conversation.
09 Nov 2012 22:42 #26410
by saskrick
Replied by saskrick on topic Driving SEW Motors
Well, things are looking up !! after many hours with the documentation, conversations with you folks, and some time with the SEW engineer, things are beginning to make sense
Feedback -- It turns out I can get encoder outputs -- it looks like an incremental quadrature encoder (three lines -- ABC, and another three inverted lines) at TTL levels
Motor control -- I can drive the motor at a given speed based on input voltage (either bipolar -- +/- 5or10V or unipolar 0-5or10V plus a binary input to trigger motor reversal.
This completely bypasses the serial port and smartypants of the system. I believe this is exactly what we need. If you can generate a higher frequency PWM signal, certainly this could be filtered to produce a fairly clean DC value.
Does this mean that this can be run right out of the box? Just the parallel port? Or is some HAL customization required?
Thanks in advance for all of your really good help.
Feedback -- It turns out I can get encoder outputs -- it looks like an incremental quadrature encoder (three lines -- ABC, and another three inverted lines) at TTL levels
Motor control -- I can drive the motor at a given speed based on input voltage (either bipolar -- +/- 5or10V or unipolar 0-5or10V plus a binary input to trigger motor reversal.
This completely bypasses the serial port and smartypants of the system. I believe this is exactly what we need. If you can generate a higher frequency PWM signal, certainly this could be filtered to produce a fairly clean DC value.
Does this mean that this can be run right out of the box? Just the parallel port? Or is some HAL customization required?
Thanks in advance for all of your really good help.
Please Log in or Create an account to join the conversation.
09 Nov 2012 23:40 #26411
by andypugh
The etch-servo sample config
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...0991fc21d8c5e1de0c8f
Is likely to be almost exactly correct for your setup. That is a config for a parallel-port controlled, servo-driven Etch-a-Sketch.
That example config never explicitly sets the PWM frequency, so I suspect it is running in PDM mode (which is probably optimal). The filter time constant needs a bit of care. It needs to be high enough to get a stable voltage from the PDM, but not so high that the response bandwidth suffers too much. Response bandwidth is likely to be your main problem with this configuration because of the low base pwm/pdm frequency.
Replied by andypugh on topic Driving SEW Motors
It will be a hand-built HAL configuration rather than one from stepconf, but it can all be done with standard modules.This completely bypasses the serial port and smartypants of the system. I believe this is exactly what we need. If you can generate a higher frequency PWM signal, certainly this could be filtered to produce a fairly clean DC value.
Does this mean that this can be run right out of the box? Just the parallel port? Or is some HAL customization required?.
The etch-servo sample config
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...0991fc21d8c5e1de0c8f
Is likely to be almost exactly correct for your setup. That is a config for a parallel-port controlled, servo-driven Etch-a-Sketch.
That example config never explicitly sets the PWM frequency, so I suspect it is running in PDM mode (which is probably optimal). The filter time constant needs a bit of care. It needs to be high enough to get a stable voltage from the PDM, but not so high that the response bandwidth suffers too much. Response bandwidth is likely to be your main problem with this configuration because of the low base pwm/pdm frequency.
Please Log in or Create an account to join the conversation.
12 Nov 2012 10:55 #26470
by saskrick
Replied by saskrick on topic Driving SEW Motors
Success again!!!
Thank you for all the help. The example code from Etch-a-Sketch was almost exactly what I needed. I was able to today get one of the axis working with the jog control. It took a little bit of playing with the low pass filter -- the one used a cutoff frequency of about 100 Hz. As well, the digital outputs to drive the direction binary inputs in the controller had to be pushed through solid-state relays because the logic in the controller is 24 V.
I made a very rough nasty guess with the PID parameters. I must've guessed wrong because I am getting very pronounced jitter at zero speed (+-20% of full motor output) at about 40 Hz. Which parameter should I start playing with?
Also, the scaling is off. I've used the INPUT_SCALE parameter with my calculated steps/mm. Is this the right one??
Rick
Thank you for all the help. The example code from Etch-a-Sketch was almost exactly what I needed. I was able to today get one of the axis working with the jog control. It took a little bit of playing with the low pass filter -- the one used a cutoff frequency of about 100 Hz. As well, the digital outputs to drive the direction binary inputs in the controller had to be pushed through solid-state relays because the logic in the controller is 24 V.
I made a very rough nasty guess with the PID parameters. I must've guessed wrong because I am getting very pronounced jitter at zero speed (+-20% of full motor output) at about 40 Hz. Which parameter should I start playing with?
Also, the scaling is off. I've used the INPUT_SCALE parameter with my calculated steps/mm. Is this the right one??
Rick
Please Log in or Create an account to join the conversation.
12 Nov 2012 19:08 #26477
by andypugh
You may also have too much P. (again, the Imperial/metric thing. The units of the PID terms are volts/distance and need to be lower for metric machines.
Replied by andypugh on topic Driving SEW Motors
I would start with a bit more deadband. 0.002 looks like an Imperial deadband. There is a comment in the HAL file to the effect that deadband should be just over one encoder count.I made a very rough nasty guess with the PID parameters. I must've guessed wrong because I am getting very pronounced jitter at zero speed (+-20% of full motor output) at about 40 Hz. Which parameter should I start playing with?
You may also have too much P. (again, the Imperial/metric thing. The units of the PID terms are volts/distance and need to be lower for metric machines.
Yes, that's the one. You can see that that INI file parameter is read into the encoder scale in the HAL file. If you are out by a factor of 4 that is because there are 4 counts per encoder cycle, and it is often not entirely clear what number is being quoted.Also, the scaling is off. I've used the INPUT_SCALE parameter with my calculated steps/mm. Is this the right one??
Please Log in or Create an account to join the conversation.
Time to create page: 0.107 seconds