Rigid Tapping with a speed controlled spindle
- tnl.lambert
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 1
16 Jul 2015 02:10 #60641
by tnl.lambert
Rigid Tapping with a speed controlled spindle was created by tnl.lambert
I'm configuring a 4-axis CNC machine to do rigid tapping.
The spindle has an encoder, and we can command specific positions to achieve a toolchange.
However, a G33.1 command results in a 'missing K-word' error. (input is G33.1 Z-0.25 K0.05)
I've tried slowing the spindle down below 5RPM just in case, and I'm using version 2.6. Any ideas?
The spindle has an encoder, and we can command specific positions to achieve a toolchange.
However, a G33.1 command results in a 'missing K-word' error. (input is G33.1 Z-0.25 K0.05)
I've tried slowing the spindle down below 5RPM just in case, and I'm using version 2.6. Any ideas?
Please Log in or Create an account to join the conversation.
17 Jul 2015 18:26 #60680
by BigJohnT
Replied by BigJohnT on topic Rigid Tapping with a speed controlled spindle
Can you provide a bit bigger snippet of the G code, the K word is in what you show but the error always says "near" line so and so.
JT
JT
Please Log in or Create an account to join the conversation.
- tnl.lambert
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 1
17 Jul 2015 20:58 #60687
by tnl.lambert
Replied by tnl.lambert on topic Rigid Tapping with a speed controlled spindle
Please Log in or Create an account to join the conversation.
- johns00056
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 2
18 Jul 2015 17:47 - 18 Jul 2015 17:55 #60719
by johns00056
Replied by johns00056 on topic Rigid Tapping with a speed controlled spindle
I think that you need g80 (cancel canned cycle) after the tapping line. Linuxcnc is still in tapping mode
on line n85 and is looking for the k value.
I usually put g80 g90 g0 after each tapped hole to rapid to the next location.
on line n85 and is looking for the k value.
I usually put g80 g90 g0 after each tapped hole to rapid to the next location.
Last edit: 18 Jul 2015 17:55 by johns00056.
Please Log in or Create an account to join the conversation.
18 Jul 2015 18:27 #60720
by BigJohnT
G33.1 is not a canned cycle and does not need a G80, you can verify that by reading the manual or try a second pair of coordinates after the G33.1
JT
Replied by BigJohnT on topic Rigid Tapping with a speed controlled spindle
I think that you need g80 (cancel canned cycle) after the tapping line. Linuxcnc is still in tapping mode
on line n85 and is looking for the k value.
I usually put g80 g90 g0 after each tapped hole to rapid to the next location.
G33.1 is not a canned cycle and does not need a G80, you can verify that by reading the manual or try a second pair of coordinates after the G33.1
JT
Please Log in or Create an account to join the conversation.
18 Jul 2015 18:31 #60721
by BigJohnT
Can you attach the G code instead of photo? It's hard to copy and paste a photo.
I don't see anything that jumps out at me but I would like to run it in sim. I assume line one is %. Be aware of the ramifications of wrapping your code in % instead of using a program stop.
JT
Replied by BigJohnT on topic Rigid Tapping with a speed controlled spindle
The error is highlighted on the G33.1 line directly, and I've attached a picture of the g-code segment.
Can you attach the G code instead of photo? It's hard to copy and paste a photo.
I don't see anything that jumps out at me but I would like to run it in sim. I assume line one is %. Be aware of the ramifications of wrapping your code in % instead of using a program stop.
JT
Please Log in or Create an account to join the conversation.
- johns00056
- Offline
- Premium Member
Less
More
- Posts: 108
- Thank you received: 2
18 Jul 2015 19:03 - 18 Jul 2015 19:58 #60724
by johns00056
Replied by johns00056 on topic Rigid Tapping with a speed controlled spindle
I just tried my machine (linuxcnc 2.5.3 ) and It seems like I always get a "k word missing " error if the next line
after g33.1 does not have a g80.
Edit - a g1 or a go in the next line, before movement, also seems to correct the problem.
after g33.1 does not have a g80.
Edit - a g1 or a go in the next line, before movement, also seems to correct the problem.
Last edit: 18 Jul 2015 19:58 by johns00056.
Please Log in or Create an account to join the conversation.
18 Jul 2015 19:17 - 18 Jul 2015 19:18 #60725
by BigJohnT
Replied by BigJohnT on topic Rigid Tapping with a speed controlled spindle
Here is my ngcgui rigid tapping subroutine that I use daily on 2.5 on my CHNC.
(info: Rigid Tapping)
o<tap>sub
#<thread-type> = #1 (=0 0=TPI 1=MM)
#<thread> = #2 (TPI/Pitch)
#<Z_Start> = #3 (=0.100 Z Clearance)
#<T_Depth> = #4 (End of Thread)
#<RPM> = #5 (Spindle RPM)
#<ToolNumber> = #6 (Tool Number)
#<Coolant> = #7 (=8 Coolant 8 On 9 Off)
G7 G17 G20 G40 G80
T#<ToolNumber> M6 G43
o110 if [#<thread-type> EQ 0]
#<pitch> = [1 / #<thread>]
G20
o110 else
#<pitch> = #<thread>
G21
o110 endif
; Tap the Hole
o120 if [#<thread-type> EQ 0 OR #<thread-type> EQ 1]
S#<RPM> M3 M#<Coolant>
G0 X0.000 Z#<Z_Start>
G33.1 X0.000 Z#<T_Depth> K#<pitch>
M5 M9
G53 G0 X0 Z0
o120 else
(msg, you dufus you didn't use a proper thread type)
o120 endif
; Restore to normal units
G20
o<tap>endsub
Last edit: 18 Jul 2015 19:18 by BigJohnT.
The following user(s) said Thank You: tnl.lambert
Please Log in or Create an account to join the conversation.
18 Jul 2015 19:20 - 18 Jul 2015 19:22 #60726
by BigJohnT
Replied by BigJohnT on topic Rigid Tapping with a speed controlled spindle
And here is a G code file that I run regularly on my 2.6 mill... and you can see that G33.1 is called for every hole and is not a canned cycle.
Canned Cycles:
www.linuxcnc.org/docs/html/gcode/gcode.html#sec:G80-G89
Canned Cycles:
www.linuxcnc.org/docs/html/gcode/gcode.html#sec:G80-G89
(PART - )
(NOTES - CUP HOLDER VELCRO OP1 DRILL AND TAP)
G17 G20 G40 G49 G54 G64 P0.005 G80 G90 G94
M05 G40 G49 G80
M09
(0.1495" #25 DRILL)
T1 M06 G43
G00 X0.1875 Y-0.261 S1800 M03
M0
Z0.25
G00 X0.1875 Y-0.261 Z0.25
Z0.1
G01 Z-0.556 F12.0 S1800
G00 Z0.1
Z0.25
X1.0625
Z0.1
G01 Z-0.556
G00 Z0.1
G00 Z0.25
M05 G40 G49 G80
M09
(10-24 HSS TAP)
T2 M06 G43
G00 X0.1875 Y-0.261 S900 M03
M0
Z0.25
G00 X0.1875 Y-0.261 Z0.25
G33.1 X0.1875 Y-0.261 Z-0.400 K0.0416
G0 X1.0625
G33.1 X1.0625 Y-0.261 Z-0.400 K0.0416
M5
G53 G0 Z0
G0 X0 Y0
M2
Last edit: 18 Jul 2015 19:22 by BigJohnT.
Please Log in or Create an account to join the conversation.
- tnl.lambert
- Offline
- Junior Member
Less
More
- Posts: 37
- Thank you received: 1
18 Jul 2015 19:28 #60727
by tnl.lambert
Replied by tnl.lambert on topic Rigid Tapping with a speed controlled spindle
Ok, so there is no major reason in the g-code that would cause the error? Maybe this is sliding towards an advanced configuration post, but I'll provide a theory of mine - I use a custom orient code that uses a separate PID loop. It is connected to motion.spindle-index-enable, so the PID loops change over when M19 is called. Will that be an issue?
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds