Helical milling with a diagonal repeat ?

More
27 Dec 2013 16:21 - 12 Jul 2014 10:18 #42058 by cncnoel
Hi, I couldn't help myself, I had to play with the code!!! :pinch:
Have a look at the way I have used subroutines & named parameters.
Hope thrre's some constructive learning & comments from this.

g02 y-5 J-2.5 z-10 P5

The P5 makes interpreter take 5 passes to spiral down to z-10, that is 10/5=2mm per pass.

Noel
Attachments:
Last edit: 12 Jul 2014 10:18 by cncnoel. Reason: formula corection

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

More
11 Jul 2014 14:03 #48635 by markjacks
When I try to use this type of code The machine ramps up and down for each pass. Is there a way to turn off ramping so the helix cuts continuous?

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

More
11 Jul 2014 15:11 #48638 by ArcEye
Hi

You have bumped a very old thread, most of it is 4 years old.

There are also several bits of code in it.

If you start a new thread, with the code you are using attached and clarify what you mean by 'ramping', I am sure someone can assist.

regards

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

More
12 Jul 2014 05:45 - 12 Jul 2014 06:38 #48670 by cncnoel
@ArcEye
Probably my fault .... :woohoo:
see my previous comments about me "fiddling" with your code :whistle:

All said & done it's all about learning & sharing info,
and this post is about helical milling after all.
I thought I could contribute by showing how to spiral-mill a hole
with a continuous helix using the P[n] option passed to a G2/G3 command.


@markjacks
ramping up/down as in xy feed rate increase/decrease, or as in Z travel up/down??

I am using version 2.53 and my active G codes while running the file are;
G1 G17 G40 G21 G90 G94 G54 G49 G99 G64
G97 G91.1 G8 M30 M5 M9 M48 M53 M0 F250
Attachments:
Last edit: 12 Jul 2014 06:38 by cncnoel.

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

More
13 Jul 2014 02:23 #48695 by markjacks
Okay, I am getting some ideas to try from your post. Attached is the way I have been doing it. I am pretty sure it is ramping the XY.
Attachments:

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

More
13 Jul 2014 06:48 #48705 by markjacks
Okay, the "P(x)" is the ticket.
I am getting nice smooth cuts now.
Thanks so much!
I am learning lots of other stuff from that g-code you posted too. 'Nice piece of work.

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

More
14 Jul 2014 08:37 - 14 Jul 2014 09:08 #48746 by cncnoel
Glad to hear you're making good progress markjacks B)

As you've probably noticed, the <tunepin> subroutine uses the values, whereas the <hole> subroutine uses named GLOBAL variables.
A named global variable has an underscore before it's name as in #<_safeZ>, and once defined (#<_safeZ> = 5.0) can be used in any subroutine.
A named LOCAL variable such as #<Feed> (no underscore) can’t be accessed outside of its subroutine - that way you can
use the same parameter name with a different value in different subroutines.

I like to use lots of white space in my G-code too, because it makes it easier for me to read (6 or so months) later on. Because the interpreter ignores
white space, it makes good sense for us humans to take advantage of this.
G91 
G1 F500 Y1.1
(HELIX-BORE TO DEPTH) 
    G3 Y-2.2 J-1.1 Z-0.1
       Y 2.2 J 1.1 Z-0.1
       Y-2.2 J-1.1 Z-0.1
       Y 2.2 J 1.1 Z-0.1
       Y-2.2 J-1.1 Z-0.1
       Y 2.2 J 1.1 Z-0.1
       Y-2.2 J-1.1 Z-0.1
       Y 2.2 J 1.1 Z-0.1
(STAY AT BOTTOM) 
G1 F500 Z-0.1
        Y-2.2 J-1.1
        Y 2.2 J 1.1
(RETURN TO POSITION) 
G1 F500  Y-1.1
   F1000 Z 1
G90 
is a lot easier to read than
G91 
G1 F500 Y1.1
(HELIX-BORE TO DEPTH) 
G3 f500 Y-2.2 J-1.1 Z-0.1
G3 f500 Y2.2 J1.1 Z-0.1
G3 f500 Y-2.2 J-1.1 Z-0.1
G3 f500 Y2.2 J1.1 Z-0.1
G3 f500 Y-2.2 J-1.1 Z-0.1
G3 f500 Y2.2 J1.1 Z-0.1
G3 f500 Y-2.2 J-1.1 Z-0.1
G3 f500 Y2.2 J1.1 Z-0.1
(STAY AT BOTTOM) 
G1 f500 Z-0.1
G3 f500 Y-2.2J-1.1
G3 f500 Y2.2J1.1
(RETURN TO POSITION) 
G1 f500 Y-1.1
G1 f1000 Z1
G90 

I have my text editor set to show a right margin at 80 characters & tabs set to 4 spaces
& lately I have set it to replace tabs with spaces, so when using a different editor, things still align OK.

Playing with white space a bit, adding the P parameter, plus sexy entry an exit maneuvers (improves work finish) your code might look like
(Hole Centre)
G90
G00 Z10  F500
    X100 Y100
    Z0.1
    
(Swoop in)
G91
G2 Y-1.1 J-0.55 Z-0.1 

(Helix bore to depth)
    J1.1 Z-0.8 P8.0
    J1.1

(Helix out) 
    J1.05 Z0.9

(Hole Centre)
G90
G00 Z10
    X100 Y100
M30
I prefer my comments off to the right so the flow of the code isn't interrupted.
Here is an over-commented example, using a line-feed to separate the sections
(drill_code)
G90                     (absolute position)

G00 Z10  F500           (Safe height)
    X100 Y100           (Hole Centre)
    Z0.1                (pre-swoop height)
G91                     (increment position)

G2 Y-1.1  J-0.55  Z-0.1 (Swoop in) 
   J 1.1  Z-0.8 P8.0    (Helix bore to depth)
   J 1.1                (level at depth)
   J 1.05 Z0.9          (Helix out)    
G90                     (absolute position)

G00 Z10                 (Safe height)
    X100 Y100           (Hole Centre)
    
M30                     (sweep the chips up)
Hope this helps.
Regards to all
Noel
Last edit: 14 Jul 2014 09:08 by cncnoel.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum