LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.8k stars 1.15k forks source link

motion.motion-type is 0 when rigid tapping #2619

Closed curtdutt closed 1 year ago

curtdutt commented 1 year ago

During a rigid tapping operation motion.motion-type remains at 0.

This is because the tcInit call on line 1589 src/emc/tp/tp.o is passing 0 to canon_motion_type.

I propose changing the 0 to EMC_MOTION_TYPE_FEED.

tcInit(&tc, TC_RIGIDTAP, 0, tp->cycleTime, enables, 1);

becomes

tcInit(&tc, TC_RIGIDTAP, 2, tp->cycleTime, enables, 1);

After testing with a live machine there appears to be no negative effects.

petterreinholdtsen commented 1 year ago

[Curtis Dutton]

I propose changing the 0 to EMC_MOTION_TYPE_FEED.

Can you explain why this would be useful?

I do not know the code, just curious. -- Happy hacking Petter Reinholdtsen

andypugh commented 1 year ago

I think that it would make sense for spindle-synched motion to be a motion-type of its own. But a quick check shows that G33 and G76 moves show as motion type 2.

This seems like a bug, and should maybe be fixed in 2.8 first.

curtdutt commented 1 year ago

A motion type of its own would be just fine with me as well and probably more "correct".

I have a component that depends upon the motion-type going to something other than 0 when rigid tapping is occurring. It collects cutting time data on the running job and because of the but outputs no data for my taps as motion type doesn't change.

On Mon, Aug 28, 2023 at 10:22 AM andypugh @.***> wrote:

I think that it would make sense for spindle-synched motion to be a motion-type of its own. But a quick check shows that G33 and G76 moves show as motion type 2.

This seems like a bug, and should maybe be fixed in 2.8 first.

— Reply to this email directly, view it on GitHub https://github.com/LinuxCNC/linuxcnc/issues/2619#issuecomment-1695792424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTC47SI64NZ6EOLDTUZTTXXSSUBANCNFSM6AAAAAA37X2KWI . You are receiving this because you authored the thread.Message ID: @.***>

c-morley commented 1 year ago

Could add:

define EMC_MOTION_TYPE_RIDGIDTAP 7

to nml_intf/motion_types.h

andypugh commented 1 year ago

Could add: #define EMC_MOTION_TYPE_RIDGIDTAP 7 to nml_intf/motion_types.h

I feel that all spindle-synched motions should be in the same motion group.

I think I will change it to 2 in 2,9 to make it consistent with G76 and G33, and then add a new type in Master.

andypugh commented 1 year ago

Setting G76, 33, 33.1 to a new type is harder than I thought, as they are a STRAIGHT_TRAVERSE with a modifier on the feedrate.

So, for the moment, I will close this as fixed by 5a14548f303cca6e7f40ada6a43ad5ea1afbe174