From TechnoDocs
(→Routing Commands) |
m |
||
(15 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | The following G and M codes are supported by the Control Interface. | + | The following G and M codes are supported by the Control Interface. Click on the Command name to get more information and examples with the command. |
+ | |||
+ | You can find more extensive examples on G-code in the [[G-code examples]] page. | ||
+ | |||
+ | == Comments == | ||
+ | |||
+ | Writing comments in your g-code can be helpful in keeping track of each line. Comments will also let you "comment-out" a line, so that the line is ignored. | ||
+ | |||
+ | To comment out a line, add a % sign to the start of the line. | ||
+ | |||
+ | The TechnoCNC interface will ignore all lines that begin with a asterisk *, open parentheses (, percent %, and forward slash /. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | % This line is ignored. | ||
+ | |||
+ | This line is read | ||
+ | |||
+ | ( This line is ignored. | ||
+ | |||
+ | |||
== Setup Commands == | == Setup Commands == | ||
Line 8: | Line 28: | ||
!Format | !Format | ||
!Purpose | !Purpose | ||
+ | |||
+ | |- | ||
+ | |S | ||
+ | |Spindle Speed | ||
+ | |<pre>S<speed></pre> | ||
+ | |Sets the spindle speed. | ||
|- | |- | ||
|F | |F | ||
− | |Feed Speed | + | |[[G-code F|Feed Speed]] |
− | |F<speed> | + | |<pre>F<speed></pre> |
|Sets the feed rate, or rate of movement of the axes. | |Sets the feed rate, or rate of movement of the axes. | ||
|- | |- | ||
|G4 | |G4 | ||
− | |Dwell Time | + | |[[G-code G4|Dwell Time]] |
− | |G4 | + | |<pre>G4/seconds OR G4/-seconds (hundredths)</pre> |
− | |Inserts a delay in | + | |Inserts a delay in seconds or hundredths of a second. |
|- | |- | ||
|G90 | |G90 | ||
|Absolute Coordinates | |Absolute Coordinates | ||
− | |G90 | + | |<pre>G90</pre> |
|Sets coordinates to absolute, so that the motion commands are relative to the origin. | |Sets coordinates to absolute, so that the motion commands are relative to the origin. | ||
Line 30: | Line 56: | ||
|G91 | |G91 | ||
|Incremental Coordinates | |Incremental Coordinates | ||
− | | | + | |<pre>G91</pre> |
|Sets coordinates to incremental so that all motion commands are relative to the previous position. | |Sets coordinates to incremental so that all motion commands are relative to the previous position. | ||
Line 36: | Line 62: | ||
|G92 | |G92 | ||
|Set Absolute Origin | |Set Absolute Origin | ||
− | |G92 X<#> Y<#> Z<#> | + | |<pre>G92 X<#> Y<#> Z<#></pre> |
|Sets the origin that is referenced when in absolute mode. | |Sets the origin that is referenced when in absolute mode. | ||
Line 42: | Line 68: | ||
|M0 | |M0 | ||
|Program Stop/Pause | |Program Stop/Pause | ||
− | |M0 | + | |<pre>M0</pre> |
|Stops the g-code file from being further processed until the operator presses Continue or Start. | |Stops the g-code file from being further processed until the operator presses Continue or Start. | ||
Line 48: | Line 74: | ||
|M30 | |M30 | ||
|End of Data | |End of Data | ||
− | |M30 | + | |<pre>M30</pre> |
|Marks the end of the file. The rest of the file will not be processed. | |Marks the end of the file. The rest of the file will not be processed. | ||
Line 54: | Line 80: | ||
|M3 or M4 | |M3 or M4 | ||
|Spindle On | |Spindle On | ||
− | |M3 or M4 | + | |<pre>M3 |
+ | or | ||
+ | M4</pre> | ||
|Starts the spindle. | |Starts the spindle. | ||
Line 60: | Line 88: | ||
|M5 | |M5 | ||
|Spindle Off | |Spindle Off | ||
− | |M5 | + | |<pre>M5</pre> |
|Turns the spindle off. | |Turns the spindle off. | ||
Line 66: | Line 94: | ||
|M6 | |M6 | ||
|Tool Change | |Tool Change | ||
− | |M6 T<#> | + | |<pre>M6 T<#></pre> |
|Requests the machine change to the specified tool number. It will turn off the spindle and coolant and other required operations when it changes the tool. | |Requests the machine change to the specified tool number. It will turn off the spindle and coolant and other required operations when it changes the tool. | ||
Line 72: | Line 100: | ||
|M7 or M8 | |M7 or M8 | ||
|Coolant On | |Coolant On | ||
− | |M7 or M8 | + | |<pre>M7 |
+ | or | ||
+ | M8</pre> | ||
|Turns the coolant flow on. | |Turns the coolant flow on. | ||
Line 78: | Line 108: | ||
|M9 | |M9 | ||
|Coolant Off | |Coolant Off | ||
− | |M9 | + | |<pre>M9</pre> |
|Turns the coolant flow off. | |Turns the coolant flow off. | ||
Line 84: | Line 114: | ||
|M90 | |M90 | ||
|Output Off | |Output Off | ||
− | |M90 OUT<#> | + | |<pre>M90 OUT<#></pre> |
|Turns the output to the Off or 0 state. | |Turns the output to the Off or 0 state. | ||
Line 90: | Line 120: | ||
|M91 | |M91 | ||
|Output On | |Output On | ||
− | |M91 OUT<#> | + | |<pre>M91 OUT<#></pre> |
|Turns the output to the On or 1 state. | |Turns the output to the On or 1 state. | ||
Line 105: | Line 135: | ||
|- | |- | ||
|G0 | |G0 | ||
− | |Rapid Move | + | |[[G-code G0|Rapid Move]] |
− | |G0 X<#> Y<#> Z<#> A<#> | + | |<pre>G0 X<#> Y<#> Z<#> A<#></pre> |
|Moves one or more of the axes at the rapid speed, to the specified location. Note that not all axes are required to be specified. | |Moves one or more of the axes at the rapid speed, to the specified location. Note that not all axes are required to be specified. | ||
|- | |- | ||
|G1 | |G1 | ||
− | |Straight Line | + | |[[G-code G1|Straight Line]] |
− | |G1 X<#> Y<#> Z<#> A<#> | + | |<pre>G1 X<#> Y<#> Z<#> A<#></pre> |
|Moves the specified axes in straight (linear) motion. It will use the requested feedrate, either from the F command or whatever the cut speed has been specified to be. This is a cutting move. | |Moves the specified axes in straight (linear) motion. It will use the requested feedrate, either from the F command or whatever the cut speed has been specified to be. This is a cutting move. | ||
Line 146: | Line 176: | ||
|- | |- | ||
− | | | + | |G80 |
− | | | + | |Drilling Cycle Off |
− | | | + | |<pre>G80</pre> |
− | | | + | |Turns a drill cycle off. |
+ | |||
+ | |- | ||
+ | |G81 | ||
+ | |Standard Drilling Cycle Without Dwell | ||
+ | |<pre>G81 X<#> Y<#> Z<#> R<#> P<#> F<#></pre> | ||
+ | |Provides a feed-in, rapid-out sequence used for standard drilling without a dwell time. | ||
+ | |||
+ | |- | ||
+ | |G82 | ||
+ | |Standard Drilling Cycle With Dwell | ||
+ | |<pre>G82 X<#> Y<#> Z<#> R<#> P<#> F<#></pre> | ||
+ | |Provides a feed-in, rapid-out sequence used for standard drilling with a specified dwell time. | ||
+ | |||
+ | |- | ||
+ | |G83 | ||
+ | |Peck Drilling Cycle | ||
+ | |<pre>G83 X<#> Y<#> Z<#> R<#> Q<#> V<#> P<#> F<#></pre> | ||
+ | |Provides a series of feed=in peck drilling motions with full retract used for drilling holes. | ||
+ | |||
+ | |- | ||
+ | |G87 | ||
+ | |Chip Break Drilling Cycle | ||
+ | |<pre>G87 X<#> Y<#> Z<#> R<#> Q<#> V<#> W<#> P<#> F<#></pre> | ||
+ | |Provides a series of feed-in rapid-out motions that is similar to peck drilling, but the retract is a specified distance instead of a full retract. | ||
+ | |||
+ | |} | ||
+ | |||
+ | === Drill Cycle Command Format === | ||
+ | |||
+ | <pre>G8n X<#> Y<#> Z<#> R<#> Q<#> V<#> W<#> P<#> F<#></pre> | ||
+ | |||
+ | {| border="0" cellspacing="0" cellpadding="3" | ||
+ | |'''X''' | ||
+ | |the x coordinate of the hole | ||
+ | |||
+ | |- | ||
+ | |'''Y''' | ||
+ | |the y coordinate of the hole | ||
+ | |||
+ | |- | ||
+ | |'''Z''' | ||
+ | |the z coordinate of the hole | ||
+ | |||
+ | |- | ||
+ | |'''R''' | ||
+ | |the reference height for start of drill plunge | ||
+ | |||
+ | |- | ||
+ | |'''Q''' | ||
+ | |the initial z peck increment | ||
|- | |- | ||
− | | | + | |'''V''' |
− | | | + | |the subsequent z peck increment |
− | + | ||
− | + | ||
|- | |- | ||
− | | | + | |'''W''' |
− | | | + | |the peck clearance, z retract between pecks |
− | + | ||
− | + | ||
|- | |- | ||
− | | | + | |'''P''' |
− | | | + | |the dwell time (in seconds) |
− | + | ||
− | + | ||
|- | |- | ||
− | | | + | |'''F''' |
− | | | + | |the drilling feedrate, plunge speed |
− | + | ||
− | + | ||
|- | |- | ||
− | | | + | |'''n''' |
− | | | + | |an integer in the range of zero to nine |
− | + | ||
− | + | ||
|} | |} | ||
Line 185: | Line 255: | ||
[[Category:Software]] | [[Category:Software]] | ||
+ | [[Category:Manual]] |
Latest revision as of 13:47, 11 June 2012
The following G and M codes are supported by the Control Interface. Click on the Command name to get more information and examples with the command.
You can find more extensive examples on G-code in the G-code examples page.
Contents
Comments
Writing comments in your g-code can be helpful in keeping track of each line. Comments will also let you "comment-out" a line, so that the line is ignored.
To comment out a line, add a % sign to the start of the line.
The TechnoCNC interface will ignore all lines that begin with a asterisk *, open parentheses (, percent %, and forward slash /.
Examples
% This line is ignored.
This line is read
( This line is ignored.
Setup Commands
Code | Command | Format | Purpose |
---|---|---|---|
S | Spindle Speed | S<speed> |
Sets the spindle speed. |
F | Feed Speed | F<speed> |
Sets the feed rate, or rate of movement of the axes. |
G4 | Dwell Time | G4/seconds OR G4/-seconds (hundredths) |
Inserts a delay in seconds or hundredths of a second. |
G90 | Absolute Coordinates | G90 |
Sets coordinates to absolute, so that the motion commands are relative to the origin. |
G91 | Incremental Coordinates | G91 |
Sets coordinates to incremental so that all motion commands are relative to the previous position. |
G92 | Set Absolute Origin | G92 X<#> Y<#> Z<#> |
Sets the origin that is referenced when in absolute mode. |
M0 | Program Stop/Pause | M0 |
Stops the g-code file from being further processed until the operator presses Continue or Start. |
M30 | End of Data | M30 |
Marks the end of the file. The rest of the file will not be processed. |
M3 or M4 | Spindle On | M3 or M4 |
Starts the spindle. |
M5 | Spindle Off | M5 |
Turns the spindle off. |
M6 | Tool Change | M6 T<#> |
Requests the machine change to the specified tool number. It will turn off the spindle and coolant and other required operations when it changes the tool. |
M7 or M8 | Coolant On | M7 or M8 |
Turns the coolant flow on. |
M9 | Coolant Off | M9 |
Turns the coolant flow off. |
M90 | Output Off | M90 OUT<#> |
Turns the output to the Off or 0 state. |
M91 | Output On | M91 OUT<#> |
Turns the output to the On or 1 state. |
Routing Commands
Code | Command | Format | Purpose |
---|---|---|---|
G0 | Rapid Move | G0 X<#> Y<#> Z<#> A<#> |
Moves one or more of the axes at the rapid speed, to the specified location. Note that not all axes are required to be specified. |
G1 | Straight Line | G1 X<#> Y<#> Z<#> A<#> |
Moves the specified axes in straight (linear) motion. It will use the requested feedrate, either from the F command or whatever the cut speed has been specified to be. This is a cutting move. |
G2 | Clockwise Arc | G2 X<#> Y<#> I<#> J<#> or G2 X<#> Z<#> I<#> K<#> or G2 Y<#> Z<#> J<#> K<#> |
Moves two axes (XY, XZ or YZ) along the path of an arc in a clockwise direction. The XY specification is the end position, and the IJ specification is the center of the arc. |
G3 | Couterclockwise Arc | G3 X<#> Y<#> I<#> J<#> or G3 X<#> Z<#> I<#> K<#> or G3 Y<#> Z<#> J<#> K<#> |
Moves two axes (XY, XZ or YZ) along the path of an arc in a counterclockwise direction. The XY specification is the end position, and the IJ specification is the center of the arc. |
Drill Cycle Commands
Code | Command | Format | Purpose |
---|---|---|---|
G80 | Drilling Cycle Off | G80 |
Turns a drill cycle off. |
G81 | Standard Drilling Cycle Without Dwell | G81 X<#> Y<#> Z<#> R<#> P<#> F<#> |
Provides a feed-in, rapid-out sequence used for standard drilling without a dwell time. |
G82 | Standard Drilling Cycle With Dwell | G82 X<#> Y<#> Z<#> R<#> P<#> F<#> |
Provides a feed-in, rapid-out sequence used for standard drilling with a specified dwell time. |
G83 | Peck Drilling Cycle | G83 X<#> Y<#> Z<#> R<#> Q<#> V<#> P<#> F<#> |
Provides a series of feed=in peck drilling motions with full retract used for drilling holes. |
G87 | Chip Break Drilling Cycle | G87 X<#> Y<#> Z<#> R<#> Q<#> V<#> W<#> P<#> F<#> |
Provides a series of feed-in rapid-out motions that is similar to peck drilling, but the retract is a specified distance instead of a full retract. |
Drill Cycle Command Format
G8n X<#> Y<#> Z<#> R<#> Q<#> V<#> W<#> P<#> F<#>
X | the x coordinate of the hole |
Y | the y coordinate of the hole |
Z | the z coordinate of the hole |
R | the reference height for start of drill plunge |
Q | the initial z peck increment |
V | the subsequent z peck increment |
W | the peck clearance, z retract between pecks |
P | the dwell time (in seconds) |
F | the drilling feedrate, plunge speed |
n | an integer in the range of zero to nine |