Tapping with one pulse spindle encoder?
31 Dec 2012 07:53 - 31 Dec 2012 07:56 #28212
by machete
Tapping with one pulse spindle encoder? was created by machete
Hello!
I have very simple sensor on my spindle, it gives me only two pulses per rotation. (so it's not quadrature)
This is my .hal file part for encoder:
This is very similar to this example: wiki.linuxcnc.org/cgi-bin/wiki.pl?Rigid_Tapping
Except my encoder is not quadrature.
I can see, that "spindle-rev-count" correctly counting rotations, but do it always "+1", no mater M3 or M4 is executing.
And G33.1 is not working (spindle is rotating, axis not moving).
This is my test-program:
M3S300
G90
G33.1 Y-10 K1.5
M2
What am I doing wrong?
I have very simple sensor on my spindle, it gives me only two pulses per rotation. (so it's not quadrature)
This is my .hal file part for encoder:
Warning: Spoiler!
#new encoder
loadrt encoder num_chan=1
addf encoder.update-counters servo-thread
addf encoder.capture-position servo-thread
setp encoder.0.position-scale 1
setp encoder.0.counter-mode 1
#scaler to have revolution per minute
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 30
#connections
net mesa_29_in hm2_5i20.0.gpio.029.in_not => encoder.0.phase-A => encoder.0.phase-Z
net encoder-raw-velocity encoder.0.velocity => scale.0.in
net s-speed motion.spindle-speed-in <= scale.0.out
net spindle-rev-count encoder.0.position => motion.spindle-revs
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
loadrt encoder num_chan=1
addf encoder.update-counters servo-thread
addf encoder.capture-position servo-thread
setp encoder.0.position-scale 1
setp encoder.0.counter-mode 1
#scaler to have revolution per minute
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 30
#connections
net mesa_29_in hm2_5i20.0.gpio.029.in_not => encoder.0.phase-A => encoder.0.phase-Z
net encoder-raw-velocity encoder.0.velocity => scale.0.in
net s-speed motion.spindle-speed-in <= scale.0.out
net spindle-rev-count encoder.0.position => motion.spindle-revs
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
This is very similar to this example: wiki.linuxcnc.org/cgi-bin/wiki.pl?Rigid_Tapping
Except my encoder is not quadrature.
I can see, that "spindle-rev-count" correctly counting rotations, but do it always "+1", no mater M3 or M4 is executing.
And G33.1 is not working (spindle is rotating, axis not moving).
This is my test-program:
Warning: Spoiler!
M3S300
G90
G33.1 Y-10 K1.5
M2
What am I doing wrong?
Last edit: 31 Dec 2012 07:56 by machete.
Please Log in or Create an account to join the conversation.
31 Dec 2012 11:08 - 31 Dec 2012 11:11 #28215
by PCW
Replied by PCW on topic Tapping with one pulse spindle encoder?
Pretty sure rigid tapping will require quadrature
and probably pretty decent resolution (say >25 slots)
at that.
Threading can get away with lower resolution as it
doesn't reverse and is done at a fairly constant speed
(so you can interpolate spindle angle between encoder edges
if need be for low res encoders)
Without decent resolution quadrature you would be
basically guessing what the spindle was doing for long
periods/angles during reversals.
Guessing wrong will break taps.
and probably pretty decent resolution (say >25 slots)
at that.
Threading can get away with lower resolution as it
doesn't reverse and is done at a fairly constant speed
(so you can interpolate spindle angle between encoder edges
if need be for low res encoders)
Without decent resolution quadrature you would be
basically guessing what the spindle was doing for long
periods/angles during reversals.
Guessing wrong will break taps.
Last edit: 31 Dec 2012 11:11 by PCW.
Please Log in or Create an account to join the conversation.
01 Jan 2013 08:03 #28245
by jmelson
spindle position, plus accurate detection when the spindle reverses.
With only one signal from the spindle, you have no way at all to
detect the spindle reversing. Even if you did, the spindle could
go a whole revolution in reverse before that was detected,
certainly breaking smaller taps and overloading the spindle
with a big one.
I can't imagine rigid tapping with anything less than 25 pulses/rev
which would give 100 quadrature counts per rev. You also
need an index so it makes it happy for multiple-pass threading,
although this is not strictly necessary for rigid tapping.
Jon
Replied by jmelson on topic Tapping with one pulse spindle encoder?
This can't work! For rigid tapping, you need fairly high resolution ofHello!
I have very simple sensor on my spindle, it gives me only two pulses per rotation. (so it's not quadrature)
And G33.1 is not working (spindle is rotating, axis not moving).
What am I doing wrong?
spindle position, plus accurate detection when the spindle reverses.
With only one signal from the spindle, you have no way at all to
detect the spindle reversing. Even if you did, the spindle could
go a whole revolution in reverse before that was detected,
certainly breaking smaller taps and overloading the spindle
with a big one.
I can't imagine rigid tapping with anything less than 25 pulses/rev
which would give 100 quadrature counts per rev. You also
need an index so it makes it happy for multiple-pass threading,
although this is not strictly necessary for rigid tapping.
Jon
Please Log in or Create an account to join the conversation.
01 Jan 2013 20:52 #28250
by machete
Replied by machete on topic Tapping with one pulse spindle encoder?
OK, i understand.
I have read this:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
And somehow decide that 1 pulse sensor is also enough for rigid tapping...
I have read this:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
And somehow decide that 1 pulse sensor is also enough for rigid tapping...
Please Log in or Create an account to join the conversation.
02 Jan 2013 01:10 #28267
by jmelson
and does not apply to anything where a tool is to be synched to the spindle
for a threading operation. There are ways to do lathe single-point threading
with a single pulse/rev, but those are not very good, either.
Jon
Replied by jmelson on topic Tapping with one pulse spindle encoder?
No, this applies ONLY to constant speed spindles for milling, for instance,OK, i understand.
I have read this:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Closed...pindle_Speed_Control
And somehow decide that 1 pulse sensor is also enough for rigid tapping...
and does not apply to anything where a tool is to be synched to the spindle
for a threading operation. There are ways to do lathe single-point threading
with a single pulse/rev, but those are not very good, either.
Jon
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds