Welcome! Log In Create A New Profile

Advanced

G-code syntax

Posted by Arvin 
G-code syntax
December 21, 2008 12:37PM
In reading the "gcode_interpreter v1.3" code

I see it implements...
Quote

G-codes:
0 rapid positioning
1 linear interpolation uses XYZ+float and F+float
2 clockwise arc (uses I and J for center)
3 counterclockwise arc (uses I and J for center)
4 dwell P20 to wait 20 seconds
20 inches
21 mm
28 go reference point (home?)
30 go home via an intermediate point
90 absolute positioning (abs_mode = truewinking smiley
91 incremental positioning (abs_mode = falsewinking smiley
92 set as home
93 Inverse Time Feed Mode (stubbed, not implemented)
94 Feed per Minute Mode (stubbed, not implemented)

and M-codes
0 stop program (stubbed, not implemented)
1 optional stop (stubbed, not implemented)
2 program end (stubbed, not implemented)
100 set max extruder speed, 0-255 pwm using "P"
101 extruder on, forward
102 extruder on, reverse
103 extruder off
104 set temperture control uses "P"
105 read temperature sends "T:" plus temp
106 turn fan on (pwm at 255)
107 turn fan off (pwm 0)
108 P[TEMP] - Dwell until extruder temperature reaches P (+-1 degrees). Also has the side effect of setting the target extruder temperature. (implicit M104)
109 uses P+float
110 uses p+float
111 ????
113 ????

does anyone have a complete list of the codes and their syntax?
emt
Re: G-code syntax
December 21, 2008 03:01PM
Reprap G Codes here:-

[reprap.org]

Reprap M codes here:-

[reprap.org]


Regards

Ian
Re: G-code syntax
December 21, 2008 03:35PM
Thanks for the links...Not everything is covered.

I should have been more specific.
109 uses P+float
110 uses p+float
111 ????
113 ????

Here's some gcode I cut from the top of a file from back in April.

( GCode generated by April 20,2007 Skeinforge )
( Extruder Initialization )
M100 P210
M103
M105
M108 P0.8
M109 P0.747
M110 P0.747
G21
G90
G28
M111 Pslice
M111 Pfill
M112
( Extruder Movement )
( Extruder paths for layer 0 of 123_Block )
M113

Got any info?
Re: G-code syntax
December 22, 2008 12:11AM
That Gcode looks like it's about a year and a half out of date, and Skeinforge has been evolving heavily (thanks tons Enrique!), Run the latest version and see if you still get those. I really only use M101, M103, M104, M105, and M108. I fixed up my PID gains in the firmware, so I don't have to remember to send them each time.

Have a look at the "process_string.pde" file for whichever firmware version you're looking at; you can see exactly what the specific codes do in there.

I know I occasionally code up a new M code to test something out temporarily, but unless it's on the webpage Ian posted I wouldn't count on it being anything important.

Wade
emt
Re: G-code syntax
December 22, 2008 04:12AM
I think those codes were used by Skeinforge to pass instructions as code was processed by the tool chain. I guess they have all been eliminated as Enrique has refined the software.


Regards

Ian
Re: G-code syntax
December 22, 2008 09:22AM
Ok....I didn't get as far as the year in reading the date! I'll look for a more recent version.

Sorry for the trouble.
Arvin
Re: G-code syntax
June 17, 2009 09:18AM
Hi,
what does the F mean in these lines of gcode? I understand some sort of 'float', but what is that?

G1 X14.94 Y-1.31 Z21.2 F960.0
G1 X15.72 Y-1.37 Z21.2 F960.0
G1 X15.86 Y-1.43 Z21.2 F960.0
G1 X16.05 Y-1.56 Z21.2 F960.0

I understand the G1 and the co-ordianate system but can't work out what the F means.
Thanks,
Lewis

Edited 1 time(s). Last edit at 06/17/2009 09:22AM by Lewis.
Re: G-code syntax
June 17, 2009 11:19AM
Feed rate in mm / minute.


[www.hydraraptor.blogspot.com]
Re: G-code syntax
June 18, 2009 05:48AM
Thanks a lot, but I thought that was controlled by the rpm on the reprap and in the mcode. Unless I am misunderstanding what feed rate is?
Lewis
Re: G-code syntax
June 18, 2009 06:54AM
Feed rate in this context is how fast the axes move, not the extruder feed rate.


[www.hydraraptor.blogspot.com]
Re: G-code syntax
June 18, 2009 08:58AM
That makes sense. Thanks
Lewis
Sorry, only registered users may post in this forum.

Click here to login