Rigid tapping

Moderators: TomKerekes, dynomotion

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid tapping

Post by Mateusz » Mon Aug 02, 2021 10:20 am

Hello Francois,

I've got the same problem, I did testing with the same file on version 4.35f what I've discovered tapping process goes just when you will turn spindle on prior starting Gcode program :) also Spindle spins in opposite way round, when program ends spindle turns off which is fine.
Please try, because I've got the same issue I'll describe it on my already open thread.

Regards
Mateusz

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid tapping

Post by Mateusz » Mon Aug 02, 2021 11:07 am

I would like to correct my previous post:
- behaviour which I have described is present with file : RigidTapMultiPassJogM119_v1_Jim.c
- also I tested recommended file: RigidTapMultiPassJogM119_v1.c but no luck does not turn Spindle ON.

User avatar
TomKerekes
Posts: 1598
Joined: Mon Dec 04, 2017 1:49 am

Re: Rigid tapping

Post by TomKerekes » Mon Aug 02, 2021 4:11 pm

Hi Mateusz,

What programs are you using for M3, M4, S? Do they work correctly? Post them including MySpindleDefs.h.

How do you turn your Spindle on and off?
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid tapping

Post by Mateusz » Mon Aug 02, 2021 6:51 pm

Hi Tom,

Thank you for answer,

- Yes my Spindle control works great M3, M4, M5 commands are invoking adequate programs in thread 2
Spindle files: OffJog.c , OnCCWJog.c , OnCWJog.c
- M119 Invoking RigidTapMultiPassJogM119_v1.c file in thread 6
I was testing code below:
(Call a Rigid Tap Sequence)
G21
F1000
S300
G1 X40 Y40
G1 Z20
G98 G84 Z-12 R2 Q2 F2
M30

Results: spindle is not turning on, Z axis starts from Z20 goes to Z2 and goes back to Z20.
Console read out:

Units = mm
Bottom = -12.000000
Pitch = 2.000000
Jogging Spindle Stop

From the other hand I Invoked file : RigidTapMultiPassJogM119_v1_Jim.c First reaction was the same like above- no tapping, but when I turned Spindle on before Gcode program went fine with whole tapping procedure a part of spinning spindle in opposite way round with every step

Jogging Spindle 12873.142850 counts/sec
Jogging Spindle 12873.142850 counts/sec
Bottom = -12.000000
Retract = 2.000000
Peck = 4.000000
Pitch = 2.000000
RPM = 300.000000
Units = mm
Axis = 2
AxisRes = 254000.000000
Bottom = -0.472441 Inches
Retract = 0.078740 Inches
Peck = 0.157480 Inches
Pitch = 0.078740 Inches
Z0 = 19997.994336 counts
Z0 = 0.078732 inches
Z_Dist = 0.551173 inches
TotalCut = 0.000000 inches
TotalCut = 0.157480 inches
TotalCut = 0.314961 inches
TotalCut = 0.472441 inches
Jogging Spindle Stop

This code also hasn't changed calculated units into mm's,
Attachments
MySpindleDefs.h
(800 Bytes) Downloaded 14 times
OnCWJog.c
(1.24 KiB) Downloaded 15 times
OnCCWJog.c
(1.16 KiB) Downloaded 13 times
OffJog.c
(521 Bytes) Downloaded 12 times

cemoa9
Posts: 53
Joined: Mon Jun 01, 2020 11:01 am

Re: Rigid tapping

Post by cemoa9 » Mon Aug 02, 2021 8:14 pm

Hello Mateusz, Tom,

I am relieved to see I am not the only one struggling with programming. With my huge knowledge of C :lol: I have been checking the M119 supplied by Tom (thanks), and I do not understant on line 78 :

while (TotalCut < Bottom)

In my understanding, TotcalCut being 0 and Bottom a negative value most of the times the program will never enter the loop and then no tapping... (for the Jim version it seems correct to me) that would explain why it does not do anything on your machine or mine.

But just changing the it to while (TotalCut > Bottom) seems not enough, I tried it, machine had a very strange behaviour with Spindle going to very high RPMs (max of it actually 6000) and Z axis maybe trying to follow but I am not sure about that.

For what I see, the F parameter is not even used in the code, but S is, this is maybe why you need to activate the spindle before. Maybe replace Fxx by Sxxx will be enough in your case.

Cordially

Francois

User avatar
TomKerekes
Posts: 1598
Joined: Mon Dec 04, 2017 1:49 am

Re: Rigid tapping

Post by TomKerekes » Mon Aug 02, 2021 10:42 pm

Hi Mateusz,

Your OnCWJog and OnCCWJog have this code to turn on the Spindle

Code: Select all

// turn spindle on CW and ramp to new speed
	EnableAxis(3);
	SetBit(SPINDLEENA_BIT);
	SetBit(SPINDLEHALT_BIT);
You will need to add this to the rigid tap program to turn on the Spindle.

Also those are controlling Axis 3 as the spindle. Did you set the Rigid Tap program to use Axis 3?
Regards,

Tom Kerekes
Dynomotion, Inc.

User avatar
TomKerekes
Posts: 1598
Joined: Mon Dec 04, 2017 1:49 am

Re: Rigid tapping

Post by TomKerekes » Mon Aug 02, 2021 11:04 pm

while (TotalCut < Bottom)

In my understanding, TotcalCut being 0 and Bottom a negative value most of the times the program will never enter the loop and then no tapping... (for the Jim version it seems correct to me) that would explain why it does not do anything on your machine or mine.
You are correct that version v1 has bugs. Is the v1_Jim version working for you?

For what I see, the F parameter is not even used in the code, but S is, this is maybe why you need to activate the spindle before. Maybe replace Fxx by Sxxx will be enough in your case.
yes the z motion is slaved to the Spindle motion based on the Pitch.
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid tapping

Post by Mateusz » Tue Aug 03, 2021 2:56 pm

Hi Tom,

Simple is that ...I managed to write spindle start ,,, works as it should,

Last Thing regarding Tapping..I hope:
How to change spindle rotation direction in this code ? I tried few things but always was something wrong. At the moment tapping cycle is in CCW and retracting in CW direction.

Thanks
Mateusz

User avatar
TomKerekes
Posts: 1598
Joined: Mon Dec 04, 2017 1:49 am

Re: Rigid tapping

Post by TomKerekes » Tue Aug 03, 2021 3:22 pm

Hi Mateusz,

Is M3 configured for OnCWJog.c? Does M3 run the Spindle CW?

Post the tapping program you are using.
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid tapping

Post by Mateusz » Tue Aug 03, 2021 4:35 pm

Hello Tom,
Is M3 configured for OnCWJog.c? Does M3 run the Spindle CW?

Correct , Yes it does spin in CW direction
Attachments
RigidTapMultiPassJogM119_v1_Jim.c
(4.32 KiB) Downloaded 13 times

Post Reply