G-Code

From Wiki

Jump to: navigation, search

Contents

RapMan G-Code

Movement Codes

G0 Rapid Motion Implemented - supports X, Y, and Z axes.
G1 Coordinated Motion Implemented - supports X, Y, and Z axes.
G2 Arc – Clockwise (Not used by Skienforge)
G3 Arc - Counter Clockwise (Not used by Skienforge)
G4 Dwell Implemented.
G20 Inches as units Implemented.
G21 Millimetres as units Implemented.
G28 Go Home Implemented. (X = -135mm, Y = 100mm, Z = 0mm)
G90 Absolute Positioning Implemented. 
G91 Incremental mode
G92 sets an origin offset, which is currently used to set the extruder 2 X,Y offset from extruder 1.

G1

Coordinated Motion

G1 X-53.67 Y52.16 Z0.54 E54.394 F213.333

Go to X=-53.67, Y=52.16, Z=0.54 using SPEED=213.333 mm per minute (3.5mm/sec)
E is distance and is still not implemented in RapMan firmware
Note that if E values (E-code) exists for the G1 the RapMan firmware up to 1.0.5 will not parse it properly and will cause all different problems during print. You can disable E value generation in INSET tab by setting the "Extrusion Distance Format Choice" to "Do Not Add Extrusion Distance".

Special functions (M Codes)

M101 Turn extruder  1 on Forward.
M102 Turn extruder 1 on Reverse. (?)
M103 Turn all extruders off.
M104 S145.0 Set Extruder 1 target temperature to 145.0 C.
M105 Custom code for temperature reading. (Not used)
M106 Turn fan on.
M107 Turn fan off.
M108 S400 Set Extruder 1 speed to S value/10 = 40rpm.
M201 Turn second extruder on Forward.
M204 S145.0 Set Extruder 2 target temperature to 145.0 C
M208 S400 Set Extruder 2 speed to S value/10 = 40rpm.
M210 AUX 1 off
M211 AUX 1 on 
M220 AUX 2 off
M221 AUX 2 on
M222 Set speed of fast XY moves 
M223 Set speed of fast Z moves 
M224 Enable extruder motor during fast move
M225 Disable extruder motor during fast move
M226 Pause the printer until ESC key is pressed
M227 S1000 P800 on extruder stop (M103) reverse the extruder stepper for S turns and on extruder start (M101)
M228 - Disable M227
M229 - Same as M227 but P and S parameters specify prime and reverse extruder thread revolutions (not stepper steps)
M301 Turn extruder 3 on Forward.
M304 S145.0 Set target temperature of extruder 3  to 145.0 C
M308 S400 Set Extruder 3 speed to S value/10 = 40rpm. (Note to turn off extruders 2 and 3 use M103 which turns off all extruders) 
M542 - Enter 3000 nozzle wipe / move to RapMan rest location
M543 - Exit 3000 nozzle wipe / does nothing on RapMan
M551 / M552 / M553 - Prime extruder 1 / 2 / 3.  Parameter P = stepper steps, S = RPM * 10
M561 / M562 / M563 - Reverse extruder 1 / 2 / 3.  Parameter P = stepper steps, S = RPM * 10

Future functions (M Codes)

M codes that may be introduced for the RepRap
M120 Pgain PWM control values
M121 Igain “
M122 Dgain “
M123 Imax “
M124 Imin “

Typical File header produced by Skeinforge

G21 millimeter system selection
G90 absolute distance mode
G28 Return to home position
M222 S1024 Manually added to file M222 S500 Set speed of fast XY moves. Default value 500 -V1.0.5
M223 S768 Manually added to file M223 S500 Set speed of fast Z moves. Default value 500 -V1.0.5
M103 Turn extruder OFF.
M105 Custom code for temperature reading – not used by RapMan
M104 S247.0 Set temperature to 145.0 DegC.
G1 X0.0 Y0.0 Z0.0 F480.0 linear interpolation
M101 Turn extruder ON.
Main code follows

Downloadable pdf

Here is a pdf file (correct as of 9 August 2010) of the above g-code for easy reference Media:G-Code.pdf

Personal tools