Hello Guest it is December 11, 2019, 05:36:31 AM

Author Topic: G-Code Help!!!  (Read 3101 times)

0 Members and 1 Guest are viewing this topic.

G-Code Help!!!
« on: June 27, 2011, 09:33:12 PM »
Let me start off by saying that I am by no means what I would consider  a programmer.  I am a conventional tool maker by trade going on twenty years.  A few years back I started doing 3d modeling and then shortly after I was thrust into cnc programming working off part geometry in models.  I use Alibre Cad/Cam and it was pretty much there it is heres the machine and let us know if you need anything else.  Of course as painful as it can be sometimes the hard way isn't all ways the bad way.  Memory retentions seems to improve with hard lessons.  Last year I decided to build my own cnc wood router.  I done all of the design work, build, and wiring. Alot of help was provided by other users posts, as most of the problems I ran into had already been answered here.  Machine is running good, finished my first gun stock this past weekend.  The 3d contouring worked great and everything was up to par.  The only problem I had is that I can't drill holes.  I know sounds stupid can cut a 3d contour but can't drill a simple hole.  That's what I thought!!!  It would travel to all the points where the holes should have been but then set there momentarily then move on the the next one.  No movement in the Z axis.  I remember in the set up of my stepper motors that it said something about setting them up as a Sherline.  That being said when I picked my post processor I choose Mach3-Sherline.  Not to say that I am right in doing so by any means, just hoping someone could possibly point me in the right direction if I am incorrect.  Everything else on the machine is working great.  I am attaching a simple drill program(break chip) that I wrote for an example.  I have looked I can see where you can edit your post processor, but being fairly new to Mach 3 I don't exactly know what I might need  to change.  I am hoping that some of you guys that wrote g-code before cam packages were available could look at the sample program and point me in the right direction.  Thanks for all of the help, this forum rocks!!!


N1 G00 G49 G40.1 G17 G80 G50 G90
N2 G20
N3 (Breakchip Drill )
N4 M6 T5
N5 M03 S8000
N6 G00 G43 H1 Z1
N7 G01 X0.8750 Y-0.7500 Z0.2870 F3000.0
N8 M8
N9 G00
N10 G73 X0.8750 Y-0.7500 Z-1.108 R0.1 L0.0 Q0.1
N11G80
N12 G00 Z0.2870
N13 G73 X3.1250 Y-0.7500 Z-1.108 R0.1 L0.0 Q0.1
N14G80
N15 G00 Z0.2870
N16 G73 X3.1250 Y-3.2500 Z-1.108 R0.1 L0.0 Q0.1
N17G80
N18 G00 Z0.2870
N19 G73 X0.8750 Y-3.2500 Z-1.108 R0.1 L0.0 Q0.1
N20G80
N21 G00 Z0.2870
N22 G00 Z1
N23 M5 M9
N24 M30

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: G-Code Help!!!
« Reply #1 on: June 27, 2011, 10:22:38 PM »
I believe that L is the hole quantity, and you have L=0.
Either set L to 1. or remove the L completely.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: G-Code Help!!!
« Reply #2 on: June 27, 2011, 10:27:24 PM »
The H command should be tie with the tool number, T5 and H5, not sure about every thing else.


Jeff
Re: G-Code Help!!!
« Reply #3 on: July 06, 2011, 09:59:40 PM »
Sorry guys, the g code is somewhat over my head.  I reference it at work for x y z moves and look at the types of moves that it is calling, but I have to refer to chart to understand what they all mean.  I am going to post through some of the Mach 3 post processors I have and see if the g code files turn out any different.  I appreciate the help and would be glad to share the results if you would like.  Should have learned G code first but didn't have the opportunity.  Crash coarse here we come!!!!
Re: G-Code Help!!!
« Reply #4 on: July 06, 2011, 10:10:49 PM »
Gerry,

I am enclosing the same file part post with a Mach 3 Sherline Post and a Mach 3 Post.  I believe that you are correct, in the plain Mach 3 post the L is not in the g-code.  I am going to show examples.  Thanks for the help I will try this on the machine tomorrow.  Hopefully it won't affect the 3d contouring by changing the post.

Mach 3 Sherline

N1 G00 G49 G40.1 G17 G80 G50 G90
N2 G20
N3 (Breakchip Drill )
N4 M6 T3
N5 M03 S18000
N6 G00 G43 H1 Z1
N7 G01 X1.7548 Y-2.2978 Z0.2670 F100.0
N8 M8
N9 G73 X1.7548 Y-2.2978 Z-1.0964 R0.1 L0.0 Q0.1
N10G80
N11 G01 Z0.2670 F10.0
N12 G73 X1.1053 Y-0.6981 Z-1.0964 R0.1 L0.0 Q0.1
N13G80
N14 G01 Z0.2670 F10.0
N15 G73 X4.0235 Y-0.9017 Z-1.0964 R0.1 L0.0 Q0.1
N16G80
N17 G01 Z0.2670 F10.0
N18 G00 Z1
N19 M5 M9
N20 M30

Mach 3 Post

G00 G49 G40.1 G17 G80 G50 G90
G20
(Breakchip Drill )
M6 T3
M03 S18000
M8
G01 X1.7548 Y-2.2978 Z0.2670  F100.0
X1.7548 Y-2.2978
G73 X1.7548 Y-2.2978 Z-1.0964 R0.1 Q0.1 F10.0
G80
G01 Z0.2670  F10.0
X1.1053 Y-0.6981
G73 X1.1053 Y-0.6981 Z-1.0964 R0.1 Q0.1 F10.0
G80
G01 Z0.2670  F10.0
X4.0235 Y-0.9017
G73 X4.0235 Y-0.9017 Z-1.0964 R0.1 Q0.1 F10.0
G80
G01 Z0.2670  F10.0
G00 Z1
M5 M9
M30


Re: G-Code Help!!!
« Reply #5 on: July 06, 2011, 10:36:53 PM »
I had the same problem, but I was using G83 for the peck drilling. I think they're close enough that it's the same problem.

If I didn't have a feed rate defined, the spindle would go to the position, pause for a second, then move to the next drill position and repeat. Once I defined the feed rate (F10.0 in my case), it worked as expected. For some reason this only seemed to be a problem if the file only contained drilling operations, or if the drilling operations were first. That's the part I can't explain.