advantages of supplying phase B to spindle encoder

More
24 Jul 2014 06:32 #49066 by drogge
I'm in the process of retrofitting an EMCO120 to linuxCNC and I'm wondering what adding phase B to the spindle encoder buys me. From reading the forum I've figured out that I need phase A and Index for threading but I haven't seen much about phase B. I have seen something that suggests I might need phase B for ridged tapping but the thread I was reading didn't come to a final conclusion. Do I need both phases for ridged tapping and is it truly ridge or will I need some axial float in the tap holder?

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.

More
24 Jul 2014 06:49 - 24 Jul 2014 06:51 #49067 by alan_3301
I'm not totally sure, but I think A and B are used together to sense rotation and direction.

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.
Last edit: 24 Jul 2014 06:51 by alan_3301.

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 08:48 #49069 by drogge
Thanks Alan. From everything I've read Index and phase A are required for threading. As far as I can tell this is the major improvement over Mach's threading; the spindle is kept in sync by the A phase not just index.

Drew

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 09:25 - 24 Jul 2014 09:25 #49071 by alan_3301
from what I understand, threading can use a single pulse per revolution. just like mach3.
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".
Last edit: 24 Jul 2014 09:25 by alan_3301.

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 15:53 - 24 Jul 2014 19:35 #49076 by ArcEye
Hi

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
Last edit: 24 Jul 2014 19:35 by ArcEye.

Please Log in or Create an account to join the conversation.

More
24 Jul 2014 18:55 #49085 by alan_3301

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.

More
24 Jul 2014 19:48 #49086 by ArcEye

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 :lol:

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.

More
25 Jul 2014 08:14 #49112 by drogge
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. Does anyone know of a place to get ABI encoders at a reasonable price? USDigital wants about $120 for theirs.

Drew

Please Log in or Create an account to join the conversation.

More
25 Jul 2014 20:08 - 25 Jul 2014 20:10 #49122 by alan_3301
you can salvage the parts from a ball mouse, they have quadrature encoders, some tutorials on the web on how to interface with them.
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.
Last edit: 25 Jul 2014 20:10 by alan_3301.

Please Log in or Create an account to join the conversation.

More
26 Jul 2014 00:08 #49133 by andypugh

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.

Time to create page: 0.225 seconds
Powered by Kunena Forum