<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://w.arbores.tech/w/index.php?action=history&amp;feed=atom&amp;title=G-code</id>
	<title>G-code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://w.arbores.tech/w/index.php?action=history&amp;feed=atom&amp;title=G-code"/>
	<link rel="alternate" type="text/html" href="http://w.arbores.tech/w/index.php?title=G-code&amp;action=history"/>
	<updated>2026-04-10T11:07:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.11</generator>
	<entry>
		<id>http://w.arbores.tech/w/index.php?title=G-code&amp;diff=16612&amp;oldid=prev</id>
		<title>Daniel K. Schneider: Text replacement - &quot;$&quot; to &quot;
{{edutechwiki}}&quot;</title>
		<link rel="alternate" type="text/html" href="http://w.arbores.tech/w/index.php?title=G-code&amp;diff=16612&amp;oldid=prev"/>
		<updated>2021-04-10T00:21:01Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;$&amp;quot; to &amp;quot; {{edutechwiki}}&amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:21, 10 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l233&quot;&gt;Line 233:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 233:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: RapMan]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: RapMan]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Hardware]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Hardware]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{edutechwiki}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Daniel K. Schneider</name></author>
	</entry>
	<entry>
		<id>http://w.arbores.tech/w/index.php?title=G-code&amp;diff=15973&amp;oldid=prev</id>
		<title>Daniel K. Schneider: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://w.arbores.tech/w/index.php?title=G-code&amp;diff=15973&amp;oldid=prev"/>
		<updated>2021-04-09T23:03:07Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:03, 10 April 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Daniel K. Schneider</name></author>
	</entry>
	<entry>
		<id>http://w.arbores.tech/w/index.php?title=G-code&amp;diff=15972&amp;oldid=prev</id>
		<title>Daniel K. Schneider: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="http://w.arbores.tech/w/index.php?title=G-code&amp;diff=15972&amp;oldid=prev"/>
		<updated>2019-09-12T09:50:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- &amp;lt;pageby nominor=&amp;quot;false&amp;quot; comments=&amp;quot;false&amp;quot;/&amp;gt; --&amp;gt;&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
According to [http://en.wikipedia.org/wiki/G-code Wikipedia], {{quotation|G-Code, or preparatory code or function, are functions in the Numerical control programming language. The G-codes are the codes that position the tool and do the actual work, as opposed to M-codes, that manages the machine; T for tool-related codes. S and F are tool-Speed and tool-Feed, and finally D-codes for tool compensation.}}&lt;br /&gt;
&lt;br /&gt;
See also &lt;br /&gt;
* [[Grbl]] a low cost alternative to parallel-port-based motion control for CNC milling that accepts g-code.&lt;br /&gt;
* [[Slicers and user interfaces for 3D printers]]&lt;br /&gt;
* [[Skeinforge for RapMan]] (A popular slicer program for RepRap and other machines)&lt;br /&gt;
&lt;br /&gt;
== Arduino g-codes ==&lt;br /&gt;
&lt;br /&gt;
* See [http://reprap.org/wiki/G-code G-code] page at RepRap wiki.&lt;br /&gt;
&lt;br /&gt;
== List of G-codes for the Rapman ==&lt;br /&gt;
&lt;br /&gt;
This is a g-code page for the [[RapMan]] printer.&lt;br /&gt;
&lt;br /&gt;
List of RapMan G-code (thanks to [http://rapmanv3.blogspot.com/2009/05/gcodes.html Bits from Bytes] blog:&lt;br /&gt;
RapMan special codes&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Code || Explanation || Example&lt;br /&gt;
|-&lt;br /&gt;
| G0 || Rapid Motion in X, Y, and Z axes. || G0 X10.0 Y20.0 Z1.15&lt;br /&gt;
|-&lt;br /&gt;
| G1 || Coordinated Motion in X, Y, and Z axes with speed F mm/minute. || G1 X10.0 Y20.0 Z1.15 F960.0&lt;br /&gt;
|-&lt;br /&gt;
| G2 || Arc – Clockwise (Not used by Skienforge) ||&lt;br /&gt;
|-&lt;br /&gt;
| G3 || Arc - Counter (Clockwise Not used by Skienforge) ||&lt;br /&gt;
|-&lt;br /&gt;
| G4 || Dwell Time || G4 S20&lt;br /&gt;
|-&lt;br /&gt;
| G20 || Inches as units used || G20&lt;br /&gt;
|-&lt;br /&gt;
| G21 || Millimetres as units used || G21&lt;br /&gt;
|-&lt;br /&gt;
| G28 || Go Home (far left) || G28&lt;br /&gt;
|-&lt;br /&gt;
| G90 || Absolute Positioning || G90&lt;br /&gt;
|-&lt;br /&gt;
| G92 || Set current as home || G92&lt;br /&gt;
|-&lt;br /&gt;
| M101 || Turn extruder on (forward/filament in). || M101&lt;br /&gt;
|-&lt;br /&gt;
| M102 || Turn extruder on Reverse (Still to add) ||&lt;br /&gt;
|-&lt;br /&gt;
| M103 || Turn extruder off. || M103&lt;br /&gt;
|-&lt;br /&gt;
| M104 || Set target temperature to 245.0 C. || M104 S245&lt;br /&gt;
|-&lt;br /&gt;
| M105 || Custom code for temperature reading. Not used ||&lt;br /&gt;
|-&lt;br /&gt;
| M106 || Turn fan on. || M106&lt;br /&gt;
|-&lt;br /&gt;
| M107 || Turn fan off. || M107&lt;br /&gt;
|-&lt;br /&gt;
| M108 || Set Extruder speed to S value/10 = 40rpm. || M108 S400&lt;br /&gt;
|-&lt;br /&gt;
| M220 || Turn off AUX V1.0.5 || M220&lt;br /&gt;
|-&lt;br /&gt;
| M221 || Turn on AUX V1.0.5 || M221&lt;br /&gt;
|-&lt;br /&gt;
| M222 || Set speed of fast XY moves || M222&lt;br /&gt;
|-&lt;br /&gt;
| M223 || Set speed of fast Z moves || M223&lt;br /&gt;
|-&lt;br /&gt;
| M224 || Enable extruder during fast moves || M224&lt;br /&gt;
|-&lt;br /&gt;
| M225 || Enable extruder during fast moves || M225&lt;br /&gt;
|-&lt;br /&gt;
| M226 || Pause RapMan as if pause button pressed || M226&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Typical file headers produced by the Skeinforge program&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| G21|| millimeter system selection&lt;br /&gt;
|-&lt;br /&gt;
| G90|| absolute distance mode&lt;br /&gt;
|-&lt;br /&gt;
| G28|| Return to home position&lt;br /&gt;
|-&lt;br /&gt;
| M222 S800 || Manually added to file. Set speed of fast XY moves. Default value 500 -V1.0.5&lt;br /&gt;
|-&lt;br /&gt;
| M223 S768 || Manually added to file. Set speed of fast Z moves. Default value 500 -V1.0.5&lt;br /&gt;
|-&lt;br /&gt;
| M103|| Turn extruder OFF.&lt;br /&gt;
|-&lt;br /&gt;
| M105|| Custom code for temperature reading – not used by RapMan&lt;br /&gt;
|-&lt;br /&gt;
| M104 S247.0 || Set temperature to 247.0 DegC.&lt;br /&gt;
|-&lt;br /&gt;
| G1 X0.0 Y0.0 Z0.0 F480.0 || example of linear interpolation at speed 480&lt;br /&gt;
|-&lt;br /&gt;
| M101|| Turn extruder ON.&lt;br /&gt;
|-&lt;br /&gt;
| Main|| code follows||.....&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example code ==&lt;br /&gt;
&lt;br /&gt;
Lines 1-12 from a Duplo-compatible block with a vertical hand on top (6.4cm X 6.4 cm x 13.5cm). The file has 79009 lines (!) and prints at medium speed/quality.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;DOS&amp;quot;&amp;gt;&lt;br /&gt;
G90&lt;br /&gt;
G21&lt;br /&gt;
M103&lt;br /&gt;
M105&lt;br /&gt;
M113 S1.0&lt;br /&gt;
M104 S255.0&lt;br /&gt;
G1 X-8.64 Y-69.23 Z0.84 F60.0&lt;br /&gt;
M101&lt;br /&gt;
M108 S595.0&lt;br /&gt;
G1 X-8.64 Y5.87 Z0.84 F200.0&lt;br /&gt;
G1 X-4.32 Y5.87 Z0.84 F200.0&lt;br /&gt;
G1 X-4.32 Y-69.23 Z0.84 F200.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 1057 and forward&lt;br /&gt;
&amp;lt;source lang=&amp;quot;DOS&amp;quot;&amp;gt;&lt;br /&gt;
M103&lt;br /&gt;
M108 S350.0&lt;br /&gt;
G1 X0.36 Y-63.63 Z2.72 F960.0&lt;br /&gt;
M101&lt;br /&gt;
G1 X0.36 Y-63.64 Z2.72 F1200.0&lt;br /&gt;
G1 X63.64 Y-63.64 Z2.72 F1200.0&lt;br /&gt;
G1 X63.64 Y-0.36 Z2.72 F1200.0&lt;br /&gt;
G1 X0.36 Y-0.36 Z2.72 F1200.0&lt;br /&gt;
G1 X0.36 Y-62.91 Z2.72 F1200.0&lt;br /&gt;
M103&lt;br /&gt;
G1 X1.15 Y-62.86 Z2.72 F960.0&lt;br /&gt;
M101&lt;br /&gt;
G1 X1.14 Y-62.86 Z2.72 F1200.0&lt;br /&gt;
G1 X1.14 Y-56.39 Z2.72 F1200.0&lt;br /&gt;
G1 X2.64 Y-56.39 Z2.72 F1200.0&lt;br /&gt;
G1 X2.64 Y-55.61 Z2.72 F1200.0&lt;br /&gt;
G1 X1.14 Y-55.61 Z2.72 F1200.0&lt;br /&gt;
G1 X1.14 Y-40.39 Z2.72 F1200.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Recovery from printing abortion ==&lt;br /&gt;
&lt;br /&gt;
Printing stopped at line 299941 after 3 days of printing. I mean I had the printer on hold sometimes (ESC), but it was a 24 job. Anyhow, big low down, but I decided that I must recover from this without super glue, i.e. leave the object on the print bed and restart.&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t know where it crashed, e.g. if the board did reset: &lt;br /&gt;
Run skeinforge again but make a change in the &amp;#039;&amp;#039;&amp;#039;Analyze-&amp;gt;Skeinview&amp;#039;&amp;#039;&amp;#039; tool:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Change Mouse Mode&amp;#039;&amp;#039;&amp;#039; to &amp;#039;&amp;#039;&amp;#039;Display Line&amp;#039;&amp;#039;&amp;#039;. You then can identify both the layer and the spot where it stops in this tool. Then click on a drawing it will display the g-code line...&lt;br /&gt;
&lt;br /&gt;
Now if you were printing a tall object, the problem is that the rapman always expects to be able to home in order to find x,y,z = 0. If you have a &amp;quot;real&amp;quot; print it can&amp;#039;t, since raising the print bed will destroy a 14cm high print for example.&lt;br /&gt;
&lt;br /&gt;
[[image:stronghold-printer-abort.jpg|frame|none|Printing in progress, but crashed sometimes later :(/]]&lt;br /&gt;
&lt;br /&gt;
I tried all sorts of things fiddling with G90 and G92 codes, but did not mange to restart g-code where the printer left.&lt;br /&gt;
 G90&lt;br /&gt;
 G92 X0 Y0 Z-142&lt;br /&gt;
 or&lt;br /&gt;
 G90&lt;br /&gt;
 G92 X0 Y0 Z142&lt;br /&gt;
&lt;br /&gt;
So I came up with a typical bricoleur solution :(&lt;br /&gt;
* Fix the g-code to start at z=0&lt;br /&gt;
* Fool the printer to believe that it is at z=0&lt;br /&gt;
&lt;br /&gt;
Here are the two steps:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;(1) Fixing the g-code file&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Normally, you should write a script (argl for stupid end-user programmers) that replaces all the Z values. E.g. Z142.2 should become 0 or 0.2. In my case I was lucky since I just print vertically. So I decided to restart at 14cm and not 14.2cm (makes it higher, but that&amp;#039;s fine).&lt;br /&gt;
&lt;br /&gt;
GCode where it stopped:&lt;br /&gt;
 G1 X-90.5 Y68.33 Z142.2 F960.0&lt;br /&gt;
&lt;br /&gt;
So I went to start of the 140mm series and killed all the lines from beginning to there. Then I used three Regexps with a text editor ([[emacs]]) to change:&lt;br /&gt;
&lt;br /&gt;
 Z14\(.\)\(..\) by Z\1\2&lt;br /&gt;
 Z15\(.\)\(..\) by Z1\1\2&lt;br /&gt;
 Z16\(.\)\(..\) by Z2\1\2&lt;br /&gt;
&lt;br /&gt;
Then of course, the g-code must have a header.&lt;br /&gt;
Resulting g-code start:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
G90&lt;br /&gt;
G21&lt;br /&gt;
M113 S1.0&lt;br /&gt;
M108 S380.0&lt;br /&gt;
M104 S210&lt;br /&gt;
M101&lt;br /&gt;
M103&lt;br /&gt;
M108 S380.0&lt;br /&gt;
M106&lt;br /&gt;
M103&lt;br /&gt;
G1 X40.96 Y-19.95 Z0.2 F869.59&lt;br /&gt;
M101&lt;br /&gt;
G1 X39.55 Y-18.93 Z0.2 F960.0&lt;br /&gt;
G1 X36.66 Y-17.64 Z0.2 F960.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your object is flat, you can stop here, else read on ....&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;(2) Fool the printer&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
a) Move the print head next to a top level point NEXT to home. Path toward -X (left) must be unobstructed. Then align it, i.e. make it touch the top.&lt;br /&gt;
&lt;br /&gt;
b) Move it to the left a bit, and switch off.&lt;br /&gt;
&lt;br /&gt;
c) Switch on. Then position the print head about 1mm below the point where you want to restart. This can be a bit less or more. You can see how much you go down on the control panel. I.e. press the Z+ button and move the print board up.&lt;br /&gt;
&lt;br /&gt;
d) Switch off&lt;br /&gt;
&lt;br /&gt;
e) Hold you finger on the Z switch (grey box which is usually touched by the long 6cm bolt. Run the file and release after 1-2 seconds, i.e. the print bed should move down again by 1mm.&lt;br /&gt;
&lt;br /&gt;
f) Now the printer will move to Xmax/Ymin. If it barely scratches the print when it moves you are fine. If it is too high or too low, then repeat from (c). Took me about 4 attempts to get this right.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Remarks&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I REALLY think that rapman firmware should include a control code to recover more easily e.g. Some g-code that says:&lt;br /&gt;
* Home to X=0 and Y=0 (but leave Z ALONE)&lt;br /&gt;
* Read from the G-code file the current Z-position (e.g. Z=142.2)&lt;br /&gt;
* Then just print ....&lt;br /&gt;
&lt;br /&gt;
There is a plan for future firmware to fix this. See [http://www.bitsfrombytes.com/fora/user/index.php?topic=658.msg6312#msg6312 this post by Ian] - 22:22, 2 April 2010 (UTC).&lt;br /&gt;
&lt;br /&gt;
I did manage to print this stronghold, see the [[Doblo factory]] article.&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/G-code g-code (Wikipedia)]&lt;br /&gt;
* [http://rapmanv3.blogspot.com/2009/05/gcodes.html G-codes - Bits from Bytes blog]&lt;br /&gt;
&lt;br /&gt;
[[Category: 3D printing]]&lt;br /&gt;
[[Category: RapMan]]&lt;br /&gt;
[[Category: Hardware]]&lt;/div&gt;</summary>
		<author><name>Daniel K. Schneider</name></author>
	</entry>
</feed>