Hello Guest it is October 21, 2019, 06:58:50 AM

Author Topic: Need help with this drawing for G Code  (Read 3640 times)

0 Members and 1 Guest are viewing this topic.

Need help with this drawing for G Code
« on: December 29, 2017, 01:12:16 PM »




Hi,

I am struggling with circular interpolation and g41/g42 offsets. As you can see from the tool path point 5 is not placed correctly.

Here is the code. How do I program to get to point 5???

%
n1 (P0) g00 x0 y0 z0
n2 (P1) g01  x0. y1.750 z0.250 f5 (Entering move)
n3 g01 g41 x0 y1 d1 f5 (g41 move to P1)
n4 g01 z-0.005  ( lower cutter to start cut)
n5 (P2) g02 x1 y1 r.625 f10
n6 (P3) g03 x1 y0 r.625 f10
n7 (P4) g03 x1 y-1 r.625 f10
n8 (P4) g01 z.250
n9 g01 x1.750 y-1.750 (Entering move)
n10 g01 g41  x1 y-1 z-.005
n11 g02 x0 y-1 r.625
m30

Thanks,

Billy

BTW, I also need to understand how to use the I and J commands for this example. I have read page 247 in Peter's book till I rubbed all the ink off the page...lol As this is programmed in all four quadrants it is a bit beyond my understanding at the moment.

Re: Need help with this drawing for G Code
« Reply #1 on: December 29, 2017, 03:31:49 PM »
Update

Here is the final code which worked but clipped the part by .010 at point 8.

I am sure there is a better way to do this!!

%
(Outside Profile)
( All radius .625)
n1 (P0) g00 x0 y0 z0
n2 (P1) g01  x0. y1.750 z0.250 f5 (Entering move)
n3 g01 g41 x0 y1 d1 f5 (g41 move to P1)
n4 g01 z-0.005  ( lower cutter to start cut)
n5 (P2) g02 x1 y1 r.625 f10
n6 (P3) g03 x1 y0 r.625 f10
n7 (P4) g03 x1 y-1 r.625 f10
n8 (P4) g01 z.250
n9 g01 x1.750 y-1.750 (Exit move from P4)
n10 (P4)g01 g41  x1 y-1 z-.005
n11 (P5) g02 x0 y-1 r.625
n12 (P6) g02 x-1 y-1 r.625
n13 (P7) g03 x-1 y0 r.625
n14 (P8) g02 x-1 y1 r.625

n15 (P8) g01 z.100
n16 (p9) g01 x0 y1.750 ( e move)
n17 (P9) g01 g42 x0 y1
n18 (P9) g01 z-.005
n19 (P9) g03 x-1 y1 r.625
n20 (P0) g01 z2
n21 (P0) g00 x0 y0
m30
%
 Perhaps I will ask the I,J question in another post.

Billy
Re: Need help with this drawing for G Code
« Reply #2 on: December 30, 2017, 02:47:14 AM »
I am sure there is a better way to do this!!

CAM software comes to mind. Being able to read and trouble shoot G-code is a great idea, but programing parts longhand is not the best way unless it is really simple like a square.

Of course this is just my opinion for what it is worth.

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Need help with this drawing for G Code
« Reply #3 on: December 30, 2017, 12:35:38 PM »
This is clearing a classroom exercise not a real part, so I’d say cam is out. I think you will find that programming without G41 and adding it after the tool path is proven will make it easier for you.  If Mach 3 is not in exact stop mode it will try to go around the P8 corner at speed and likely would round it off. The other inside corners are sharp enough to force an almost complete stop. Enable full stop mode and all the corners will be as expected.
Re: Need help with this drawing for G Code
« Reply #4 on: December 31, 2017, 05:30:33 AM »
theres an issue with your lines overlapping.....here look at this
Re: Need help with this drawing for G Code
« Reply #5 on: December 31, 2017, 06:10:40 AM »
trying to upload a pic but i dont have a place to host it. if you plot out the .625 R it overlaps at P5, try upping the R to .750 and try again.

Offline Tweakie.CNC

*
  • *
  •  7,953 7,953
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Need help with this drawing for G Code
« Reply #6 on: December 31, 2017, 06:36:34 AM »
Quote
trying to upload a pic but i dont have a place to host it.

Use the Reply tab then select Additional Options...

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: Need help with this drawing for G Code
« Reply #7 on: December 31, 2017, 07:16:58 AM »
ya but i cant upload a photo directly, I can only link to an image thats hosted elsewhere? never mind i found it
Re: Need help with this drawing for G Code
« Reply #8 on: December 31, 2017, 07:18:24 AM »
this is the overlap in green with the .625 radius. the red is .750R

Offline Tweakie.CNC

*
  • *
  •  7,953 7,953
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Need help with this drawing for G Code
« Reply #9 on: December 31, 2017, 07:48:56 AM »
Quote
ya but i cant upload a photo directly, I can only link to an image thats hosted elsewhere? never mind i found it

 :)

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.