Rigid tapping with only A and Z signals

More
20 May 2021 01:50 - 20 May 2021 08:42 #209597 by psz
Is it possible to do rigid tapping without B phase pin? I only have 2 pins left on my MESA card for spindle encoder. As I understand B phase is necessary for direction sensing, however direction is already known, because spindle is commanded right/left by the controller. It can be assumed that the spindle would not turn backwards by itself before direction reversal by the controller.
Last edit: 20 May 2021 08:42 by psz.

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

More
20 May 2021 14:23 #209652 by PCW
Replied by PCW on topic Rigid tapping with only A and Z signals
I would expect the problem to be that the spindle reverses considerably
_after_ the command. With 2 pins I would think using them for A,B
and having a simulated index component would be a better solution

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

More
21 May 2021 04:16 - 21 May 2021 04:17 #209727 by psz
Replied by psz on topic Rigid tapping with only A and Z signals
Yes, the spindle will reverse after the command, but we already know its direction, so at this moment counting A pulses alone is sufficient (B becomes redundant). This is how I see it. I'm little confused, as it's stated everywhere in the docs/forums that index pulse is mandatory for rigid tapping :). With A/Z it should be possible to somehow 'force' the direction of the encoder in HAL to the known one (reversal of the spindle). As for the A/B, how to setup such a simulated index?
Last edit: 21 May 2021 04:17 by psz.

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

More
21 May 2021 13:38 - 21 May 2021 13:39 #209756 by PCW
Replied by PCW on topic Rigid tapping with only A and Z signals
The issue I see with no A is the you know the commanded direction but
when you reverse if you count A in the reversed direction you will break the
tap because LinuxCNC will start moving Z up while the tap is threading down

You might avoid this on a Index+A setup by delaying the counting
reverse until the spindle velocity gets very close to 0

You can simulate the index with a component. This has the disadvantage
that the index position is "volatile", that is, if you shut LinuxCNC down, you cannot
restart a threading/rigid-tapping session because there is no physical spindle
position reference. just math that keeps track of angular position of the simulated index
(that is the fractional parts of a full turn)
Last edit: 21 May 2021 13:39 by PCW.
The following user(s) said Thank You: tommylight

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

More
21 May 2021 19:12 - 21 May 2021 19:12 #209780 by PCW
Replied by PCW on topic Rigid tapping with only A and Z signals
Here is a generic index simulation component to allow threading or rigid tapping for
systems with spindle encoders without index or step/dir driven spindles:

component sindex "simulated index at angle 0";
pin in float fb_in "position feedback from sensor, scaled in turns";  
pin out float fb_out "position feedback to motion, scaled in turns";
pin out float fb_degrees "position feedback scaled in degrees";
pin out float angle "angular position for readout";
pin io bit index-enable "connect to motions index-enable pin";

function _;

variable double fb_frac = 0;
variable double fb_frac_last = 0;
variable double offset = 0;
 
license "GPL";
;;
#include <rtapi_math.h>

FUNCTION(_) {

    fb_frac=fb_in-floor(fb_in);

    if (index_enable==1) {
        if (fabs(fb_frac-fb_frac_last) > 0.50) {  // when we wrap
            index_enable=0;
            offset=trunc(fb_in);
        }
    } 

    fb_out=fb_in-offset;    
    fb_frac_last=fb_frac;
    fb_degrees=fb_out*360.0;
    angle=fabs(fb_frac)*360;
}

Last edit: 21 May 2021 19:12 by PCW.

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

More
21 May 2021 19:22 #209782 by Aaroncnc
Replied by Aaroncnc on topic Rigid tapping with only A and Z signals
I know you mention only having 2 pins open but there are ways to get a few more depending on how you have it setup
if you have 3 end stops/ limit or home you can put them all on the same pin.
so in stead of having 1 pin for each you can set it so they are all one. just wire the switches in series.
so 3 home switches that used to take 3 pins now uses 1 pins
The change to the machine is that it will have to home each axis 1 at a time and bounce off the switch.
3 limit switches that used to take 3 pins now take 1.
You could go further and combine limit and home and free up another pin.

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

Time to create page: 0.112 seconds
Powered by Kunena Forum