- Posts: 15
- Thank you received: 0
Question about live tooling
I have a lathe with an X- and Z-Axis and I'm driving the Spindle with a Servo Motor(130st m10015) over a timing belt.
I currently only have control over the Spindle Speed.
I would like to use live Tooling on this machine by controlling the position of the Servo spindle(I think it would be called the C-Axis).
Sorry for my ignorance but i have no idea how to do this and cant seem to find a lot in the internet about how to set this up.
Could i just wire up the spindle with pulse/dir signals and configure it as the 4th-Axis in stepconf? But how would linuxcnc switch between speed and Position control? Is it just a G- or M-Code?
I would appreciate any help.
Please Log in to join the conversation.
One would be used for speed control, the other for position control.
You can either use the M19 command to switch mode and set the angle, or create a custom M-code to do the same thing and run the spindle as a C-axis.
The logic is shown in this diagram:
wiki.linuxcnc.org/cgi-bin/wiki.pl?SpindleOrient
But note that the spindle pin names have changed, and the (for example) motion.spindle-orient it now spindle.0.orient
Please Log in to join the conversation.
andypugh wrote: [strike]note that the spindle pin names have changed, and the (for example) motion.spindle-orient it now spindle.0.orient[/strike]
I changed the file
Please Log in to join the conversation.
Thanks for the quick reply.
I would like to wire the servo spindle in a closed loop system, because my breakout board doesn't accept any encoder inputs. Sorry for my ignorance but do I really need encoder feedback, or could i just use the spindle index as a Reference for the Spindle?
Sorry for my ignorance but I'm also pretty new to HAL and don't really know how this works. Are there any examples or presets for this? If not I'm ready to learn something new.
Please Log in to join the conversation.
Anonymous wrote: I would like to wire the servo spindle in a closed loop system, because my breakout board doesn't accept any encoder inputs
Do you mean "open loop"?
I assume that you are controlling the spindle with step-dir pulses?
Are you using a velocity-mode stepgen to control the spindle speed?
If you are, then are you happy to use M19 for C-axis positioning, or does it need to be controlled by a C-command in the Gcode?
I can see two ways to do this, either with two stepgens (one in velocity mode, one in position mode) and switching the step/dir source with a bit-type mux_generic .
Or, keep the single stepgen and add a PID to control it when in position mode. This would look like a sub-set of the diagram posted earlier, except that the velocity PID is removed (as is much of the downstream stuff) and stepgen position-fb is used in place of encoder feedback.
You would use a mux to switch the velocity command from straight spindle.0.speed control to pid.spindle control. I _think_ that the "orient" command is clever enough to allow for the (thousands) of complete revolutions "in" the stepgen.
You don't get consistent orient to a spindle encoder this way. That would matter if you planned on leaving the part in the chuck through shutdowns.
Please Log in to join the conversation.
No I'm not controlling the spindle speed with step/dir pulses but the servo drive does have these inputs though(haven't wired them up yet).
I currently control the spindle speed with an analog voltage.
I want to use an analog voltage to control the spindle speed for turning and step/dir pulses when using C-axis.
The servo drive could switch between speed and position control (I'd probably do this with a relay).
I'm not using step/dir pulses for turning because I think it would be a bit too much for my PC, so i would like to switch between speed and position control like that.
Another question could i just hook the servo drive up over rs232 or rs485 to a usb port and let linuxcnc control the speed/position of the servo like that, or would that not work?
Please Log in to join the conversation.
Are you sure that the drive supports changing command type on the fly?Anonymous wrote: Y
I want to use an analog voltage to control the spindle speed for turning and step/dir pulses when using C-axis.
The servo drive could switch between speed and position control (I'd probably do this with a relay).
Another question could i just hook the servo drive up over rs232 or rs485 to a usb port and let linuxcnc control the speed/position of the servo like that, or would that not work?
That might be possible. Is there a LinuxCNC HAL driver for the drive?
Please Log in to join the conversation.
