advantages of supplying phase B to spindle encoder
Also I'd appreciate any hints/suggestions from people who have converted a machine with only a back toolpost with most tools facing up. I'm a bit confused WRT setting the home position in machine space and writing gcode in part space.
I've had the machine running under Mach but was disappointed in its threading feature.
Please Log in or Create an account to join the conversation.
You do need A, B and index for rigid tapping.
Threading can be done with only index.
Dont quote me on that!
Hope it helps.
Please Log in or Create an account to join the conversation.
Drew
Please Log in or Create an account to join the conversation.
However if you want higher resolution, from the A channel, you still need an single pulse index to put all the A pulses "in context".
Please Log in or Create an account to join the conversation.
I've had the machine running under Mach but was disappointed in its threading feature.
Disappointed is probably putting it mildly, threading under mach is shite
It is not possible to get sufficient feedback to adjust feed to spindle speed just from a single pulse per revolution or even 1 x Z and 4 x A, which is what Mach was advocating
Regards phases see linuxcnc.org/docs/html/man/man9/encoder.9.html for general info.
Basically for a lathe you do not need a phase B, unless you intend rigid tapping, with the tap held in a tool holder or similar
For a single direction rotation, a Z and A phase is fine for threading.
alan_3301 wrote:
Threading can be done with only index.
You cannot thread with any accuracy with just a Z phase, even if you pass that same pulse to the A phase as well, which will allow G76 to work, but with poor results.
I would advocate a 90 to 180 pulse A phase, if using the software encoder component and a disc type encoder on the spindle.
If you are using hardware counters, you can use a much higher resolution encoder driven 1:1 off the spindle
I use a 120 hole encoder disc, with software encoder component and a seperate Z phase index
This works well and gives good threads at the speeds and diameters I most use.
If of use these are the HAL connections from my lathe
loadrt encoder num_chan=1
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread
setp encoder.0.position-scale 120
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position-interpolated => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
net spindle-index parport.0.pin-11-in-not => encoder.0.phase-Z
net spindle-pulse parport.1.pin-10-in => encoder.0.phase-A
Also I'd appreciate any hints/suggestions from people who have converted a machine with only a back toolpost with most tools facing up
I use a slant bed (rear tool) lathe
Rather than turn the tools upside down (with the exception of threading) I run the lathe in M4
This entry in ~/.axis.rc will change the plot around so that the X axis moves downwards towards zero and thus corresponds to what you see
## lathe rotation of axes for slantbed lathe
if lathe:
bind_axis("Down", "Up", 0)
def set_view_y(event=None):
widgets.view_z.configure(relief="link")
widgets.view_z2.configure(relief="link")
widgets.view_x.configure(relief="link")
widgets.view_y.configure(relief="sunken")
widgets.view_p.configure(relief="link")
vars.view_type.set(4)
o.reset()
glRotatef(90, 1, 0, 0)
glRotatef(90, 0, 1, 0)
o.set_eyepoint(5.)
o.perspective = False
o.lat = -90
o.lon = 0
o.tkRedraw()
TclCommands.set_view_y = commands.set_view_y = set_view_y
root_window.bind("v", commands.set_view_y)
root_window.after_idle(commands.set_view_y)
#
I'm a bit confused WRT setting the home position in machine space and writing gcode in part space.
That is a more general concept of offsets.
Your code is specific to the part to be turned, the part of the billet furthest from the chuck is Z0 and the centreline is X0
The largest negative Z figure is the extent to which you cut towards the chuck and the largest positive X figure is the largest diameter of your workpiece
All these dimensions are in G54 co-ordinates say
Homing is done in machine co-ordinates, G53. Once homed those positions are set to Zero
Then you touch off a Z0 and X(billet diameter) in G54 mode. That sets G54 X30 to say G53 X-250 and G54 Z0 to G53 Z-100 say
Thereafter the conversion from machine position to workpiece position is done for you and whilst working in G54 mode, you only need worry about moves which describe the workpiece and not their relationship to the machine zero position.
Don't know if that makes things clearer?
regards
Please Log in or Create an account to join the conversation.
alan_3301 wrote:
Threading can be done with only index.
You cannot thread with any accuracy with just a Z phase, even if you pass that same pulse to the A phase as well, which will allow G76 to work, but with poor results.
I said dont quote me
I stand corrected.
Just to save some embarrassment, would a single index pulse be suitable for a largish spindle motor doing light passes in plastic?
Assuming the spindle speed stays constant?
Please Log in or Create an account to join the conversation.
I said dont quote me
I stand corrected.
Just to save some embarrassment, would a single index pulse be suitable for a largish spindle motor doing light passes in plastic?
Assuming the spindle speed stays constant?
Not a problem, I know because I tried it once
In theory yes, if you had a spindle of such large mass and constant speed control, that it could not be slowed by the cutting action, plus a sufficiently long lead in to set up the start point, you could pass the index
to both Z and A phases and get away with it.
In practice, one pulse per revolution is not anywhere near enough to synchronise feed to spindle rotation to get an exact travel of the Z axis per revolution, and thus cut an exact pitch thread
regards
Please Log in or Create an account to join the conversation.
Drew
Please Log in or Create an account to join the conversation.
You would have to add your own 1 pulse wheel and encoder for an index.
There are some compact cam sensor / distributors from late 80s/ early 90s japanese cars that have 2 channel optical encoders in them.
Usually there is a high tooth wheel, and a 4 or 6 tooth wheel. you can use the high tooth wheel as is, and block all but 1 tooth on the low count wheel for your index.
Please Log in or Create an account to join the conversation.
Thanks everyone for the input. Looks like I'll be building an simple encoder. If I ever want to do ridge tapping I'll get a real one.
You can just add a second sensor to the existing setup. The A and B detectors can be any N + 0.25 pitches apart.
Just don't put them N + 0.5 pitches apart, or you will look foolish. DAMHIK.
Please Log in or Create an account to join the conversation.