G-code format

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
18 May 2010 11:30 #2893 by piasdom
G-code format was created by piasdom
when writing g codes, is it possible to comment out a paragraph? as in /* */ in c++
Thanks for any help.

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

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
18 May 2010 14:34 #2894 by piasdom
Replied by piasdom on topic Re:G-code format
one more thing i found. when i use "touch off" and enter 1in, the tool table
shows .218839 as the offset. the position is correct, but don't know why this is.
i have EMC2 2.4 in hardy Thanks

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

More
18 May 2010 23:51 #2900 by BigJohnT
Replied by BigJohnT on topic Re:G-code format
Comments

www.linuxcnc.org/docview/html//gcode_overview.html#r1_14

When you home you set the Z (I assume your talking about Z) axis to 0. Then you load a tool and move to 1.218839" from there and call that 1" so then your offset is .2148839" ... I think LOL. Offsets can be confusing at best... Another thing to note if your loading tools with TnM6 don't for get to use the offset with a G43... and tool touch off does a magic G43 for you when you touch off.

John

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

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
19 May 2010 10:22 #2904 by piasdom
Replied by piasdom on topic Re:G-code format
yes i was talking about Z. but i didn't use g43, just the touch off. and "IT" wrote .2148839. before the tool
offset was 0 in the tool table. the touch off changed it to .2148839 not i. and in "touch off" i entered 1in.
thanks BigJohnT

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

More
19 May 2010 11:13 - 19 May 2010 11:15 #2906 by BigJohnT
Replied by BigJohnT on topic Re:G-code format
When you entered 1" in the touch off window it took and offset of .2.... + your current location to = 1. When you have a TnM6 in your code make sure you have a G43 after it so the tool offset will be applied. The tool touch off issues a G43 it automatically when you press the touch off button.

What did the DRO show for Z before you touched off? and after you touched off?

John
Last edit: 19 May 2010 11:15 by BigJohnT.

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

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
19 May 2010 11:30 #2909 by piasdom
Replied by piasdom on topic Re:G-code format
i don't remember what it was before, some random number as i was just starting a job.
after touch off it showed 0 and on the screen i saw the tool move to the offset, my mill didn't
move, just the endmill on screen. thanks for your help.and i'll remember to use g43
after m6tn.

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

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
20 May 2010 11:01 #2922 by piasdom
Replied by piasdom on topic Re:G-code format
one more thing, as far as the forum goes, i haven't been getting any email/questions from the forum i moderate.
(if i'm still moderator) if there have been no questions,do we really need this forum? if not, i'll be willing to help
any way i can.

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

More
20 May 2010 11:11 #2925 by BigJohnT
Replied by BigJohnT on topic Re:G-code format
Yep your still moderator and yes the traffic seems to be low in those areas.

John

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

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
21 May 2010 11:58 - 21 May 2010 18:13 #2952 by piasdom
Replied by piasdom on topic Re:G-code format
another problem.
how deep can you call a subroutine? the program i have loads with no errors but doesn't run.
so i'm guessing i can't "call" as many as i have.
i have this;

%

g17 g20 g40 g49 g80 g90 g94 (Mill 4 Port)

o109 sub (the whole file under subroutine o109)
o101 sub (cutting closer to finish)
x.02 y.02
y2.29
x1.23
y.02
x.02

g0 x.05 y.05
o101 endsub
o102 sub
(Cleanup Top)
g1 f4 x.05 y.05
x1.1
y2.26
x.05
y.05
x.175 y.175
x.95
y2.11
x.175
y.175
x.3 y.3
x.8
y1.96
x.3
y.3
x.425 y.425
x.65
y1.75
x.475
y.6
g0 z.2
o102 endsub


o103 sub
(Roughing Step)
g1 f4 x.02 y.02
y2.01
x.92
y2.29
x1.23
y1.77
x.98
y.08
x1.23
y.02
x.02
x.05 y.05
(step cleanup)
x.8
y1.85
x1.075
y2.1
y1.85
x.15
y.1
x.65
y1.7
x.3
y.2
x.5
y1.5
g0 z.2
o103 endsub

o104 sub
(finish sides of step)
g1 f4 x.01 y.01
y2.02
x.91
y2.3
x1.24
y1.76
x.99
y.09
x1.24
y.01
x.01

(step finish)
x.003 y.003
y2.03
x.9
y2.31
x1.25
y1.75
x1
y.1
x1.25
y0
x.003

f8 y2.03
x.9
y2.31
x1.25
y1.75
x1
y.1
x1.25
y0
x.003
g0 x.05 y.05
z.5
o104 endsub
o105 sub (finish top)
g0 x.05 y.05
g1 f4 z-.69
x.015 y.015
y2.295
x1.235
y.015
x.015

x.01 y.01
y2.3
x1.24
y.01
x.01

x.005 y.005
y2.305
x1.245
y.005
x.005

x0 y0
y2.31
x1.255
y0
x0

f8 y2.31
x1.255
y0
x0

g0 x.05 y.05
z.2
o105 endsub

(program start)
g0 x.05 y.05
z.1
g1 f4 z-.1
o101 call
g1 f4 z-.2
o101 call
o102 call
g0 x.05 y.05
z.1
g1 f4 z-.3
o101 call
g1 f4 z-.4
o101 call
o102 call
g0 x.05 y.05
z.1
g1 f4 z-.5
o101 call
g1 f4 z-.6
o101 call
o102 call
g0 x.05 y.05
z.1
g1 f4 z-.67
o101 call
o102 call
g0 x.05 y.05
z.1
g1 f4 z-.69
o101 call
o102 call
g0 x.06 y.06 (end Top)
z.1
g1 f4 z-.69
o105 call
x.05 y.05
g1 f4 z-.77
o103 call
g0 x.05 y.05
g1 f4 z-.8
o103 call
x.05 y.05
g1 f4 z-.8
o104 call
o109 endsub (end subroutine o109)
m6 t1
g0 x.1 y-.1
z.1
o109 call
g0 z1
x0 y0


g17 g20 g40 g49 g80 g90 g94

m2
%
Last edit: 21 May 2010 18:13 by piasdom.

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

  • piasdom
  • piasdom's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
21 May 2010 12:10 #2953 by piasdom
Replied by piasdom on topic Re:G-code format
well, i got it to run the first subroutine(o101), but it doesn't show the path when it loads.
it just makes the round and ends.

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

Time to create page: 0.091 seconds
Powered by Kunena Forum