206 lines
12 KiB
HTML
206 lines
12 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
<!--
|
|
Copyright (C) 2006, 2007 Jeff Epler
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
-->
|
|
<HTML>
|
|
<HEAD>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
|
<STYLE type="text/css"><!--
|
|
table { border: 1px solid black; border-collapse: collapse; }
|
|
table #titlerow th { border-bottom: 2px solid black; border-left: 2px solid black; text-align: center; }
|
|
table #titlerow th:first-child { border-bottom: 2px solid black; border-left: 0px; text-align: center; }
|
|
table td:first-child { border-left: 0px; }
|
|
table td { border-left: 1px solid black; padding-left: .25em; padding-right: .25em; }
|
|
table th { text-align: left; border-bottom: 1px solid black; border-top: 1px solid black; }
|
|
@media print {
|
|
@page { margin: .150in; }
|
|
html { padding: 0; margin: 0; }
|
|
body { padding: 3px; margin: 3px; }
|
|
* { font-size: 8pt }
|
|
a { text-decoration: none; color: black; }
|
|
table { width: 100%; }
|
|
}
|
|
td { background: white; color: black; }
|
|
tr.odd td { background: #d9d9d9; }
|
|
tr.head td, tr.head th { background: black; color: white; }
|
|
--></STYLE>
|
|
<TITLE>LinuxCNC "G-Code" Quick Reference</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
<TABLE ID=ref1>
|
|
<CAPTION> LinuxCNC "G-Code" Quick Reference </CAPTION>
|
|
<COL id="group"> <COL id="code"> <COL id="params"> <COL id="description">
|
|
<TR id="titlerow"> <TH>Code <TH>Parameters <TH>Description </TR>
|
|
<TR><TH>Motion<TD COLSPAN=2 STYLE="border-bottom: 1px solid black">(X Y Z A B C U V W apply to all motions)</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g0">G0</A><TD><TD>Rapid Move</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g1">G1</A><TD><TD>Linear Move</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g2-g3">G2, G3</A><TD>I J K or R, P<TD>Arc Move</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g4">G4</A><TD>P<TD>Dwell</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g5">G5</A><TD>I J P Q<TD>Cubic Spline</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g5.1">G5.1</A><TD>I J<TD>Quadratic Spline</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g5.2-g5.3">G5.2</A><TD>P L<TD>NURBS</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g38">G38.2 - G38.5</A><TD><TD>Straight Probe</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g33">G33</A><TD>K<TD>Spindle Synchronized Motion</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g33.1">G33.1</A><TD>K<TD>Rigid Tapping</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g80">G80</A> <TD><TD>Cancel Canned Cycle</TR>
|
|
|
|
<TR><TH>Canned cycles<TD COLSPAN=2>(X Y Z or U V W apply to canned cycles, depending on active plane)</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g81">G81</A><TD>R L (P)<TD>Drilling Cycle</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g82">G82</A><TD>R L (P)<TD>Drilling Cycle, Dwell</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g83">G83</A><TD>R L Q<TD>Drilling Cycle, Peck</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g73">G73</A><TD>R L Q<TD>Drilling Cycle, Chip Breaking</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g85">G85</A><TD>R L (P)<TD>Boring Cycle, Feed Out</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g89">G89</A><TD>R L (P)<TD>Boring Cycle, Dwell, Feed Out</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g76">G76</A><TD>P Z I J R K Q H L E<TD>Threading Cycle</TR>
|
|
|
|
<TR><TH COLSPAN=3>Distance Mode</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g90-g91">G90, G91</A><TD><TD>Distance Mode</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g90.1-g91.1">G90.1, G91.1</A><TD><TD>Arc Distance Mode</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g7">G7</A><TD><TD>Lathe Diameter Mode</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g8">G8</A><TD><TD>Lathe Radius Mode</TR>
|
|
|
|
<TR><TH COLSPAN=3>Feed Rate Mode </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g93-g94-g95">G93, G94, G95</A><TD><TD>Feed Rate Mode</TR>
|
|
|
|
<TR><TH COLSPAN=3>Spindle Control </TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m3-m4-m5">M3, M4, M5</A><TD>S<TD>Spindle Control</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m19">M19</A><TD><TD>Orient Spindle</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g96-g97">G96, G97</A><TD> S D <TD>Spindle Control Mode</TR>
|
|
|
|
<TR><TH COLSPAN=3>Coolant </TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m7-m8-m9">M7, M8, M9</A><TD><TD>Coolant Control</TR>
|
|
|
|
<TR><TH COLSPAN=3>Tool Length Offset </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g43">G43</A> <TD> H <TD>Tool Length Offset</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g43.1">G43.1</A> <TD> <TD>Dynamic Tool Length Offset</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g43.2">G43.2</A> <TD> H <TD>Apply additional Tool Length Offset</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g49">G49</A> <TD> <TD>Cancel Tool Length Compensation</TR>
|
|
|
|
<TR><TH COLSPAN=3>Stopping </TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m0-m1">M0, M1</A><TD><TD>Program Pause</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m2-m30">M2, M30</A><TD> <TD>Program End</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m60">M60</A><TD><TD>Pallet Change Pause</TR>
|
|
|
|
<TR><TH COLSPAN=3>Units </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g20-g21">G20, G21</A><TD> <TD>Units</TR>
|
|
|
|
<TR><TH>Plane Selection <TD COLSPAN=2>(affects G2, G3, G81…G89, G40…G42) </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g17-g19.1">G17 - G19.1</A><TD><TD>Plane Select</TR>
|
|
|
|
<TR><TH COLSPAN=3>Cutter Radius Compensation </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g40">G40</A><TD><TD>Compensation Off</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g41-g42">G41,G42</A><TD>D<TD>Cutter Compensation</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g41.1-g42.1">G41.1, G42.1</A><TD>D L<TD>Dynamic Cutter Compensation</TR>
|
|
|
|
<TR><TH COLSPAN=3>Path Control Mode </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g61-g61.1">G61 G61.1</A><TD><TD>Exact Path Mode</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g64">G64</A><TD>P Q<TD>Path Blending</TR>
|
|
|
|
<TR><TH COLSPAN=3>Return Mode in Canned Cycles </TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g98-g99">G98</A><TD><TD>Canned Cycle Return Level</TR>
|
|
|
|
<TR><TH COLSPAN=3>Other Modal Codes </TR>
|
|
<TR><TD><A HREF="gcode/other-code.html#sec:set-feed-rate">F</A><TD><TD>Set Feed Rate</TR>
|
|
<TR><TD><A HREF="gcode/other-code.html#sec:set-spindle-speed">S</A><TD><TD>Set Spindle Speed</TR>
|
|
<TR><TD><A HREF="gcode/other-code.html#sec:select-tool">T</A><TD><TD>Select Tool</a>)</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m48-m49">M48, M49</A><TD><TD>Speed and Feed Override Control</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m50">M50</A><TD>P0 (off) or P1 (on)<TD>Feed Override Control</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m51">M51</A><TD>P0 (off) or P1 (on)<TD>Spindle Speed Override Control</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m52">M52</A><TD>P0 (off) or P1 (on)<TD>Adaptive Feed Control</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m53">M53</A><TD>P0 (off) or P1 (on)<TD>Feed Stop Control</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g54-g59.3">G54-G59.3</A><TD><TD>Select Coordinate System</TR>
|
|
|
|
<TR><TH COLSPAN=3>Flow-control Codes </TR>
|
|
<TR><TD><A HREF="gcode/o-code.html#ocode:subroutines">o sub</A><TD><TD>Subroutines, sub/endsub call</TR>
|
|
<TR><TD><A HREF="gcode/o-code.html#ocode:looping">o while</A><TD><TD>Looping, while/endwhile do/while</TR>
|
|
<TR><TD><A HREF="gcode/o-code.html#ocode:conditional">o if</A><TD><TD>Conditional, if/else/endif</TR>
|
|
<TR><TD><A HREF="gcode/o-code.html#ocode:repeat">o repeat</A><TD><TD>Repeat a loop of code</TR>
|
|
<TR><TD><A HREF="gcode/o-code.html#ocode:indirection">[]</A><TD><TD>Indirection</TR>
|
|
<TR><TD><A HREF="gcode/o-code.html#ocode:calling-files">o call</A><TD><TD>Call named file</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m70">M70</A><TD><TD>Save modal state</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m71">M71</A><TD><TD>Invalidate stored state</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m72">M72</A><TD><TD>Restore modal state</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m73">M73</A><TD><TD>Save and Auto-restore modal state</TR>
|
|
|
|
<TR><TH COLSPAN=3>Input/Output Codes </TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m62-m65">M62 - M65</A><TD>P<TD>Digital Output Control</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m66">M66</A><TD>P E L Q<TD>Wait on Input</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m67">M67</A><TD>T<TD>Analog Output,Synchronized</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m68">M68</A><TD>T<TD>Analog Output, Immediate</TR>
|
|
|
|
<TR><TH COLSPAN=3>Non-modal Codes </TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m6">M6</A><TD>T<TD>Tool Change</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m61">M61</A><TD>Q<TD>Set Current Tool</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g10-l1">G10 L1</A><TD>P Q R<TD>Set Tool Table</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g10-l10">G10 L10</A><TD>P<TD>Set Tool Table</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g10-l11">G10 L11</A><TD>P<TD>Set Tool Table</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g10-l2">G10 L2</A><TD>P R<TD>Set Coordinate System</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g10-l20">G10 L20</A><TD>P<TD>Set Coordinate System</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g28-g28.1">G28, G28.1</A><TD><TD>Go/Set Predefined Position</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g30-g30.1">G30, G30.1</A><TD><TD>Go/Set Predefined Position</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g53">G53</A><TD><TD>Move in Machine Coordinates</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g92">G92</A><TD><TD>Coordinate System Offset</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g92.1-g92.2">G92.1, G92.2</A><TD><TD>Reset G92 Offsets</TR>
|
|
<TR><TD><A HREF="gcode/g-code.html#gcode:g92.3">G92.3</A><TD><TD>Restore G92 Offsets</TR>
|
|
<TR><TD><A HREF="gcode/m-code.html#mcode:m100-m199">M101 - M199</A><TD>P Q<TD>User Defined Commands</TR>
|
|
|
|
<TR><TH COLSPAN=3>Comments & Messages</TR>
|
|
<TR><TD><A HREF="gcode/overview.html#gcode:comments">; (…)</A><TD><TD>Comments</TR>
|
|
<TR><TD><A HREF="gcode/overview.html#gcode:messages">(MSG,…)</A><TD><TD>Messages</TR>
|
|
<TR><TD><A HREF="gcode/overview.html#gcode:debug">(DEBUG,…)</A><TD><TD>Debug Messages</TR>
|
|
<TR><TD><A HREF="gcode/overview.html#gcode:print">(PRINT,…)</A><TD><TD>Print Messages</TR>
|
|
</TABLE>
|
|
<SCRIPT type="text/javascript"><!--
|
|
var rows=document.evaluate('//tr', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
|
|
var j=0;
|
|
for(var i=0; i<rows.snapshotLength; i++) {
|
|
var it = rows.snapshotItem(i);
|
|
var th = document.evaluate('th', it, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
|
|
if(th.snapshotLength) {
|
|
it.setAttribute('class', 'head');
|
|
j = 0;
|
|
} else {
|
|
if(j) it.setAttribute('class', 'odd');
|
|
j = !j;
|
|
}
|
|
}
|
|
|
|
function fixup_urls() {
|
|
var links=document.evaluate('//a[@href]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
|
|
for(var i=0; i<links.snapshotLength; i++) {
|
|
var it = links.snapshotItem(i);
|
|
it.setAttribute('href',
|
|
"http://linuxcnc.org/docs/devel/html/" + it.getAttribute('href'));
|
|
}
|
|
}
|
|
|
|
// In the LinuxCNC package, gcode/g-code.html is (probably) not included. In this
|
|
// case, fix up the links to point at the online version instead of a local
|
|
// version
|
|
if(document.location.protocol == "file:") {
|
|
try {
|
|
var x = document.implementation.createDocument("", "", null);
|
|
x.load("gcode/g-code.html");
|
|
x.onerror = fixup_urls;
|
|
} catch(err) {
|
|
fixup_urls();
|
|
}
|
|
}
|
|
// --></SCRIPT>
|
|
</BODY>
|