Difference between revisions of "Gcode"

From Hyrel3D
Jump to: navigation, search
(Chart of Codes)
(M722 Set Prime Values)
(202 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:HowTo]]
 
{| align="right"
 
| __TOC__
 
|}
 
  
== What is GCode? ==
 
  
'''Everything your Hyrel 3D Printer does is done by executing GCode''', whether you are aware of it or not. While most of it is specified in your gcode file, some of it is sent to the printer before the file is executed; this includes setting flow rates, prime/unprime (advance/retract) settings, and default speeds.
+
__NOTOC__
  
Please note that there are many flavors of gcode, and while most have the same (or very similar) G0-G100 and M0-M100, codes above 100 are largely nonstandard.
+
{| border="1" class="wikitable" style="float:right"
 +
! Main Sections
 +
|-
 +
| [[#What_is_GCode.3F | What is GCode?]]
 +
|-
 +
| [[#Understanding_the_T | Understanding the T]]
 +
|-
 +
| [[#Most_Commonly_Edited_Gcodes | Most Commonly Edited GCodes]]
 +
|-
 +
| [[#Controlling_Movement | Controlling Movement]]
 +
|-
 +
| [[#Controlling_Temperature | Controlling Temperature]]
 +
|-
 +
| [[#Controlling_Material_Flow | Controlling Material Flow]]
 +
|-
 +
| [[#Controlling_Position_and_Offsets | Controlling Position and Offsets]]
 +
|-
 +
| [[#Controlling_Lasers_and_UV_Pens | Controlling Lasers and UV Pens]]
 +
|-
 +
| [[#Controlling_Spindles_and_Lathes | Controlling Spindles and Lathes]]
 +
|-
 +
| [[#Reporting_and_Diagnostics | Reporting and Diagnostics]]
 +
|-
 +
| [[#Controlling_Aux_Devices | Controlling Aux Devices]]
 +
|-
 +
| [[#Other_Commands| Other Commands]]
 +
|-
 +
| [[#Gcode_Header| Gcode Headers]]
 +
|-
 +
| [[#Gcode_Footer| Gcode Footer]]
 +
|-
 +
|}
  
''It is important to remember that different variable letters can have different meanings, depending on the G- or M- code being used'' - '''''especially the T value.'''''
+
Note: Codes in Black are supported on version 4 and above (v4+), and most likely on version 3 as well.
  
At the bottom of the page is a '''[[#Chart_of_Codes|chart]]''' with all these codes ordered numerically.
+
<span style="color:darkorange;">Note: Codes in Orange are supported on version 5 and above (v5+) only.
  
Below, I will explain those gcodes about which we get the most questions.
+
Note that Repetrel versions prior to 4.2 can not properly process gcode with "tab" characters - tab was a reserved character.
  
== '''Understanding the T''' ==
+
== What is GCode? ==
  
The use of T commands and variables changes greatly (for the better) with the jump to version 5 from the previous versions.
+
'''Everything your Hyrel 3D Printer does is done by executing GCode''', whether you are aware of it or not.  
  
Please see '''[[T_v4]]''' for the old way (v4 and earlier), where the nomenclature for '''T Commands''' and the '''T Variables''' were not the same.
+
Every button you press on the screen sends a gcode to the printer.
  
Please see '''[[T_v5]]''' for the new way (v5 and later), where the nomenclature for '''T Commands''' and the '''T Variables''' are the same.
+
When you start a job (by pressing "Print"), the settings from your head are sent to the printer (including flow and prime/unprime values); then the gcode file is sent, line by line, to the printer.
  
We will use a '''T#''' in the descriptions below to avoid confusion; please find the correct designation for your version by following the links above.
+
All parameters are persistent, so once they are set, they will remain in place unless or until you (or the file) sends a new, updated value (including setting to 0).
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
Please note that there are many flavors of gcode, and while most have the same (or very similar) G0-G100 and M0-M100, codes above 100 are largely nonstandard.
  
== '''Controlling Movement''' ==
+
''It is important to remember that different variable letters can have different meanings, depending on the G- or M- code being used'' - '''''especially the T value.'''''
  
=== G0 Rapid Move ===
+
The Table of Contents to the right lists the main categories of Gcodes.
  
G0 is a rapid positioning move. It is not a ''working'' move, meaning that your equipment will not be printing, milling, lasering, or doing any other active work during a G0 move. G0 is intended to move your tool to a new position, where the work will happen. Accordingly, G0 movement speeds are set in your configuration settings, rather than being specified in your gcode file.
+
Below is a table listing them in numerical order (click '''Expand''' to expand):
  
Special note: a G0 command will take an F variable as a nonpersistent, one-time velocity setting.
+
{| border="1" class="wikitable mw-collapsible mw-collapsed"
 
+
|+ Code_Chart
'''Usage'''
+
! Code
  G0 Xn Yn Zn An Bn Fn
+
! Supported
 
+
! Brief Description
'''Parameters'''
+
|-
 
+
! [[#G0_Rapid_Move|G0]]
  '''Xn''' is the new X position to move to
+
| Yes || Rapid Move
  '''Yn''' is the new Y position to move to
+
|-
  '''Zn''' is the new Z position to move to
+
! [[#G1_Working_Move|G1]]
  '''An''' is the new A position to move to
+
| Yes || Working Move
  '''Bn''' is the new B position to move to
+
|-
  '''Fn''' is the feed rate or travel speed to use. Only on '''G0''' is it not persistent
+
! [[#G2_Clockwise_Arc|G2]]
 
+
| Yes || Clockwise Arc
''Any values not stipulated remain unchanged.''
+
|-
 
+
! [[#G2.1_Spiral_CW_Arc1|G2.1]]
Note: These positioning values can be absolute or relative to the last position; which depends on whether you are running on '''G90''' absolute positioning or '''G91''' relative positioning. Absolute is the default and should be used in the majority of cases.
+
| Yes || Spiral CW Arc<sup>1</sup>
 
+
|-
Note: All Hyrel printers have built-in support for three axes. Hyrel model 16A and EHR printers may be expanded to five; an additional axis on each machine is reserved for E values.
+
! [[#G2.2_Spiral_CW_Arc2|G2.2]]
 
+
| Yes || Spiral CW Arc<sup>2</sup>
'''Example'''
+
|-
 
+
! [[#G2.3_3-Space_CW_Arc|G2.3]]
  G0 X50 Y75 Z10
+
| Yes || 3-Space CW Spiral Arc
 
+
|-
This command is decoded and executed by the printer as follows:
+
! [[#G3_Counterclockwise_Arc|G3]]
 
+
| Yes || Counterclockwise Arc
* '''G0''' (rapid (nonprinting) straight line move from the current location to)
+
|-
** '''X50''' (50mm in the X)
+
! [[#G3.1_Spiral_CCW_Arc1</sup>|G3.1]]
** '''Y75''' (75mm in the Y)
+
| Yes || Spiral CCW Arc<sup>1</sup>
** '''Z10''' (10mm in the Z)
+
|-
** (no change in A)
+
! [[#G3.2_Spiral_CCW_Arc2|G3.2]]
** (no change in B)
+
| Yes || Spiral CCW Arc<sup>2</sup>
** (no change in F, use settings-specified feed rate)
+
|-
<br>
+
! [[#G3.3_3-Space_CCW_Arc|G3.3]]
<hr>
+
| Yes || 3-Space CCW Spiral Arc
 
+
|-
=== G1 Working Move ===
+
! [[#G4_Timed_Pause|G4]]
 
+
| Yes || Timed Pause
G1 is a working move, during which you may be printing, milling, lasering, or doing other active work - provided an E (extrude) value is given. In native mode (if you don't add '''M229 E1 Dn''', the value of Extrusion rate E will be ignored, but E will trigger a working or printing move. In E-value mode (by adding '''M229 E1 Dn''', the slicer-determined E value will be used to control material flow. G1 moves are made at the rate indicated by the F (feed rate) value; if no F value is specified, the last F value set will be used. See '''[[#M229_Use_E_Values|M229]]''' for more details.
+
|-
 
+
! [[#G10_UNUSED|G10]]
'''Usage'''
+
| ''No'' || ''Absolute E''
  G1 Xn Yn Zn An Bn Fn Sn
+
|-
 
+
! [[#G11_UNUSED|G11]]
'''Parameters'''
+
| ''No'' || ''Relative E''
 
+
|-
  '''Xn''' is the new X position to move to
+
! [[#G16_Arc_Plane:_Any|G16]]  
  '''Yn''' is the new Y position to move to
+
| Yes || Arc in Any Plane
  '''Zn''' is the new Z position to move to  
+
|-
  '''An''' is the new A position to move to
+
! [[#G17_Arc_Plane:_XY|G17]]
  '''Bn''' is the new B position to move to
+
| Yes || Arc in XY Plane
  '''Hn''' is the stored head offset to apply (see '''M660''' to store offsets)
+
|-
  '''Fn''' is the feed rate or travel speed to use. Only on '''G0''' is it not persistent
+
! [[#G18_Arc_Plane:_XZ|G18]]
  '''Sn''' is a one-time (non-persistent) material flow rate multiplier (rarely used) applied to this move only
+
| Yes || Arc in XZ Plane
 
+
|-
''Any values not stipulated remain unchanged.''
+
! [[#G19_Arc_Plane:_YZ|G19]]
 
+
| Yes || Arc in YZ Plane
Note: These positioning values can be absolute or relative to the last position; which depends on whether you are running on '''G90''' absolute positioning or '''G91''' relative positioning. Absolute is the default and should be used in the majority of cases; there will be problems with an entire model sliced in relative mode. Relative is intended for special operations like drilling holes.
+
|-
 
+
! [[#G20_Set_Units_to_Inches|G20]]
Note: All Hyrel printers have built-in support for three axes. Hyrel model 16A and EHR printers may be expanded to five; an additional axis on each machine is reserved for E values.
+
| Yes || Set Units to Inches
 
+
|-
'''Example'''
+
! [[#G21_Set_Units_to_Milimeters|G21]]
 
+
| Yes || Set Units to Milimeters
  G1 X50 Y75 E1 F1800 H2
+
|-
 
+
! [[#G28_Send_X,_Y_to_Physical_Home|G28]]
This command is decoded and executed by the printer as follows:
+
| Yes || Send X, Y to Physical Home
 
+
|-
* '''G1''' (working speed straight line move from the current location to)
+
! [[#G53_Clear_Offsets|G53]]
** '''X50''' (50mm in the X)
+
| Yes || Clear Offsets
** '''Y75''' (75mm in the Y)
+
|-
** (no change in A)
+
! [[#G54_-_G59_-_Set_Offsets|G54-59]]
** (no change in B)
+
| Yes || Set Offsets
** '''E1''' (while extruding)
+
|-
** '''F1800''' (moving at 1800mm/min)
+
! [[#G81_Peck_Drilling|G81]]
** '''H2''' (invoking offsets stored in register H2)
+
| Yes || Peck Drilling
** (no temporary scaling)
+
|-
 
+
! [[#G90_Absolute_Positioning|G90]]
<br>
+
| Yes || Absolute Positioning
<hr>
+
|-
 
+
! [[#G91_Relatative_Positioning|G91]]
=== G2 Clockwise Arc ===
+
| Yes || Relatative Positioning
 
+
|-
A G2 move specifies a clockwise arc (or complete circle) from the current position to position (X,Y,Z)<sub>curr</sub> by following an arc about the center point (X<sub>curr</sub>+I, Y<sub>curr</sub>+J).
+
! [[#G92_Reset_Coordinate_Offsets|G92]]
 
+
| Yes || Reset Coordinates
'''Usage'''
+
|-
 
+
! [[#G93_Clear_Coordinate_Offsets|G93]]
  G2 Xn Yn Zn In Jn Fn En Sn
+
| Yes || Reset Coordinates
 
+
|-
'''Parameters'''
+
! [[#M0_Stop_Until_Resume|M0]]
 
+
| Yes || Stop Until Resume
  '''Xn''' is the new X position to move to
+
|-
  '''Yn''' is the new Y position to move to
+
! [[#M3_Turn_On_Spindle_.28CW.29|M3]]
  '''Zn''' is the new Z position to end at (optional and usually not stipulated)
+
| Yes || Spindle On CW
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
+
|-
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
+
! [[#M4_Turn_On_Spindle_.28CCW.29R|M4]]
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
+
| Yes || Spindle On CCW
  '''En''' indicates a working or printing move
+
|-
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
+
! [[#M5_Turn_Off_Spindle|M5]]
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
+
| Yes || Spindle Off
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
+
|-
 
+
! [[#M6_Declare_Head_Offsets|M6]]
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
+
| Yes || Declare Head Offsets
 
+
|-
'''Example'''
+
! [[#M7_Set_Power_On_Aux_1|M7]]
 
+
| Yes || Aux 1 On (Mist)
  G2 X50 Y75 I15 J20 E1 F1800
+
|-
 
+
! [[#M8_Set_Power_On_Aux_2|M8]]
This command is decoded and executed by the printer as follows:
+
| Yes || Aux 2 On (Flood)
 
+
|-
* '''G2''' (working speed clockwise arc/circle move from the current location to)
+
! [[#M9_Turn_Off_All_Aux|M9]]
** '''X50''' (50mm in the X)
+
| Yes || All Aux Off
** '''Y75''' (75mm in the Y)
+
|-
** (centered about a point located)  
+
! [[#M17_Engage_Motors|M17]]
** '''I15''' (15mm further in the X)
+
| Yes || Engage Motors
** '''J20''' (20mm further in the Y)  
+
|-
** '''E1''' (while extruding)
+
! [[#M18_Disengage_Motors|M18]]
** '''F1800''' (moving at 1800mm/min)
+
| Yes || Disengage Motors
 
+
|-
'''Example'''
+
! [[#M30_End_of_Program|M30]]
 
+
| Yes || End of Program
  G2 X50 Y75 I15 J20 E1 S6
+
|-
 
+
! [[#M82_Absolute_E-Values|M82]]
This command is decoded and executed by the printer as follows:
+
| Yes || Absolute E-Values
 
+
|-
* '''G2''' (working speed clockwise arc/circle move from the current location to)  
+
! [[#M83_Relative_E-Values|M83]]
** '''X50''' (50mm in the X)
+
| Yes || Relative E-Values
** '''Y75''' (75mm in the Y)  
+
|-
** (centered about a point located)
+
! [[#M84_Disable_Motors|M84]]
** '''I15''' (15mm further in the X)
+
| Yes || Disable Motors
** '''J20''' (20mm further in the Y)
+
|-
** '''E1''' (while extruding)
+
! [[#M104_Set_Temp_.28Head.29|M104]]
** (using previously established F rate)
+
| Yes || Set Temp (Head)
** '''S6''' (made up of six sides - resulting in a hexagon with one point at the origin, with all corners inscribed on the circle)
+
|-
 
+
! [[#M106_Set_Cooling_.2F_Etc.|M106]]
<br>
+
| Yes || Set Cooling / Etc.
<hr>
+
|-
 
+
! [[#M107_Stop_Cooling_.2F_Etc.|M107]]
=== G2.1 Spiral CW Arc<sup>1</sup> ===
+
| Yes || Stop Cooling / Etc.
 
+
|-
A G2.1 makes a spiral circular move (only supports full 360 arcs, or '''Ln''' * 360). Effective ending X/Y is always the same as the current XY and is not specified (though the actual final position is a function of the number of laps, the pitch, and the reverse code. An end Z can be supplied to have a uniform displacement during the move. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs).  An important feature is the "reverse code" to allow the creation of frog toes without having to jump over the frog toe once it's made.
+
! [[#M109_Wait_for_Temp_.28Head.29|M109]]
 
+
| Yes || Wait for Temp (Head)
'''Usage'''
+
|-
 
+
! [[#M116 Wait for Temps (v5+)|M116]]
  G2.1 Zn In Jn Pn Ln En Sn Rn Fn
+
| <span style="color:darkorange;">v5+ || <span style="color:darkorange;">Pause for All Temps
 
+
|-
'''Parameters'''
+
! [[#M140_Set_Temp_.28Bed.29|M140]]
 
+
| Yes || Set Temp (Bed)
  '''Zn''' is the new Z position to end at (optional and usually not stipulated; will be relative or absolute, depending on current mode)
+
|-
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
+
! [[#M141_Set_Temp_.28Chamber.29|M141]]
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
+
| Yes || Set Temp (Chamber)
  '''Pn''' is the pitch (how close the laps are) in mm (required)
+
|-
  '''Ln''' is the number of laps to complete (must be a positive integer; you don't need to finish the spiral)
+
! [[#M190_Wait_for_Temp_.28Bed.29|M190]]
  '''En''' indicates a working or printing move
+
| Yes || Wait for Temp (Bed)
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
+
|-
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
+
! [[#M191_Wait_for_Temp_.28Chamber.29|M191]]
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
+
| Yes || Wait for Temp (Chamber)
  '''Rn''' is a flag; 0 to spiral in (default), 1 to spiral out
+
|-
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
+
! [[#M203_Set_G0_Speed|M203]]
 
+
| Yes || Set G0 Speed
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
+
|-
 
+
! [[#M221_Set_Flow_Rate|M221]]
'''Example 1'''
+
| Yes || Set Flow Rate
 
+
|-
  G2.1 I15 J20 P1.2 E1
+
! [[#M229_Use_E_Values|M229]]
 
+
| Yes || Use E Values
This command is decoded and executed by the printer as follows:
+
|-
 
+
! [[#M253_Turn_On_Lathe_.28CW.29|M253]]
* '''G2.1''' (working speed clockwise spiral move from the current location)
+
| Yes || Turn On Lathe (CW)
** (no change in Z)
+
|-
** (centered about a point located)
+
! [[#M254_Turn_On_Lathe_.28CCW.29|M254]]
** '''I15''' (15mm further in the X)
+
| Yes || Turn On Lathe (CCW)
** '''J20''' (20mm further in the Y)
+
|-
** (complete all laps)
+
! [[#M255_Turn_Off_Lathe|M255]]
** '''P1.2''' (1.2 mm between centers of travel of adjacent laps)
+
| Yes || Turn Off Lathe
** '''E1''' (while extruding)
+
|-
** (use default S of 0.33333 mm segments)
+
! [[#M619_Map_Aux_Port|M619]]
** (use default R of 0, spiral in toward center from current location)
+
| Yes || Map Aux Port
** (moving at established G1 F speed)
+
|-
 
+
! [[#M620_Enable_Device|M620]]
'''Example 2'''
+
| Yes || Enable Device
 
+
|-
  G2.1 Z10 I15 J20 P0.5 L50 E1 S9 R1 F1200
+
! [[#M621_Set_Laser_Power|M621]]
 
+
| Yes || Set Laser Power
This command is decoded and executed by the printer as follows:
+
|-
 
+
! [[#M623_Duration_Emit|M623]]
* '''G2.1''' (working speed clockwise spiral move from the current location)
+
| Yes || Duration Emit
** '''Z10''' (change Z position incrementally during move to end at Z10 (relative or absolute, depending on current mode))
+
|-
** (centered about a point located)
+
! [[#M660_Assign_Tool_Height_Offset|M660]]
** '''I15''' (15mm further in the X)
+
| Yes || Set Tool Offsets
** '''J20''' (20mm further in the Y)
+
|-
** '''L50''' (complete no more than 50 laps)
+
! [[#M670_Activate_Y-Arm_.28Gantry.29_Lights|M670]]
** '''P0.5''' (0.5 mm between centers of travel of adjacent laps)
+
| Yes || Enable Y-arm (Gantry) Lights
** '''E1''' (while extruding)
+
|-
** '''S9''' (each 360 degrees composted of a total of 9 segments)
+
! [[#M671_Activate_X-Arm_.28Danger.29_Lights|M671]]
** '''R1''' (spiral out from center to current location)
+
| Yes || Activate X-Arm (Danger) Lights
** '''F1200''' (at a speed of 1200 mm/min)
+
|-
 
+
! [[#M672_Set_Y-arm_Light|M672]]
'''Example 3'''
+
| Yes || Set Y-arm Light
 
+
|-
  G0 X0 Y25                  ; start location for outer spiral
+
! [[#M674_Use_Turbo_Mode|M674]]
  G0 Z1                      ; go to print layer height
+
| Yes || Rapid G1 Moves
  G2.1 I25 J0 P4 L3 E1        ; spiral in 3 laps, 4mm pitch
+
|-
  G1 X14 E1                  ; add connector for the arcs
+
! [[#M675_Activate_Response_LEDs|M675]]
  G2.1 I11 J0 P4 L3 E1 R2    ; spiral out 3 laps, 4mm pitch
+
| Yes || Activate Response LEDs
 
+
|-
This gcode generates the following:
+
! [[#M676_Activate_Recirc._Fan|M676]]
 
+
| Yes || Activate Recirc. Fan
[[File:Spiral.png|250px]]
+
|-
 
+
! [[#M677_Activate_Buzzer|M677]]
<br>
+
| Yes || Activate Buzzer
<hr>
+
|-
 
+
! [[#M678_Activate_Laser_X-hair|M678]]
=== G2.2 Spiral CW Arc<sup>2</sup> ===
+
| Yes || Activate Laser X-hair
 
+
|-
A G2.2 makes a spiral circular move (only supports full 360 arcs, or '''Ln''' * 360). Unlike G2.1, G2.2 specifies final X/Y (and Z) location. An end Z can be supplied to have a uniform displacement during the move. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs).  Unlike G2.1, G2.2 does not require a reverse code as the direction of spiral is determined by the positional relationship of the current position, final position, and center position.
+
! [[#M679_Activate_Vacuum|M679]]
 
+
| Yes || Activate Vacuum
'''Usage'''
+
|-
 
+
! [[#M684_Activate_Exhaust|M684]]
  G2.2 Xn Yn Zn In Jn Pn Ln En Sn Rn Fn
+
| Yes || Activate Exhaust
 +
|-
 +
! [[#M685_Set_Power_on_Air|M685]]
 +
| Yes || Activate Air
 +
|-
 +
! [[#M689_Activate_Ext._Head|M689]]
 +
| Yes || Activate Ext. Head
 +
|-
 +
! [[#M701_Set_Head_Reporting|M701]]
 +
| Yes || Set Head Reporting
 +
|-
 +
! [[#M703_Cloning_Heads|M703]]
 +
| Yes || Parallel Printing
 +
|-
 +
! [[#M718_Stop_Logging_to_File|M718]]
 +
| Yes || Stop Logging to File
 +
|-
 +
! [[#M719_Start_Logging_to_File|M719]]
 +
| Yes || Start Logging to File
 +
|-
 +
! [[#M721_Set_Unprime_Values|M721]]
 +
| Yes || Set Unprime Values
 +
|-
 +
! [[#M722_Set_Prime_Values|M722]]
 +
| Yes || Set Prime Values
 +
|-
 +
! [[#M723_Set_Manual_Flow|M723]]  
 +
| Yes || Set Manual Flow
 +
|-
 +
! [[#M728_Set_Motor_Current_Boost|M728]]
 +
| Yes || Set Motor Current Boost
 +
|-
 +
! [[#M756_Set_Height_for_Flow|M756]]
 +
| Yes || Set Height for Flow
 +
|-
 +
! [[#M772_Reset_All_Metrics|M772]]
 +
| Yes || Reset All Metrics
 +
|-
 +
! [[#M773_Generate_Basic_Report|M773]]
 +
| Yes || Generate Basic Report
 +
|-
 +
! [[#M783_Tie_Aux_to_Extrusion|M783]]
 +
| Yes || Tie Aux to Extrusion
 +
|-
 +
! [[#M790_New_Layer_Actions|M790]]
 +
| Yes || New Layer Actions
 +
|-
 +
! [[#M791_Snap_Image|M791]]
 +
| Yes || Snap Image
 +
|-
 +
! [[#M792_Execute_Action|M792]]
 +
| Yes || Execute Action
 +
|-
 +
|}
 +
 
 +
=== '''Header Explained''' ===
  
'''Parameters'''
+
Please visit [[GCode Header]] for a detailed description of our standard GCode headers.
  
  '''Xn''' is the new X position to move to
+
== '''Understanding the T''' ==
  '''Yn''' is the new Y position to move to
+
 
  '''Zn''' is the new Z position to end at (optional and usually not stipulated; will be relative or absolute, depending on current mode)
+
A '''T Command''' changes which head has the focus of the motion controller and is executing the gcode. Each of our printers have at least four tool positions.
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
+
 
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
+
The use of T commands and variables changes greatly (for the better) with the jump to version 5 from the previous versions.
  '''Pn''' is the pitch (how close the laps are) in mm (optional)
+
 
  '''Ln''' is the number of laps (or paths) to complete (you don't need to finish the spiral)
+
Please see '''[[T_v4]]''' for CURRENT (v4 and earlier) use, where the nomenclature for '''T Commands''' and the '''T Variables''' are not the same.
    ''Note, if P and L values conflict, L will be modified to match what P will allow; at least one must be specified
+
 
  '''En''' indicates a working or printing move
+
We will use a '''T#''' in the descriptions below to avoid confusion; please find the correct designation for your version by following the links above.
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
+
 
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
+
== '''Most Commonly Edited Gcodes''' ==
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
 
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
 
  
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
+
Below are the gcodes users should first become familiar with.  
  
'''Example 1'''
+
=== Tool Changes ===
  
  G2.2 I15 J20 P1 E1
+
'''T0''' tells the printer to perform extrusion (or emission) from the tool in the far left position<br>
 +
'''T1''' tells the printer to perform extrusion (or emission) from the tool in the second-from-left position<br>
 +
'''T2''' tells the printer to perform extrusion (or emission) from the tool in the third-from-left position<br>
 +
'''T3''' tells the printer to perform extrusion (or emission) from the tool in the fourth-from-left position<br>
 +
'''T4''' tells the printer to perform extrusion (or emission) from the tool in the fifth-from-left position (if available)
  
This command is decoded and executed by the printer as follows:
+
=== Movement ===
  
* '''G2.2''' (working speed clockwise spiral move from the current location)
+
'''G0''' for "rapid", non-printing moves<br>
** (no change in Z)
+
'''G1''' for "working speed" moves, which may be printing (with E value) or non-printing (no E value)
** (centered about a point located)
 
** '''I15''' (15mm further in the X)  
 
** '''J20''' (20mm further in the Y)
 
** '''P2''' (1mm between centers of travel of adjacent laps)
 
** (complete all laps)
 
** '''E1''' (while extruding)
 
** (use default S of 0.33333 mm segments)
 
** (moving at established G1 F speed)
 
  
'''Example 2'''
+
=== Temperature ===
  
  G2.2 Z10 I15 J20 P2 L50 E1 S9 F1200
+
'''M104''' to set head temp<br>
 +
'''M109''' to set and wait for head temp<br>
 +
'''M140''' to set bed temp<br>
 +
'''M190''' to set and wait for bed temp
  
This command is decoded and executed by the printer as follows:
+
=== Others ===
  
* '''G2.2''' (working speed clockwise spiral move from the current location)
+
Which commands to learn from here will depend on what the user intends to do with the equipment.
** '''Z10''' (change Z position incrementally during move to end at Z10 (relative or absolute, depending on current mode))
 
** (centered about a point located)
 
** '''I15''' (15mm further in the X)
 
** '''J20''' (20mm further in the Y)
 
** '''P2''' (2mm between centers of travel of adjacent laps)
 
** '''L50''' (complete no more than 50 laps)
 
** '''E1''' (while extruding)
 
** '''S9''' (each 360 degrees composted of a total of 9 segments)
 
** '''F1200''' (at a speed of 1200 mm/min)
 
  
'''Example 3'''
+
== '''Controlling Movement''' ==
  
  G0 X0 Y25                  ; start location for outer spiral
+
{| border="1" class="wikitable" style="float:right"
  G0 Z1                      ; go to print layer height
+
! colspan="3" | Controlling Movement
  G2.2 X12 I25 P4 E1          ; spiral in 3 laps, 4mm pitch
+
|-
  G1 X14 E1                  ; add connector to next spiral
+
! Code
  G2.2 X2 I11 P4 E1          ; spiral out 3 laps, 4mm pitch
+
! Supported
 
+
! Brief Description
This gcode also generates the following:
+
|-
 
+
! [[#G0_Rapid_Move|G0]]
[[File:Spiral.png|250px]]
+
| Yes || Rapid Move
 
+
|-
<br>
+
! [[#G1_Working_Move|G1]]
<hr>
+
| Yes || Working Move
 
+
|-
=== G2.3 3-Space CW Arc ===
+
! [[#G2_Clockwise_Arc|G2]]
 
+
| Yes || Clockwise Arc
A G2.3 move specifies a clockwise arc (or complete circle(s) from the current position to position (X,Y,Z)<sub>curr</sub> following a circular arc about the center point (X<sub>curr</sub>+I, Y<sub>curr</sub>+J, Z<sub>curr</sub>+K). Unlike G2, G2.1 and G2.2, G2.3 is not bound to the X/Y plane. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs). 
+
|-
'''Usage'''
+
! [[#G2.1_Spiral_CW_Arc1|G2.1]]
 
+
| Yes || Spiral CW Arc<sup>1</sup>
  G2.3 Xn Yn Zn An Bn In Jn Kn Un Vn Wn Dn Pn En Sn Fn
+
|-
 
+
! [[#G2.2_Spiral_CW_Arc2|G2.2]]  
Note: If we are in G16 mode, Un, Vn, Wn define the vector normal to the work plane. If we are in G17 (X/Y plane) or G18 (X/Z plane) or G19 (Y/Z plane) mode, these are ignored.
+
| Yes || Spiral CW Arc<sup>2</sup>
 
+
|-
'''Parameters'''
+
! [[#G2.3_3-Space_CW_Arc|G2.3]]
 
+
| Yes || 3-Space CW Spiral Arc
  '''Xn''' is the new X position to end at
+
|-
  '''Yn''' is the new Y position to end at
+
! [[#G3_Counterclockwise_Arc|G3]]
  '''Zn''' is the new Z position to end at
+
| Yes || Counterclockwise Arc
  '''An''' is the new A position to end at (4th axis)
+
|-
  '''Bn''' is the new B position to end at (5th axis)
+
! [[#G3.1_Spiral_CCW_Arc1</sup>|G3.1]]
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
+
| Yes || Spiral CCW Arc<sup>1</sup>
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
+
|-
  '''Kn''' is the '''''relative''''' distance from the current Z position to the center position about which to arc (default 0)
+
! [[#G3.2_Spiral_CCW_Arc2|G3.2]]
  '''Un''' is the X component of a vector normal to the working plane (default 0)
+
| Yes || Spiral CCW Arc<sup>2</sup>
  '''Vn''' is the Y component of a vector normal to the working plane (default 0)
+
|-
  '''Wn''' is the Z component of a vector normal to the working plane (default 0)
+
! [[#G3.3_3-Space_CCW_Arc|G3.3]]
  '''Dn''' is the overall displacement normal to the working plane for this element
+
| Yes || 3-Space CCW Spiral Arc
  '''Pn''' is the pitch (how close the laps are normal to the working plane) in mm (default 0; one path, no incremental displacement)
+
|-
  '''En''' indicates a working or printing move
+
! [[#G4_Timed_Pause|G4]]
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
+
| Yes || Timed Pause
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
+
|-
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
+
! [[#G16_Arc_Plane:_Any|G16]]
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
+
| Yes || Arc in Any Plane
 +
|-
 +
! [[#G17_Arc_Plane:_XY|G17]]
 +
| Yes || Arc in XY Plane
 +
|-
 +
! [[#G18_Arc_Plane:_XZ|G18]]
 +
| Yes || Arc in XZ Plane
 +
|-
 +
! [[#G19_Arc_Plane:_YZ|G19]]
 +
| Yes || Arc in YZ Plane
 +
|-
 +
! [[#M0_Stop_Until_Resume|M0]]
 +
| Yes || Stop Until Resume
 +
|-
 +
! [[#M203_Set_G0_Speed|M203]]
 +
| Yes || Set G0 Speed
 +
|-
 +
! [[#M674_Use_Turbo_Mode|M674]]
 +
| Yes || Rapid G1 Moves
 +
|-
 +
|}
  
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
+
=== G0 Rapid Move ===
  
<br>
+
G0 is a rapid positioning move. It is not a ''working'' move, meaning that your equipment will not be printing, milling, lasering, or doing any other active work during a G0 move. G0 is intended to move your tool to a new position, where the work will happen. Accordingly, G0 movement speeds are set in your configuration settings, rather than being specified in your gcode file.
<hr>
 
  
=== G3 Counterclockwise Arc ===
+
Special note: a G0 command will take an F variable as a nonpersistent, one-time velocity setting.
  
Please refer to G2, above, for details. All options are identical, with the exception of direction (counterclockwise).
+
'''Usage'''
 +
  G0 Xn Yn Zn An Bn Fn
  
<br>
+
'''Parameters'''
<hr>
 
  
=== G3.1 Spiral CCW Arc<sup>1</sup> ===
+
  '''Xn''' is the new X position to move to
 +
  '''Yn''' is the new Y position to move to
 +
  '''Zn''' is the new Z position to move to
 +
  '''An''' is the new A position to move to
 +
  '''Bn''' is the new B position to move to
 +
  '''Fn''' is the feed rate or travel speed to use. Only on '''G0''' is it not persistent
  
Please refer to G2.1, above, for details. All options are identical, with the exception of direction (counterclockwise).
+
''Any values not stipulated remain unchanged.''
  
<br>
+
Note: These positioning values can be absolute or relative to the last position; which depends on whether you are running on '''G90''' absolute positioning or '''G91''' relative positioning. Absolute is the default and should be used in the majority of cases.
<hr>
 
  
=== G3.2 Spiral CCW Arc<sup>2</sup> ===
+
Note: All Hyrel printers have built-in support for three axes. Hyrel model 16A and EHR printers may be expanded to five; an additional axis on each machine is reserved for E values.
  
Please refer to G2.2, above, for details. All options are identical, with the exception of direction (counterclockwise).
+
'''Example'''
  
<br>
+
  G0 X50 Y75 Z10
<hr>
 
  
=== G3.3 3-Space CCW Arc ===
+
This command is decoded and executed by the printer as follows:
 
 
Please refer to G2.3, above, for details. All options are identical, with the exception of direction (counterclockwise).
 
  
 +
* '''G0''' (rapid (nonprinting) straight line move from the current location to)
 +
** '''X50''' (50mm in the X)
 +
** '''Y75''' (75mm in the Y)
 +
** '''Z10''' (10mm in the Z)
 +
** (no change in A)
 +
** (no change in B)
 +
** (no change in F, use settings-specified feed rate)
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G4 Timed Pause ===
+
=== G1 Working Move ===
  
G4 is a pause for a set number of seconds (S) or milliseconds (P).  
+
G1 is a working move, during which you may be printing, milling, lasering, or doing other active work - provided an E (extrude) value is given. In native mode (if you don't add '''M229 E1 Dn''', the value of Extrusion rate E will be ignored, but E will trigger a working or printing move. In E-value mode (by adding '''M229 E1 Dn''', the slicer-determined E value will be used to control material flow. G1 moves are made at the rate indicated by the F (feed rate) value; if no F value is specified, the last F value set will be used. See '''[[#M229_Use_E_Values|M229]]''' for more details.
  
 
'''Usage'''
 
'''Usage'''
 
+
   G1 Xn Yn Zn An Bn Fn Sn En
   G4 Sn Pn
 
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the number of Seconds to pause
+
   '''Xn''' is the new X position to move to
   '''Pn''' is the number of Milliseconds to pause
+
  '''Yn''' is the new Y position to move to
 +
  '''Zn''' is the new Z position to move to
 +
  '''An''' is the new A position to move to
 +
  '''Bn''' is the new B position to move to
 +
  '''En''' is the cumulative E axis (extrusion) position to move (or advance) to
 +
   '''Hn''' is the stored head offset to apply (see '''M660''' to store offsets)
 +
  '''Fn''' is the feed rate or travel speed to use. Only on '''G0''' is it not persistent
 +
  '''Sn''' is a one-time (non-persistent) material flow rate multiplier (rarely used) applied to this move only
  
You may use '''S''' or '''P''', or if you use both, the total value will be the pause duration.
+
''Any values not stipulated remain unchanged.''
  
'''Example'''
+
Note: These positioning values can be absolute or relative to the last position; which depends on whether you are running on '''G90''' absolute positioning or '''G91''' relative positioning. Absolute is the default and should be used in the majority of cases; there will be problems with an entire model sliced in relative mode. Relative is intended for special operations like drilling holes.
  
  G4 S0.5
+
Note: All Hyrel printers have built-in support for three axes. Hyrel model 16A and EHR printers may be expanded to five; an additional axis on each machine is reserved for E values.
 
 
This command is decoded and executed by the printer as follows:
 
 
 
* '''G4''' (Timed pause)
 
** '''S0.5''' (0.5 seconds)
 
  
 
'''Example'''
 
'''Example'''
  
   G4 P500
+
   G1 X50 Y75 E1 F1800 H2
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G4''' (Timed pause)  
+
* '''G1''' (working speed straight line move from the current location to)  
** '''P500''' (500 milliseconds)
+
** '''X50''' (50mm in the X)
 +
** '''Y75''' (75mm in the Y)
 +
** (no change in A)
 +
** (no change in B)
 +
** '''E1''' (while extruding)
 +
** '''F1800''' (moving at 1800mm/min)
 +
** '''H2''' (invoking offsets stored in register H2)
 +
** (no temporary scaling)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G16 Arc Plane: Any ===
+
=== G2 Clockwise Arc ===
  
G16 permits free-form designation of points in space, without limiting them to an axial plane.
+
A G2 move specifies a clockwise arc (or complete circle) from the current position to position (X,Y,Z)<sub>curr</sub> by following an arc about the center point (X<sub>curr</sub>+I, Y<sub>curr</sub>+J).  
 
 
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
 
  
 
'''Usage'''
 
'''Usage'''
  
   G16
+
   G2 Xn Yn Zn In Jn Fn En Sn
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''Xn''' is the new X position to move to
 +
  '''Yn''' is the new Y position to move to
 +
  '''Zn''' is the new Z position to end at (optional and usually not stipulated)
 +
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
 +
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
 +
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
 +
  '''En''' indicates a working or printing move
 +
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
 +
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
 +
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
 +
 
 +
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
  
 
'''Example'''
 
'''Example'''
  
   G16
+
   G2 X50 Y75 I15 J20 E1 F1800
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G16''' (allow element in any orientation)  
+
* '''G2''' (working speed clockwise arc/circle move from the current location to)
 +
** '''X50''' (50mm in the X)
 +
** '''Y75''' (75mm in the Y)
 +
** (centered about a point located)
 +
** '''I15''' (15mm further in the X)
 +
** '''J20''' (20mm further in the Y)
 +
** '''E1''' (while extruding)
 +
** '''F1800''' (moving at 1800mm/min)
  
<br>
+
'''Example'''
<hr>
 
  
=== G17 Arc Plane: XY ===
+
  G2 X50 Y75 I15 J20 E1 S6
  
G17 restricts this element to the X/Y plane.
+
This command is decoded and executed by the printer as follows:
  
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
+
* '''G2''' (working speed clockwise arc/circle move from the current location to)
 
+
** '''X50''' (50mm in the X)
'''Usage'''
+
** '''Y75''' (75mm in the Y)
 
+
** (centered about a point located)
  G17
+
** '''I15''' (15mm further in the X)
 +
** '''J20''' (20mm further in the Y)
 +
** '''E1''' (while extruding)
 +
** (using previously established F rate)
 +
** '''S6''' (made up of six sides - resulting in a hexagon with one point at the origin, with all corners inscribed on the circle)
 +
 
 +
'''Further Examples'''
 +
 
 +
'''90°<br>'''
 +
[[File:G2-1.png]]
 +
 
 +
'''180°<br>'''
 +
[[File:G2-2.png]]
  
'''Parameters'''
+
'''270°<br>'''
 +
[[File:G2-3.png]]
  
  N/A
+
'''360°<br>'''
 +
[[File:G2-4.png]]<br>
 +
Note, if no endpoints are defined, G2 will make a 360° circle by default.
  
'''Example'''
+
And since this can be a lot to take in, please feel fre to play around with Repetrel's built-in Arc/Spiral tool:
  
  G17
+
[[File:Arctool1.png]]
  
This command is decoded and executed by the printer as follows:
 
  
* '''G17''' (restrict element to X/Y plane)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G18 Arc Plane: XZ ===
+
=== G2.1 Spiral CW Arc<sup>1</sup> ===
  
G18 restricts this element to the X/Z plane.
+
A G2.1 makes a spiral circular move (only supports full 360 arcs, or '''Ln''' * 360). This arc is CW if spiraling in and CCW if spiraling out. Effective ending X/Y is always the same as the current XY and is not specified (though the actual final position is a function of the number of laps, the pitch, and the reverse code. An end Z can be supplied to have a uniform displacement during the move. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs). An important feature is the "reverse code" to allow the creation of frog toes without having to jump over the frog toe once it's made.
 
 
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
 
  
 
'''Usage'''
 
'''Usage'''
  
   G18
+
   G2.1 Zn In Jn Pn Ln En Sn Rn Fn
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''Zn''' is the new Z position to end at (optional and usually not stipulated; will be relative or absolute, depending on current mode)
 +
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
 +
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
 +
    ''Note: '''In''' and '''Jn''' both default to 0, but at least one of them must be explicitly declared with a non-zero value.''
 +
  '''Pn''' is the pitch (how close the laps are) in mm (required)
 +
  '''Ln''' is the number of laps to complete (must be a positive integer; you don't need to finish the spiral)
 +
  '''En''' indicates a working or printing move
 +
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
 +
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
 +
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
 +
  '''Rn''' is a flag; 0 to spiral in (default), 1 to spiral out (after inward jump), 2 spiral out from current position
 +
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
 +
 
 +
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
  
'''Example'''
+
'''Example 1'''
  
   G18
+
   G2.1 I15 J20 P1.2 E1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G18''' (restrict element to X/Z plane)  
+
* '''G2.1''' (working speed clockwise spiral move from the current location)
 +
** (no change in Z)
 +
** (centered about a point located)
 +
** '''I15''' (15mm further in the X)
 +
** '''J20''' (20mm further in the Y)
 +
** (complete all laps)
 +
** '''P1.2''' (1.2 mm between centers of travel of adjacent laps)
 +
** '''E1''' (while extruding)
 +
** (use default S of 0.33333 mm segments)
 +
** (use default R of 0, spiral in toward center from current location)
 +
** (moving at established G1 F speed)
  
<br>
+
'''Example 2'''
<hr>
 
  
=== G19 Arc Plane: YZ ===
+
  G2.1 Z10 I15 J20 P0.5 L50 E1 S9 R1 F1200
  
G19 restricts this element to the Y/Z plane.
+
This command is decoded and executed by the printer as follows:
  
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
+
* '''G2.1''' (working speed clockwise spiral move from the current location)
 +
** '''Z10''' (change Z position incrementally during move to end at Z10 (relative or absolute, depending on current mode))
 +
** (centered about a point located)
 +
** '''I15''' (15mm further in the X)
 +
** '''J20''' (20mm further in the Y)
 +
** '''L50''' (complete no more than 50 laps)
 +
** '''P0.5''' (0.5 mm between centers of travel of adjacent laps)
 +
** '''E1''' (while extruding)
 +
** '''S9''' (each 360 degrees composted of a total of 9 segments)
 +
** '''R1''' (spiral out from center to current location)
 +
** '''F1200''' (at a speed of 1200 mm/min)
  
'''Usage'''
+
'''Example 3'''
  
   G19
+
   G0 X0 Y25                  ; start location for outer spiral
 +
  G0 Z1                      ; go to print layer height
 +
  G2.1 I25 J0 P4 L3 E1        ; spiral in 3 laps, 4mm pitch
 +
  G1 X14 E1                  ; add connector for the arcs
 +
  G2.1 I11 J0 P4 L3 E1 R2    ; spiral out 3 laps, 4mm pitch
  
'''Parameters'''
+
This gcode generates the following:
  
  N/A
+
[[File:Spiral.png|250px]]
 
 
'''Example'''
 
  
  G19
+
And since this can be a lot to take in, please feel fre to play around with Repetrel's built-in Arc/Spiral tool:
  
This command is decoded and executed by the printer as follows:
+
[[File:Arctool2.1.png]]
  
* '''G19''' (restrict element to Y/Z plane)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M0 Stop Until Resume ===
+
=== G2.2 Spiral CW Arc<sup>2</sup> ===
 
 
M0 is a stop until resume command; text listed after a semicolon will be displayed, and clicking the '''Play''' button (which replaces the '''Pause''' button) will cause the job to resume. Note that all lines will be truncated at 100 characters.
 
 
 
* ''';''' All text following the ''';''' will be echoed to the print mask (Control Tab).
 
  
Additionally, an M0 command can also take the following parameters, and so will pause and then:
+
A G2.2 makes a spiral circular move (only supports full 360 arcs, or '''Ln''' * 360). This arc is CW if spiraling in and CCW if spiraling out. Unlike G2.1, G2.2 specifies final X/Y (and Z) location. An end Z can be supplied to have a uniform displacement during the move. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs).  Unlike G2.1, G2.2 does not require a reverse code as the direction of spiral is determined by the positional relationship of the current position, final position, and center position.
  
 
'''Usage'''
 
'''Usage'''
  
   M0 [ SAY | PIC | VID | SEND | BEEP | SHELL ]
+
   G2.2 Xn Yn Zn In Jn Pn Ln En Sn Rn Fn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''SAY sample message''' - the computer will use built-in text-to-speech to echo the message over the speaker(s)
+
   '''Xn''' is the new X position to move to
   '''PIC C:\sample.jpg''' - the computer will display the image at the specified location
+
  '''Yn''' is the new Y position to move to
   '''VID C:\sample.mp4''' - the computer will play the video at the specified location
+
  '''Zn''' is the new Z position to end at (optional and usually not stipulated; will be relative or absolute, depending on current mode)
   '''SEND sample message''' - the computer will send the message to the Aux port if connected
+
   '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
   '''BEEP''' - the computer will sound a beep
+
   '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
   '''SHELL C:\program.exe''' - the computer will execute the file at the specified location
+
    ''Starting with Motion Controller firmware 4.203a:''
 +
    ''If I and J are both zero (center = start), path will spiral outward CCW from current to final position.''
 +
    ''If I and J match the end (center = end), path will spiral inward CW from current to final position."
 +
  '''Pn''' is the pitch (how close the laps are) in mm (optional)
 +
   '''Ln''' is the number of laps (or paths) to complete (you don't need to finish the spiral)
 +
    ''Note, if P and L values conflict, L will be modified to match what P will allow; at least one must be specified
 +
   '''En''' indicates a working or printing move
 +
   '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
 +
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
 +
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
 +
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
  
Note that multiple options can be combined.
+
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
  
'''Example'''
+
'''Example 1'''
  
   M0
+
   G2.2 I15 J20 P1 E1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M0''' (Pause until Resume)
+
* '''G2.2''' (working speed clockwise spiral move from the current location)
 +
** (no change in Z)
 +
** (centered about a point located)
 +
** '''I15''' (15mm further in the X)
 +
** '''J20''' (20mm further in the Y)
 +
** '''P2''' (1mm between centers of travel of adjacent laps)
 +
** (complete all laps)
 +
** '''E1''' (while extruding)
 +
** (use default S of 0.33333 mm segments)
 +
** (moving at established G1 F speed)
  
'''Example'''
+
'''Example 2'''
  
   M0 ; SAY Hello Wilbur ; PIC C:\mr_ed.png
+
   G2.2 Z10 I15 J20 P2 L50 E1 S9 F1200
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M0''' (Pause until Resume)  
+
* '''G2.2''' (working speed clockwise spiral move from the current location)
** '''SAY Hello Wilbur''' (Announce Text: Hello Wilbur)
+
** '''Z10''' (change Z position incrementally during move to end at Z10 (relative or absolute, depending on current mode))
** '''PIC C:\mr_ed.png''' (Display Image: C:\mr_ed.png)
+
** (centered about a point located)
 +
** '''I15''' (15mm further in the X)
 +
** '''J20''' (20mm further in the Y)
 +
** '''P2''' (2mm between centers of travel of adjacent laps)
 +
** '''L50''' (complete no more than 50 laps)
 +
** '''E1''' (while extruding)  
 +
** '''S9''' (each 360 degrees composted of a total of 9 segments)
 +
** '''F1200''' (at a speed of 1200 mm/min)
  
<br>
+
'''Example 3'''
<hr>
 
  
=== M203 Set G0 Speed ===
+
  G0 X0 Y25                  ; start location for outer spiral
 
+
  G0 Z1                      ; go to print layer height
M203 will redesignate the rate at which [[#G0 Rapid Move|G0]] movements are executed. If undeclared, the values stored in Repetrel for your equipment will be used. These can be changed under '''Settings > Printer''', on the '''Printer''' tab. The values set on your unit are set based on testing; exceed them at your own risk.
+
  G2.2 X12 I25 P4 E1          ; spiral in 3 laps, 4mm pitch
 +
  G1 X14 E1                  ; add connector to next spiral
 +
  G2.2 X2 I11 P4 E1          ; spiral out 3 laps, 4mm pitch
  
'''Usage'''
+
This gcode also generates the following:
  
  M203 Xn Yn Zn An Bn
+
[[File:Spiral.png|250px]]
 
 
'''Parameters'''
 
 
 
  '''Xn''' is the new speed in the X axis for G0 moves
 
  '''Yn''' is the new speed in the Y axis for G0 moves
 
  '''Zn''' is the new speed in the Z axis for G0 moves
 
  '''An''' is the new speed in the A axis for G0 moves
 
  '''Bn''' is the new speed in the B axis for G0 moves
 
 
 
'''Example'''
 
 
 
  M203 Y2000
 
 
 
This command is decoded and executed by the printer as follows:
 
 
 
* '''M203''' (Set G0 Speed)
 
** (X remains unchanged)
 
** '''Y2000''' (Y axis: 2000mm/min)
 
** (Z remains unchanged)
 
** (A remains unchanged)
 
** (B remains unchanged)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
=== G2.3 3-Space CW Arc ===
  
== '''Controlling Temperature''' ==
+
A G2.3 move specifies a clockwise arc (or complete circle(s) from the current position to position (X,Y,Z)<sub>curr</sub> following a circular arc about the center point (X<sub>curr</sub>+I, Y<sub>curr</sub>+J, Z<sub>curr</sub>+K). Unlike G2, G2.1 and G2.2, G2.3 is not bound to the X/Y plane. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs). 
 +
'''Usage'''
  
What's Hotbed 2 and Chamber 2? Well, our Hydra models have room to have a second hotbed, which could be a smaller, higher temperature hotbed, or a sub-ambient chilled bed, or even a High Resolution hotbed. And we've talked about having a smaller chamber inside the primary chamber, to bring the air around the print (but not the head) to much higher temperatures; call for details.
+
  G2.3 Xn Yn Zn An Bn In Jn Kn Un Vn Wn Dn Pn En Sn Fn
  
<br>
+
Note: If we are in G16 mode, Un, Vn, Wn define the vector normal to the work plane. If we are in G17 (X/Y plane) or G18 (X/Z plane) or G19 (Y/Z plane) mode, these are ignored.
<hr>
 
  
=== M104 Set Temp (Head) ===
+
'''Parameters'''
  
M104 sets the extruder temperature but does not pause the printer.  
+
  '''Xn''' is the new X position to end at
 +
  '''Yn''' is the new Y position to end at
 +
  '''Zn''' is the new Z position to end at
 +
  '''An''' is the new A position to end at (4th axis)
 +
  '''Bn''' is the new B position to end at (5th axis)
 +
  '''In''' is the '''''relative''''' distance from the current X position to the center position about which to arc (default 0)
 +
  '''Jn''' is the '''''relative''''' distance from the current Y position to the center position about which to arc (default 0)
 +
  '''Kn''' is the '''''relative''''' distance from the current Z position to the center position about which to arc (default 0)
 +
    ''Note: '''In''', '''Jn''', and '''Kn''' all default to 0, but at least one of them must be explicitly declared with a non-zero value.''
 +
  '''Un''' is the X component of a vector normal to the working plane (default 0)
 +
  '''Vn''' is the Y component of a vector normal to the working plane (default 0)
 +
  '''Wn''' is the Z component of a vector normal to the working plane (default 0)
 +
  '''Dn''' is the overall displacement normal to the working plane for this element
 +
  '''Pn''' is the pitch (how close the laps are normal to the working plane) in mm (default 0; one path, no incremental displacement)
 +
  '''En''' indicates a working or printing move
 +
  '''Sn''' dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
 +
    ''S values less than 3.0 dictate the length in mm of each segment for this element''
 +
    ''S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°''
 +
  '''Fn''' is the Feed rate (travel speed) at which to execute this move.
  
''Note that the actual '''T#''' values can be found on '''[[T_v4]]''' or '''[[T_v5]]''', depending on which version you are running.''
+
Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.
  
'''Usage'''
+
<br>
 +
<hr>
  
  M104 Sn T#
+
=== G3 Counterclockwise Arc ===
  
'''Parameters'''
+
Please refer to G2, above, for details. All options are identical, with the exception of direction (CCW).
  
  '''Sn''' is the new set temperature in °C
+
'''Further Examples'''
  '''T#''' is the tool assignment for this temperature command
 
  
'''Example'''
+
'''90°<br>'''
 +
[[File:G3-1.png]]
  
M104 T# S75
+
'''180°<br>'''
 +
[[File:G3-2.png]]
  
This command is decoded and executed by the printer as follows:
+
'''270°<br>'''
 +
[[File:G3-3.png]]
  
* '''M104''' (Set Cooling/LEDs)
+
'''360°<br>'''
** '''T#''' (target head)
+
[[File:G3-4.png]]<br>
** '''S75''' (to 75°C)
+
Note, if no endpoints are defined, G3 will make a 360° circle by default.
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M106 Set Cooling / Etc. ===
+
=== G3.1 Spiral CCW Arc<sup>1</sup> ===
  
M106 sets the cooling fan (or crosslinking LEDs) speed (or intensity). This also turns on the Quiet Storm fan.
+
Please refer to G2.1, above, for details. All options are identical, with the exception of direction (CCW if spiraling in and CW if spiraling out).
  
'''Usage'''
+
<br>
 +
<hr>
 +
 
 +
=== G3.2 Spiral CCW Arc<sup>2</sup> ===
 +
 
 +
Please refer to G2.2, above, for details. All options are identical, with the exception of direction (CCW if spiraling in and CW if spiraling out).
  
  M106 Cn
+
<br>
 +
<hr>
  
or
+
=== G3.3 3-Space CCW Arc ===
  
  M106 T# Sn
+
Please refer to G2.3, above, for details. All options are identical, with the exception of direction (CCW).
  
or
+
<br>
 +
<hr>
  
  M106 T# Pn
+
=== G4 Timed Pause ===
  
'''Parameters'''
+
G4 is a pause for a set number of seconds (S) or milliseconds (P).
  
  '''T#''' is the target head
+
''You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.''
  '''Sn''' is the percent of duty cycle for the cooling fan (or LEDs); default: 100
 
  '''Cn''' is the range (0-100 or 0-255) that we will use; if unspecified, the default is C100 (use C255 to be compatible with most slicers)
 
  '''Pn''' is the percent of duty cycle for the cooling fan (or LEDs) ''to come on only during extrusion moves''
 
  
'''Example'''
+
'''Usage'''
  
   M106 C255
+
   G4 Sn Pn
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M106''' (Set Cooling/LEDs)
+
  '''Sn''' is the number of Seconds to pause
** (on all tools)
+
  '''Pn''' is the number of Milliseconds to pause
** (no speed)
 
** '''C255''' (of range 0-255)
 
  
Note, with this command, all following M106 commands for the rest of this print job will be based on this range (unless specified with a new C value).
+
You may use '''S''' or '''P''', or if you use both, the total value will be the pause duration.
  
 
'''Example'''
 
'''Example'''
  
   M106 T# S50
+
   G4 S0.5
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M106''' (Set Cooling/LEDs)  
+
* '''G4''' (Timed pause)  
** '''T#''' (target head)
+
** '''S0.5''' (0.5 seconds)
** '''S50''' (target value of 50)
 
** (previously defined (or default 0-100) range)
 
  
 
'''Example'''
 
'''Example'''
  
M106 T# P100
+
  G4 P500
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M106''' (Set Cooling/LEDs)  
+
* '''G4''' (Timed pause)  
** '''T#''' (target head)
+
** '''P500''' (500 milliseconds)
** '''P100''' (during extrusion moves at 100% duty cycle
+
 
 +
<br>
 +
<hr>
  
<span style="color: blue;">''But Davo, I want to cure a certain spot for 10 seconds with every layer change; how do I do this?''</span>
+
=== G16 Arc Plane: Any ===
  
Easy. Edit your slicer recipe to add the following code after layer changes (edit as needed for duration, intensity, or position):
+
G16 permits free-form designation of points in space, without limiting them to an axial plane.
  
  ;---- BEGIN COD CODE
+
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
  G91 ; relative moves
 
  G0 Z5 ; drop bed
 
  G90 ; absolute moves
 
  G0 X130 Y110 ; move into position
 
  M106 S100 T# ; turn on T# UV at 100%
 
  G1 X140 Y110 F100 ; move 10 mm in the X at 100 mm/min
 
  G1 X140 Y120 F100 ; move 10 mm in the Y at 100 mm/min
 
  G1 X130 Y120 F100 ; move -10 mm in the X at 100 mm/min
 
  G1 X130 Y110 F100 ; move -10 mm in the Y at 100 mm/min
 
  M106 S0 T# ; turn off T# UV (set it to 0%)
 
  ;--- END COD GCODE
 
  
These commands are decoded and executed by the printer as follows:
+
'''Usage'''
  
* '''G91''' (Use relative moves)
+
  G16
* '''G0''' (Non-working move)
 
** '''Z5''' (+5 mm in the Z)
 
* '''G90''' (Use absolute moves)
 
* '''G0''' (Non-working move)
 
** '''X130''' (To position X130)
 
** '''Y110''' (To position Y110)
 
* '''M106''' (Set Aux (UV))
 
** '''S100''' (100% duty)
 
** '''T#''' (On target head)
 
* '''G1''' (Working (printing) move)
 
** '''X140''' (To position X140)
 
** '''Y110''' (To position Y110
 
** '''F100''' (At 100 mm/min)
 
* '''G1''' (Working (printing) move)
 
** '''X140''' (To position X140)
 
** '''Y120''' (To position Y120
 
** '''F100''' (At 100 mm/min)
 
* '''G1''' (Working (printing) move)
 
** '''X130''' (To position X130)
 
** '''Y120''' (To position Y120
 
** '''F100''' (At 100 mm/min)
 
* '''G1''' (Working (printing) move)
 
** '''X130''' (To position X130)
 
** '''Y110''' (To position Y110
 
** '''F100''' (At 100 mm/min)
 
* '''M106''' (Set Aux (UV))
 
** '''S0''' (0% duty)
 
** '''T#''' (On target head)
 
  
<br>
+
'''Parameters'''
<hr>
 
  
=== M107 Stop Cooling / Etc. ===
+
  N/A
  
M107 turns off the cooling fan (or crosslinking LEDs); this is essentially the same as an M106 S0 (setting it to 0 percent). This will also turn off the Quiet Storm fan.
+
'''Example'''
  
'''Usage'''
+
  G16
  
  M107 T#
+
This command is decoded and executed by the printer as follows:
  
'''Parameters'''
+
* '''G16''' (allow element in any orientation)
  
   '''T#''' (target head)
+
<br>
 +
<hr>
 +
 
 +
=== G17 Arc Plane: XY ===
 +
 
 +
G17 restricts this element to the X/Y plane.
 +
 
 +
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
 +
 
 +
'''Usage'''
 +
 
 +
   G17
 +
 
 +
'''Parameters'''
 +
 
 +
  N/A
  
 
'''Example'''
 
'''Example'''
  
M107 T# 
+
  G17
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M107''' (Set Cooling/LEDs to 0%)
+
* '''G17''' (restrict element to X/Y plane)  
** '''T#''' (target head)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M109 Wait for Temp (Head) ===
+
=== G18 Arc Plane: XZ ===
  
M109 waits for the extruder to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) heads as options.
+
G18 restricts this element to the X/Z plane.
  
''Note that the actual '''T#''' values can be found on '''[[T_v4]]''' or '''[[T_v5]]''', depending on which version you are running.''
+
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
  
 
'''Usage'''
 
'''Usage'''
  
   M109 T# Sn Hn Cn Ln Un Rn
+
   G18
  
Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M109 command.
+
'''Parameters'''
 +
 
 +
  N/A
  
Note, this will FAIL (non-fatally) if you address a virtual group address;  be sure to use an actual physical address.
+
'''Example'''
  
'''Parameters'''
+
  G18
  
  '''T#''' is the target head
+
This command is decoded and executed by the printer as follows:
  '''Sn''' (optional) is the new set temperature in °C; if omitted, no new target temperature is set
 
  '''Hn''' if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
 
  '''Cn''' if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
 
  '''Ln''' if present, is the lower-end relative temperature ''difference from set temp'' after which we stop pausing
 
  '''Un''' if present, is the upper-end relative temperature ''difference from set temp'' after which we stop pausing
 
  '''Rn''' if present, is how close the relative temperature needs to be to the set temp to end the pause
 
  
Think of '''Sn''' as the target temperature, but once the target is between '''Cn (or Ln)''' and '''Hn (or Un)''', the pause is over (but the '''Sn''' is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.
+
* '''G18''' (restrict element to X/Z plane)  
  
'''Example 1'''
+
<br>
 +
<hr>
  
  M109 T# S240
+
=== G19 Arc Plane: YZ ===
  
This command is decoded and executed by the printer as follows:
+
G19 restricts this element to the Y/Z plane.
  
* '''M109''' (wait for temp)
+
''G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.''
** '''T#''' (target head)
 
** '''S240''' (and set temp to 240°C)
 
  
'''Example 2'''
+
'''Usage'''
  
   M109 T# S240 R5
+
   G19
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M109''' (wait for temp)
+
  N/A
** '''T#''' (target head)
 
** '''S240''' (and set temp to 240°C)
 
** '''R5''' (but end the wait once the target's temperature is within 5°C of the set point)
 
  
'''Example 3'''
+
'''Example'''
  
   M109 T# S240 H230
+
   G19
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M109''' (wait for temp)
+
* '''G19''' (restrict element to Y/Z plane)  
** '''T#''' (target head)
 
** '''S240''' (and set temp to 240°C)
 
** '''H230''' (but end the wait once the target's temperature reaches 230°C)
 
  
'''Example 4'''
+
<br>
 +
<hr>
  
  M109 T# S240 L10 U5
+
=== M0 Stop Until Resume ===
  
This command is decoded and executed by the printer as follows:
+
M0 is a stop until resume command; text listed after a semicolon will be displayed, and clicking the '''Play''' button (which replaces the '''Pause''' button) will cause the job to resume. Note that all lines will be truncated at 100 characters.
  
* '''M109''' (wait for temp)
+
* ''';''' All text following the ''';''' will be echoed to the print mask (Control Tab).
** '''T#''' (target head)
 
** '''S240''' (and set temp to 240°C)
 
** '''L10''' (but end the wait once the target's temperature reaches 10°C below the set point)
 
** '''U5''' (or end the wait once the target's temperature reaches 5°C above the set point)
 
  
''Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C''
+
Additionally, an M0 command can also take the following parameters, and so will pause and then:
  
'''Example 5'''
+
'''Usage'''
  
   M109 T# S0 R5
+
   M0 [ SAY | PIC | VID | SEND | BEEP | SHELL ]
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M109''' (wait for temp)  
+
  '''SAY sample message''' - the computer will use built-in text-to-speech to echo the message over the speaker(s)
** '''T#''' (target head)
+
  '''PIC C:\sample.jpg''' - the computer will display the image at the specified location
** '''S0''' (to 0°C)
+
  '''VID C:\sample.mp4''' - the computer will play the video at the specified location
** '''R5''' (but end the wait once the target's temperature is +/-5°C of the set temperature)
+
  '''SEND sample message''' - the computer will send the message to the Aux port if connected
 +
  '''BEEP''' - the computer will sound a beep
 +
  '''SHELL C:\program.exe''' - the computer will execute the file at the specified location
  
'''Example 6'''
+
Note that multiple options can be combined.
  
  M109 R10
+
'''Example'''
  
* '''M109''' (wait for temp)
+
  M0
** (no T# - use head with current focus)
 
** '''R10''' (to get +/-10°C of set temperature)
 
  
<br>
+
This command is decoded and executed by the printer as follows:
<hr>
+
 
 +
* '''M0''' (Pause until Resume)
 +
 
 +
'''Example'''
 +
 
 +
  M0 ; SAY Hello Wilbur ; PIC C:\mr_ed.png
  
=== M116 UNUSED ===
+
This command is decoded and executed by the printer as follows:
 
M116 is not recognized by Repetrel.
 
  
On some other printers, this will cause the printer to pause until all set temperatures are reached.
+
* '''M0''' (Pause until Resume)
 +
** '''SAY Hello Wilbur''' (Announce Text: Hello Wilbur)
 +
** '''PIC C:\mr_ed.png''' (Display Image: C:\mr_ed.png)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M140 Set Temp (Bed) ===
+
=== M203 Set G0 Speed ===
  
M140 sets the bed temperature (without waiting for the new temperature to be reached).
+
M203 will redesignate the rate at which [[#G0 Rapid Move|G0]] movements are executed. If undeclared, the values stored in Repetrel for your equipment will be used. These can be changed under '''Settings > Printer''', on the '''Printer''' tab. The values set on your unit are set based on testing; exceed them at your own risk.
  
 
'''Usage'''
 
'''Usage'''
  
   M140 Sn T#
+
   M203 Xn Yn Zn An Bn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the new set temperature in °C
+
   '''Xn''' is the new speed in the X axis for G0 moves
   '''T#''' is the target bed (default is the primary bed)
+
   '''Yn''' is the new speed in the Y axis for G0 moves
 +
  '''Zn''' is the new speed in the Z axis for G0 moves
 +
  '''An''' is the new speed in the A axis for G0 moves
 +
  '''Bn''' is the new speed in the B axis for G0 moves
  
 
'''Example'''
 
'''Example'''
  
M140 S75
+
  M203 Y2000
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M140''' (set bed temperature)
+
* '''M203''' (Set G0 Speed)
** '''S75''' (to 75°C)
+
** (X remains unchanged)
** (on primary bed)
+
** '''Y2000''' (Y axis: 2000mm/min)
 +
** (Z remains unchanged)
 +
** (A remains unchanged)
 +
** (B remains unchanged)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M141 Set Temp (Chamber) ===
+
=== M674 Use Turbo Mode ===
  
M141 sets the chamber temperature (without waiting for the new temperature to be reached).
+
M674 will enable Turbo Mode, where certain non-printing (no E value) working (G1, G2, or G3) moves will be treated as G0 moves (executed at "rapid move speed" rather than "working move speed"). Killing a job will clear the M674 setting.
  
 
'''Usage'''
 
'''Usage'''
  
   M141 Sn T#
+
   M674 Sn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the new set temperature in °C
+
   '''Sn''' is the minimum distance threshold for Turbo Mode to activate, and is required; no S value returns an error.
  '''T#''' is the target chamber (default is the primary chamber)
 
  
'''Example'''
+
'''Example 1'''
  
M141 S75
+
  M674 S2
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M141''' (set chamber temperature)
+
* '''M674''' (Set Turbo Mode)  
** '''S75''' (to 75°C)
+
** '''S2''' (for moves of 2 mm or greater)  
** (on primary chamber)
 
  
<br>
+
'''Example 2'''
<hr>
 
  
=== M190 Wait for Temp (Bed) ===
+
  M674 S50
  
M190 waits for the bed to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) beds as options.
+
This command is decoded and executed by the printer as follows:
  
'''Usage'''
+
* '''M674''' (Set Turbo Mode)
 +
** '''S50''' (for moves of 50 mm or greater)
  
  M190 T# Sn Hn Cn Ln Un Rn
+
<br>
 +
<hr>
  
Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M190 command.
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
Note, this will FAIL (non-fatally) if you address a virtual group address;  be sure to use an actual physical address.
+
== '''Controlling Temperature''' ==
  
'''Parameters'''
+
{| border="1" class="wikitable" style="float:right"
 
+
! colspan="3" | Controlling Temperature
  '''T#''' is the target bed (default is the primary (or only) bed)
+
|-
  '''Sn''' (optional) is the new set temperature in °C; if omitted, no new target temperature is set
+
! Code
  '''Hn''' if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
+
! Supported
  '''Cn''' if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
+
! Brief Description
  '''Ln''' if present, is the lower-end relative temperature ''difference from set temp'' after which we stop pausing
+
|-
  '''Un''' if present, is the upper-end relative temperature ''difference from set temp'' after which we stop pausing
+
! [[#M104_Set_Temp_.28Head.29|M104]]
  '''Rn''' if present, is how close the relative temperature needs to be to the set temp to end the pause
+
| Yes || Set Temp (Head)
 +
|-
 +
! [[#M106_Set_Cooling_.2F_Etc.|M106]]
 +
| Yes || Set Cooling / Etc.
 +
|-
 +
! [[#M107_Stop_Cooling_.2F_Etc.|M107]]
 +
| Yes || Stop Cooling / Etc.
 +
|-
 +
! [[#M109_Wait_for_Temp_.28Head.29|M109]]
 +
| Yes || Wait for Temp (Head)
 +
|-
 +
! [[#M116 Wait for Temps (v5+)|M116]]
 +
| <span style="color:darkorange;">v5+ || <span style="color:darkorange;">Pause for All Temps
 +
|-
 +
! [[#M140_Set_Temp_.28Bed.29|M140]]
 +
| Yes || Set Temp (Bed)
 +
|-
 +
! [[#M141_Set_Temp_.28Chamber.29|M141]]
 +
| Yes || Set Temp (Chamber)
 +
|-
 +
! [[#M190_Wait_for_Temp_.28Bed.29|M190]]
 +
| Yes || Wait for Temp (Bed)
 +
|-
 +
! [[#M191_Wait_for_Temp_.28Chamber.29|M191]]
 +
| Yes || Wait for Temp (Chamber)
 +
|-
 +
|}
  
Think of '''Sn''' as the target temperature, but once the target is between '''Cn (or Ln)''' and '''Hn (or Un)''', the pause is over (but the '''Sn''' is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.
+
What's Hotbed 2 and Chamber 2? Well, our Hydra models have room to have a second hotbed, which could be a smaller, higher temperature hotbed, or a sub-ambient chilled bed, or even a High Resolution hotbed. And we've talked about having a smaller chamber inside the primary chamber, to bring the air around the print (but not the head) to much higher temperatures; call for details.
  
'''Example 1'''
+
<br>
 +
<hr>
  
  M190 T# S240
+
=== M104 Set Temp (Head) ===
  
This command is decoded and executed by the printer as follows:
+
M104 sets the extruder temperature but does not pause the printer.
  
* '''M190''' (wait for temp)
+
''Note that the actual '''T#''' values can be found on '''[[T_v4]]''' or '''[[T_v5]]''', depending on which version you are running.''
** '''T#''' (target bed)
 
** '''S240''' (and set temp to 240°C)
 
  
'''Example 2'''
+
'''Usage'''
  
   M190 T# S240 R5
+
   M104 Sn T#
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M190''' (wait for temp)
+
  '''Sn''' is the new set temperature in °C
** '''T#''' (target bed)
+
  '''T#''' is the tool assignment for this temperature command
** '''S240''' (and set temp to 240°C)
 
** '''R5''' (but end the wait once the target's temperature is within 5°C of the set point)
 
  
'''Example 3'''
+
'''Example'''
  
  M190 T# S240 H230
+
M104 T# S75
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M190''' (wait for temp)  
+
* '''M104''' (Set Temperature)  
** '''T#''' (target bed)
+
** '''T#''' (target head)
** '''S240''' (and set temp to 240°C)
+
** '''S75''' (to 75°C)
** '''H230''' (but end the wait once the target's temperature reaches 230°C)
 
  
'''Example 4'''
+
<br>
 +
<hr>
  
  M190 T# S240 L10 U5
+
=== M106 Set Cooling / Etc. ===
  
This command is decoded and executed by the printer as follows:
+
M106 sets the cooling fan (or crosslinking LEDs) speed (or intensity). This also turns on the Quiet Storm fan.
  
* '''M190''' (wait for temp)
+
'''Usage'''
** '''T#''' (target bed)
 
** '''S240''' (and set temp to 240°C)
 
** '''L10''' (but end the wait once the target's temperature reaches 10°C below the set point)
 
** '''U5''' (or end the wait once the target's temperature reaches 5°C above the set point)
 
  
''Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C''
+
  M106 Cn
  
'''Example 5'''
+
or
  
   M190 T# S0 R5
+
   M106 T# Sn
  
This command is decoded and executed by the printer as follows:
+
or
  
* '''M190''' (wait for temp)
+
  M106 T# Pn
** '''T#''' (target bed)
 
** '''S0''' (to 0°C)
 
** '''R5''' (but end the wait once the target's temperature is +/-5°C of the set temperature)
 
  
'''Example 6'''
+
'''Parameters'''
  
   M190 R10
+
   '''T#''' is the target head
 +
  '''Sn''' is the percent of duty cycle for the cooling fan (or LEDs); default: 100
 +
  '''Cn''' is the range (0-100 or 0-255) that we will use; if unspecified, the default is C100 (use C255 to be compatible with most slicers)
 +
  '''Pn''' is the percent of duty cycle for the cooling fan (or LEDs) ''to come on only during extrusion moves''
  
* '''M190''' (wait for temp)
+
'''Example'''
** (no T# - use bed with current focus)
 
** '''R10''' (to get +/-10°C of set temperature)
 
  
<br>
+
  M106 C255
<hr>
 
  
=== M191 Wait for Temp (Chamber) ===
+
This command is decoded and executed by the printer as follows:
M191 waits for the chamber to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) chambers as options.
 
  
'''Usage'''
+
* '''M106''' (Set Cooling/LEDs)
 +
** (on all tools)
 +
** (no speed)
 +
** '''C255''' (of range 0-255)
  
  M191 T# Sn Hn Cn Ln Un Rn
+
Note, with this command, all following M106 commands for the rest of this print job will be based on this range (unless specified with a new C value).
  
Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M191 command.
+
'''Example'''
  
Note, this will FAIL (non-fatally) if you address a virtual group address;  be sure to use an actual physical address.
+
  M106 T# S50
  
'''Parameters'''
+
This command is decoded and executed by the printer as follows:
  
  '''T#''' is the target chamber (default is the primary (or only) chamber)
+
* '''M106''' (Set Cooling/LEDs)  
  '''Sn''' (optional) is the new set temperature in °C; if omitted, no new target temperature is set
+
** '''T#''' (target head)
  '''Hn''' if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
+
** '''S50''' (target value of 50)
  '''Cn''' if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
+
** (previously defined (or default 0-100) range)
  '''Ln''' if present, is the lower-end relative temperature ''difference from set temp'' after which we stop pausing
 
  '''Un''' if present, is the upper-end relative temperature ''difference from set temp'' after which we stop pausing
 
  '''Rn''' if present, is how close the relative temperature needs to be to the set temp to end the pause
 
  
Think of '''Sn''' as the target temperature, but once the target is between '''Cn (or Ln)''' and '''Hn (or Un)''', the pause is over (but the '''Sn''' is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.
+
'''Example'''
  
'''Example 1'''
+
M106 T# P100
 
 
  M191 T# S240
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M191''' (wait for temp)  
+
* '''M106''' (Set Cooling/LEDs)  
** '''T#''' (target chamber)
+
** '''T#''' (target head)
** '''S240''' (and set temp to 240°C)
+
** '''P100''' (during extrusion moves at 100% duty cycle
  
'''Example 2'''
+
<span style="color: blue;">''But Davo, I want to cure a certain spot for 10 seconds with every layer change; how do I do this?''</span>
  
  M191 T# S240 R5
+
Easy. Edit your slicer recipe to add the following code after layer changes (edit as needed for duration, intensity, or position):
  
This command is decoded and executed by the printer as follows:
+
  ;---- BEGIN COD CODE
 +
  G91 ; relative moves
 +
  G0 Z5 ; drop bed
 +
  G90 ; absolute moves
 +
  G0 X130 Y110 ; move into position
 +
  M106 S100 T# ; turn on T# UV at 100%
 +
  G1 X140 Y110 F100 ; move 10 mm in the X at 100 mm/min
 +
  G1 X140 Y120 F100 ; move 10 mm in the Y at 100 mm/min
 +
  G1 X130 Y120 F100 ; move -10 mm in the X at 100 mm/min
 +
  G1 X130 Y110 F100 ; move -10 mm in the Y at 100 mm/min
 +
  M106 S0 T# ; turn off T# UV (set it to 0%)
 +
  ;--- END COD GCODE
  
* '''M191''' (wait for temp)
+
These commands are decoded and executed by the printer as follows:
** '''T#''' (target chamber)
 
** '''S240''' (and set temp to 240°C)
 
** '''R5''' (but end the wait once the target's temperature is within 5°C of the set point)
 
  
'''Example 3'''
+
* '''G91''' (Use relative moves)
 +
* '''G0''' (Non-working move)
 +
** '''Z5''' (+5 mm in the Z)
 +
* '''G90''' (Use absolute moves)
 +
* '''G0''' (Non-working move)
 +
** '''X130''' (To position X130)
 +
** '''Y110''' (To position Y110)
 +
* '''M106''' (Set Aux (UV))
 +
** '''S100''' (100% duty)
 +
** '''T#''' (On target head)
 +
* '''G1''' (Working (printing) move)
 +
** '''X140''' (To position X140)
 +
** '''Y110''' (To position Y110
 +
** '''F100''' (At 100 mm/min)
 +
* '''G1''' (Working (printing) move)
 +
** '''X140''' (To position X140)
 +
** '''Y120''' (To position Y120
 +
** '''F100''' (At 100 mm/min)
 +
* '''G1''' (Working (printing) move)
 +
** '''X130''' (To position X130)
 +
** '''Y120''' (To position Y120
 +
** '''F100''' (At 100 mm/min)
 +
* '''G1''' (Working (printing) move)
 +
** '''X130''' (To position X130)
 +
** '''Y110''' (To position Y110
 +
** '''F100''' (At 100 mm/min)
 +
* '''M106''' (Set Aux (UV))
 +
** '''S0''' (0% duty)
 +
** '''T#''' (On target head)
  
  M191 T# S240 H230
+
<br>
 +
<hr>
  
This command is decoded and executed by the printer as follows:
+
=== M107 Stop Cooling / Etc. ===
  
* '''M191''' (wait for temp)  
+
M107 turns off the cooling fan (or crosslinking LEDs); this is essentially the same as an M106 S0 (setting it to 0 percent). This will also turn off the Quiet Storm fan.
** '''T#''' (target chamber)
 
** '''S240''' (and set temp to 240°C)
 
** '''H230''' (but end the wait once the target's temperature reaches 230°C)
 
  
'''Example 4'''
+
'''Usage'''
  
   M191 T# S240 L10 U5
+
   M107 T#
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M191''' (wait for temp)
+
  '''T#''' (target head)
** '''T#''' (target chamber)
 
** '''S240''' (and set temp to 240°C)
 
** '''L10''' (but end the wait once the target's temperature reaches 10°C below the set point)
 
** '''U5''' (or end the wait once the target's temperature reaches 5°C above the set point)
 
  
''Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C''
+
'''Example'''
  
'''Example 5'''
+
M107 T#
 
 
  M191 T# S0 R5
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M191''' (wait for temp)  
+
* '''M107''' (Set Cooling/LEDs to 0%)  
** '''T#''' (target chamber)
+
** '''T#''' (target head)
** '''S0''' (to 0°C)
 
** '''R5''' (but end the wait once the target's temperature is +/-5°C of the set temperature)
 
 
 
'''Example 6'''
 
 
 
  M191 R10
 
 
 
* '''M191''' (wait for temp)
 
** (no T# - use chamber with current focus)
 
** '''R10''' (to get +/-10°C of set temperature)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
=== M109 Wait for Temp (Head) ===
  
== '''Controlling Material Flow''' ==
+
M109 waits for the extruder to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) heads as options.
  
You can specify flow rate variables in your gcode; we do not do this by default, but take these values from the head itself. Any values you stipulate in your gcode will supersede the values stored on the head. With our recipes the slicing program generates gcode which dictates temperature and movement commands and indicates which moves should dispense material (a G1 move with an E value).  
+
''Note that the actual '''T#''' values can be found on '''[[T_v4]]''' or '''[[T_v5]]''', depending on which version you are running.''
  
However, we have two different ways to control flow.
+
'''Usage'''
  
* If you use '''M229 E1 D1''' we will use the E values generated by the slicer. This allows for varying extrusion widths and layer thicknesses (on the same layer - as with support material). This is how just about all slicers and printers work.
+
  M109 T# Sn Hn Cn Ln Un Rn <span style="color:darkorange;">W0
  
* If you do not use that command, we do not use that E value (except to distinguish printing from non-printing moves) we calculate for flow based purely on travel speed, declared layer thickness, and nozzle diameter. This is explained at http://hyrel3d.net/wiki/index.php/Flow_Rate
+
Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M109 command.
  
When a head is loaded, it sends this flow data (how to calculate flow, as well as how much to prime and unprime (advance and retract) material when transitioning between printing and non-printing moves - and even how many primes or unprimes to do in conjunction with a tool change.
+
Note, this will FAIL (non-fatally) if you address a virtual group address;  be sure to use an actual physical address.
  
In this way, the very same gcode (with temperature changes) can be used with any material, provided you are using the same physical parameters that the model was sliced for.
+
'''Parameters'''
  
<br>
+
  '''T#''' is the target head - (required)
<hr>
+
  '''Sn''' (optional) is the new set temperature in °C; if omitted, no new target temperature is set
 +
  '''Hn''' if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
 +
  '''Cn''' if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
 +
  '''Ln''' if present, is the lower-end relative temperature ''difference from set temp'' after which we stop pausing
 +
  '''Un''' if present, is the upper-end relative temperature ''difference from set temp'' after which we stop pausing
 +
  '''Rn''' if present, is how close the relative temperature needs to be to the set temp to end the pause
 +
  <span style="color:darkorange;">'''W0''' if present, will set the temp and advance to the next line without pause, but upon executing M116, will pause until temp is reached
  
=== G10 UNUSED<sup>1</sup> ===
+
Think of '''Sn''' as the target temperature, but once the target is between '''Cn (or Ln)''' and '''Hn (or Un)''', the pause is over (but the '''Sn''' is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.
  
G10 is not recognized by Repetrel.
+
'''Example 1'''
  
On some other printers, this will set tool offsets; we do this via '''M6'''.
+
  M109 T# S240
  
On some other printers, this will do a retract; we do this via '''M721'''.
+
This command is decoded and executed by the printer as follows:
  
<br>
+
* '''M109''' (wait for temp)
<hr>
+
** '''T#''' (target head)
 +
** '''S240''' (and set temp to 240°C)
  
=== G11 UNUSED ===
+
'''Example 2'''
  
G11 is not recognized by Repetrel.
+
  M109 T# S240 R5
  
On some other printers, this will do an advance or unretract; we do this via '''M722'''.
+
This command is decoded and executed by the printer as follows:
  
<br>
+
* '''M109''' (wait for temp)
<hr>
+
** '''T#''' (target head)
 +
** '''S240''' (and set temp to 240°C)
 +
** '''R5''' (but end the wait once the target's temperature is within 5°C of the set point)
  
=== M82 Absolute E-Values ===
+
'''Example 3'''
  
M82 stipulates that henceforth, the extrusion positioning (E values) will be calculated from the original (0) point.
+
  M109 T# S240 H230
  
Note, this only works on v4 and later, when E values are enabled via '''M229'''.
+
This command is decoded and executed by the printer as follows:
  
'''Usage'''
+
* '''M109''' (wait for temp)
 +
** '''T#''' (target head)
 +
** '''S240''' (and set temp to 240°C)
 +
** '''H230''' (but end the wait once the target's temperature reaches 230°C)
  
  M82
+
'''Example 4'''
  
'''Parameters'''
+
  M109 T# S240 L10 U5
  
  N/A
+
This command is decoded and executed by the printer as follows:
  
'''Example'''
+
* '''M109''' (wait for temp)
 +
** '''T#''' (target head)
 +
** '''S240''' (and set temp to 240°C)
 +
** '''L10''' (but end the wait once the target's temperature reaches 10°C below the set point)
 +
** '''U5''' (or end the wait once the target's temperature reaches 5°C above the set point)
  
M82
+
''Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C''
  
This command is decoded and executed by the printer as follows:
+
'''Example 5'''
  
* '''M82''' (use absolute E values)
+
  M109 T# S0 R5
  
<br>
+
This command is decoded and executed by the printer as follows:
<hr>
 
  
=== M83 Relative E-Values ===
+
* '''M109''' (wait for temp)
 +
** '''T#''' (target head)
 +
** '''S0''' (to 0°C)
 +
** '''R5''' (but end the wait once the target's temperature is +/-5°C of the set temperature)
 +
 
 +
'''Example 6'''
 +
 
 +
  M109 R10
 +
 
 +
* '''M109''' (wait for temp)
 +
** (no T# - use head with current focus)
 +
** '''R10''' (to get +/-10°C of set temperature)
 +
 
 +
<span style="color:darkorange;">'''Example 7'''
 +
 
 +
  <span style="color:darkorange;">M109 T# S240 W0
 +
 
 +
<span style="color:darkorange;">This command is decoded and executed by the printer as follows:
 +
 
 +
* <span style="color:darkorange;">'''M109''' (wait for temp)
 +
** <span style="color:darkorange;">'''T#''' (target head)
 +
** <span style="color:darkorange;">'''S240''' (and set temp to 240°C)
 +
** <span style="color:darkorange;">'''W0''' (but do not pause until M116 is executed)
  
M83 stipulates that henceforth, the extrusion positioning (E values) will be calculated from the relative (last used) point.
+
<br>
 +
<hr>
  
Note, this only works on v4 and later, when E values are enabled via '''M229'''.
+
=== <span style="color:darkorange;">M116 Wait for Temps (v5+)</span> ===
 +
 +
<span style="color:darkorange;">M116 is supported with version 5.x and later (v5+) of Repetrel Software and Motion Controller Firmware.
  
'''Usage'''
+
<span style="color:darkorange;">'''Usage'''
  
   M83
+
   <span style="color:darkorange;">M116
  
'''Parameters'''
+
<span style="color:darkorange;">'''Parameters'''
  
   N/A
+
   <span style="color:darkorange;">'none'
  
'''Example'''
+
<span style="color:darkorange;">'''Example'''
  
   M83
+
   <span style="color:darkorange;">M116
  
This command is decoded and executed by the printer as follows:
+
<span style="color:darkorange;">This command is decoded and executed by the printer as follows:
  
* '''M83''' (use relative E values)
+
* <span style="color:darkorange;">'''M116''' (wait for any set temps (M109, M190, M191) with '''W0''' values before proceding
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M221 Set Flow Rate ===
+
=== M140 Set Temp (Bed) ===
  
M221 sends information to the printer about material flow.
+
M140 sets the bed temperature (without waiting for the new temperature to be reached).
 
 
Note, our default mode is volumetric calculations; if you need to slice with linear calculations, multiply your Pn by approximately 2.4 (you can do the math).
 
  
 
'''Usage'''
 
'''Usage'''
  
   M221 Pn Sn Wn Zn T#
+
   M140 Sn T#
  
 
'''Parameters'''
 
'''Parameters'''
  
  '''Pn''' is the number of pulses on the motor to dispense 1 μl (for volumetric) or 1 mm (for linear) of material;
+
   '''Sn''' is the new set temperature in °C
   '''Sn''' is the direct flow multiplier (to allow for undersized or oversized stock;
+
   '''T#''' is the target bed (default is the primary bed)
   '''Wn''' is the width of the cross section of the volume to fill;
 
  '''Zn''' is the height (layer thickness) of the cross section of the volume to fill; and
 
  '''T#''' is the tool (head) to which these values will be applied.
 
  
 
'''Example'''
 
'''Example'''
  
  M221 S1.0 T# P77 W0.5 Z0.3
+
M140 S75
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M221''' (set flow rate)
+
* '''M140''' (set bed temperature)
** '''S1.0''' (flow multiplier of 1.0)
+
** '''S75''' (to 75°C)
** '''T#''' (target head)
+
** (on primary bed)
** '''P77''' (77 pulses per microliter) 
 
** '''W0.5''' (0.5mm nozzle) 
 
** '''Z0.3''' (0.3mm layer thickness - note that your gcode '''M756''' will overwrite this value)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M229 Use E Values ===
+
=== M141 Set Temp (Chamber) ===
  
'''Starting with version 4''', Hyrel will begin to enable the use of E-values in your gcode. Variable extrusion width and support/infill thickness slicers, rejoice! Note, calculations are done for every single move individually.
+
M141 sets the chamber temperature (without waiting for the new temperature to be reached).
  
 
'''Usage'''
 
'''Usage'''
  
   M229 En Dn Sn
+
   M141 Sn T#
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''En''' can be 0 (native flow calculation) or 1 (use E values)
+
   '''Sn''' is the new set temperature in °C
   '''Dn''' how directed to head; see below
+
   '''T#''' is the target chamber (default is the primary chamber)
    '''D0''' on head controller directly; constant flow, not adjusted for motion acceleration/deceleration
 
    '''D1''' on motion controller, sent to head via CANBUS and adjusted for motion acceleration/deceleration
 
    '''D2''' on motion controller, sent to head via C axis step pin and adjusted for motion acceleration/deceleration
 
    '''D3''' on motion controller, sent to head via CANBUS and C axis and adjusted for motion acceleration/deceleration
 
  '''Sn''' sets a threshold in seconds; isolated non-printing moves below this threshold will not trigger unprime/prime actions
 
  
Note: E1 D0 is an illegal combination.
+
'''Example'''
  
'''Example 1'''
+
M141 S75
 
 
  M229 E1 D1
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M229''' (E values)
+
* '''M141''' (set chamber temperature)
** '''E1''' (enabled)
+
** '''S75''' (to 75°C)
** '''D1''' (flow calculations directed via CANBUS and adjusted to motion acceleration/deceleration)
+
** (on primary chamber)
  
''Above is the default way to enable E values.''
+
<br>
 +
<hr>
  
'''Example 2'''
+
=== M190 Wait for Temp (Bed) ===
  
  M229 E0 D0
+
M190 waits for the bed to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) beds as options.
  
This command is decoded and executed by the printer as follows:
+
'''Usage'''
  
* '''M229''' (E values) 
+
  M190 T# Sn Hn Cn Ln Un Rn
** '''E0''' (disabled) 
 
** '''D0''' (flow calculations on head controller)
 
  
''Above is the default way to ignore E values, and is how v3 and earlier releases work.''
+
Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M190 command.
  
'''Example 3'''
+
Note, this will FAIL (non-fatally) if you address a virtual group address;  be sure to use an actual physical address.
  
  M229 E0 D1
+
'''Parameters'''
  
This command is decoded and executed by the printer as follows:
+
  '''T#''' (optional) is the target bed (default is the primary (or only) bed)
 +
  '''Sn''' (optional) is the new set temperature in °C; if omitted, no new target temperature is set
 +
  '''Hn''' if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
 +
  '''Cn''' if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
 +
  '''Ln''' if present, is the lower-end relative temperature ''difference from set temp'' after which we stop pausing
 +
  '''Un''' if present, is the upper-end relative temperature ''difference from set temp'' after which we stop pausing
 +
  '''Rn''' if present, is how close the relative temperature needs to be to the set temp to end the pause
  
* '''M229''' (E values)
+
Think of '''Sn''' as the target temperature, but once the target is between '''Cn (or Ln)''' and '''Hn (or Un)''', the pause is over (but the '''Sn''' is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.
** '''E0''' (disabled)
 
** '''D1''' (flow calculations directed via CANBUS and adjusted to motion acceleration/deceleration)
 
  
'''Example 4'''
+
'''Example 1'''
  
   M229 E0 D0 S0.02
+
   M190 T# S240
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M229''' (E values)
+
* '''M190''' (wait for temp)  
** '''E0''' (disabled)
+
** '''T#''' (target bed)
** '''D0''' (flow calculations on head controller)
+
** '''S240''' (and set temp to 240°C)
** '''S0.02''' (isolated non-printing moves of under 0.02 seconds will not trigger unprime/prime actions)
+
 
 +
'''Example 2'''
  
<br>
+
  M190 T# S240 R5
<hr>
 
  
=== M721 Set Unprime Values ===
+
This command is decoded and executed by the printer as follows:
  
M721 sends information to the printer about how much material to unprime when a transition from printing move to non-printing move is detected.
+
* '''M190''' (wait for temp)
 +
** '''T#''' (target bed)
 +
** '''S240''' (and set temp to 240°C)
 +
** '''R5''' (but end the wait once the target's temperature is within 5°C of the set point)
  
'''Usage'''
+
'''Example 3'''
  
   M721 Sn En Pn T# In
+
   M190 T# S240 H230
  
'''Parameters'''
+
This command is decoded and executed by the printer as follows:
  
  '''Sn''' is the speed at which unprime moves should be executed; this is normally 10,000
+
* '''M190''' (wait for temp)
  '''En''' is the number of pulses on the feed (extrusion) motor to execute; this varies greatly among materials
+
** '''T#''' (target bed)
  '''Pn''' is the number of milliseconds relative to the end of the move to begin the unprime (retract) action; a negative number initiates this before the end of the move
+
** '''S240''' (and set temp to 240°C)
  '''T#''' is the target head
+
** '''H230''' (but end the wait once the target's temperature reaches 230°C)
  '''In''' is the flag for executing an Immediate action; so '''M721 I1''' would execute an unprime with the previously specified values at that point in the gcode.
 
  
'''Example 1'''
+
'''Example 4'''
  
M721 S10000 E100 P-15 T#
+
  M190 T# S240 L10 U5
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M721''' (unprime)
+
* '''M190''' (wait for temp)  
** '''S10000''' (set rate to 10,000 pps)
+
** '''T#''' (target bed)
** '''E100''' (set pulses to 100)
+
** '''S240''' (and set temp to 240°C)
** '''P-15''' (set dwell to 15ms before end of print move )
+
** '''L10''' (but end the wait once the target's temperature reaches 10°C below the set point)
** '''T#''' (on target head)
+
** '''U5''' (or end the wait once the target's temperature reaches 5°C above the set point)
** (but no immediate execution; execute when needed)
+
 
 +
''Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C''
  
'''Example 2'''
+
'''Example 5'''
  
M721 T# I1
+
  M190 T# S0 R5
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M721''' (unprime)
+
* '''M190''' (wait for temp)  
** '''T#''' (on target head)
+
** '''T#''' (target bed)
** '''I1''' (now)
+
** '''S0''' (to 0°C)
 +
** '''R5''' (but end the wait once the target's temperature is +/-5°C of the set temperature)
 +
 
 +
'''Example 6'''
 +
 
 +
  M190 R10
 +
 
 +
* '''M190''' (wait for temp)
 +
** (no T# - use bed with current focus)
 +
** '''R10''' (to get +/-10°C of set temperature)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M722 Set Prime Values ===
+
=== M191 Wait for Temp (Chamber) ===
 +
M191 waits for the chamber to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) chambers as options.
 +
 
 +
'''Usage'''
  
M722 sends information to the printer about how much material to prime (advance) when a transition from non-printing move to printing move is detected. This is done primarily to compensate for an earlier unprime (retract), to prep the head to be ready to dispense.
+
  M191 T# Sn Hn Cn Ln Un Rn
  
'''Usage'''
+
Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M191 command.
  
  M722 Sn En Pn T# In
+
Note, this will FAIL (non-fatally) if you address a virtual group address;  be sure to use an actual physical address.
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the speed at which unprime moves should be executed; this is normally 10,000
+
  '''T#''' is the target chamber (default is the primary (or only) chamber)
   '''En''' is the number of pulses on the feed (extrusion) motor to execute; this varies greatly among materials
+
   '''Sn''' (optional) is the new set temperature in °C; if omitted, no new target temperature is set
   '''Pn''' is the number of milliseconds to dwell relative to the start of the move to allow for the prime (advance) action
+
  '''Hn''' if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
  '''T#''' is the target head
+
   '''Cn''' if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
  '''In''' is the flag for executing an Immediate action; so '''M722 I1''' would execute a prime with the previously specified values at that point in the gcode.
+
  '''Ln''' if present, is the lower-end relative temperature ''difference from set temp'' after which we stop pausing
 +
  '''Un''' if present, is the upper-end relative temperature ''difference from set temp'' after which we stop pausing
 +
   '''Rn''' if present, is how close the relative temperature needs to be to the set temp to end the pause
 +
 
 +
Think of '''Sn''' as the target temperature, but once the target is between '''Cn (or Ln)''' and '''Hn (or Un)''', the pause is over (but the '''Sn''' is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.
  
'''Example'''
+
'''Example 1'''
  
M722 S10000 E100 P-15 T#
+
  M191 T# S240
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M721''' (prime)
+
* '''M191''' (wait for temp)  
** '''S10000''' (set rate to 10,000 pps)
+
** '''T#''' (target chamber)
** '''E100''' (set pulses to 100) 
+
** '''S240''' (and set temp to 240°C)
** '''P-15''' (set dwell to 15ms before end of print move )
 
** '''T#''' (on target head)
 
** (but no immediate execution; execute when needed)
 
  
'''Example'''
+
'''Example 2'''
  
M722 T# I1
+
  M191 T# S240 R5
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M722''' (prime)
+
* '''M191''' (wait for temp)  
** '''T#''' (on target head)
+
** '''T#''' (target chamber)
** '''I1''' (now)
+
** '''S240''' (and set temp to 240°C)
 +
** '''R5''' (but end the wait once the target's temperature is within 5°C of the set point)
  
<br>
+
'''Example 3'''
<hr>
 
  
=== M723 Set Manual Flow ===
+
  M191 T# S240 H230
  
M723 tells the designated extruder(s) to advance material for the specified number of pulses (on the motor) at the specified rate, regardless of any X/Y/Z movement. It is normally used only during manual operation, not during gcode execution. It can be used after moving to a location to dispense a set amount of material (like depositing material into reservoirs).
+
This command is decoded and executed by the printer as follows:
  
M723 is also used to activate and set speed on the stirring apparatus on the DMH dynamic mixing head.
+
* '''M191''' (wait for temp)
 +
** '''T#''' (target chamber)
 +
** '''S240''' (and set temp to 240°C)
 +
** '''H230''' (but end the wait once the target's temperature reaches 230°C)
  
 +
'''Example 4'''
  
'''Usage'''
+
  M191 T# S240 L10 U5
  
  M723 Sn En T#
+
This command is decoded and executed by the printer as follows:
  
'''Parameters'''
+
* '''M191''' (wait for temp)
 +
** '''T#''' (target chamber)
 +
** '''S240''' (and set temp to 240°C)
 +
** '''L10''' (but end the wait once the target's temperature reaches 10°C below the set point)
 +
** '''U5''' (or end the wait once the target's temperature reaches 5°C above the set point)
  
  '''Sn''' is the speed at which the motor should advance, in pulses per second (default: 500);
+
''Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C''
  '''En''' is the number of pulses on the feed (extrusion) motor to execute (default: 65535);
 
  '''T#''' is the target head
 
  
'''Example'''
+
'''Example 5'''
  
M723 S500 E65535 T#
+
  M191 T# S0 R5
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M723''' (start manual feed)
+
* '''M191''' (wait for temp)  
** '''S500''' (at 500 pulses per second)
+
** '''T#''' (target chamber)
** '''E65535''' (for 65535 pulses (default)
+
** '''S0''' (to 0°C)
** '''T#''' (target head)
+
** '''R5''' (but end the wait once the target's temperature is +/-5°C of the set temperature)
  
<br>
+
'''Example 6'''
<hr>
 
  
=== M728 Set Motor Current Boost ===
+
  M191 R10
  
M728 will set the motor current boost; default is 0.
+
* '''M191''' (wait for temp)
 
+
** (no T# - use chamber with current focus)
'''Usage'''
+
** '''R10''' (to get +/-10°C of set temperature)
 
 
  M728 Sn T#
 
 
 
'''Parameters'''
 
 
 
  '''Sn''' is the new set temperature in °C
 
  '''T#''' is the target head (or device)
 
 
 
'''Example'''
 
 
 
  M728 T# S0
 
 
 
This command is decoded and executed by the printer as follows:
 
  
* '''M728''' (set motor current boost)
 
** '''T#''' (target head)
 
** '''S0''' (off)
 
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M756 Set Height for Flow ===
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
M756 will overwrite the Z value from the M221 command, allowing you to calculate flow for thinner or thicker layers. We declare M756 at the beginning of every layer; normally, they are all the same (unless you sliced for varying layer thicknesses).
+
== '''Controlling Material Flow''' ==
  
Note: this command is ignored if you are using '''M229 E1 D1''' to enable use of E values.
+
{| border="1" class="wikitable" style="float:right"
 
+
! colspan="3" | Controlling Material Flow
'''Usage'''
+
|-
 
+
! Code
  M756 Sn
+
! Supported
 
+
! Brief Description
'''Parameters'''
+
|-
 +
! [[#G10_UNUSED|G10]]
 +
| ''No'' || ''Absolute E''
 +
|-
 +
! [[#G11_UNUSED|G11]]
 +
| ''No'' || ''Relative E''
 +
|-
 +
! [[#M82_Absolute_E-Values|M82]]
 +
| Yes || Absolute E-Values
 +
|-
 +
! [[#M83_Relative_E-Values|M83]]
 +
| Yes || Relative E-Values
 +
|-
 +
! [[#M221_Set_Flow_Rate|M221]]
 +
| Yes || Set Flow Rate
 +
|-
 +
! [[#M229_Use_E_Values|M229]]
 +
| Yes || Use E Values
 +
|-
 +
! [[#M703_Cloning_Heads|M703]]
 +
| Yes || Parallel Printing
 +
|-
 +
! [[#M721_Set_Unprime_Values|M721]]
 +
| Yes || Unprime or Retract
 +
|-
 +
! [[#M722_Set_Prime_Values|M722]]
 +
| Yes || Prime or Advance
 +
|-
 +
! [[#M723_Set_Manual_Flow|M723]]
 +
| Yes || Set Manual Flow
 +
|-
 +
! [[#M728_Set_Motor_Current_Boost|M728]]
 +
| Yes || Set Motor Current Boost
 +
|-
 +
! [[#M756_Set_Height_for_Flow|M756]]
 +
| Yes || Set Height for Flow
 +
|-
 +
|}
  
  '''Sn''' is the layer thickness in mm for flow calculations
+
You can specify flow rate variables in your gcode; we do not do this by default, but take these values from the head itself. Any values you stipulate in your gcode will supersede the values stored on the head. With our recipes the slicing program generates gcode which dictates temperature and movement commands and indicates which moves should dispense material (a G1 move with an E value).
  
'''Example'''
+
However, we have two different ways to control flow.
  
  M756 S0.125
+
* If you use '''M229 E1 D1''' we will use the E values generated by the slicer ''for printing moves, but we will always use the prime/unprime settings on the head for advancing and retracting when transitioning between printing and non-printing moves.'' This allows for varying extrusion widths and layer thicknesses (on the same layer - as with support material). This is how just about all slicers and printers work.
  
This command is decoded and executed by the printer as follows:
+
* If you do not use that command, we do not use that E value (except to distinguish printing from non-printing moves) we calculate for flow based purely on travel speed, declared layer thickness, and nozzle diameter. This is explained at http://hyrel3d.net/wiki/index.php/Flow_Rate
  
* '''M756''' (set layer height for flow calculations)
+
When a head is loaded, it sends this flow data (how to calculate flow, as well as how much to prime and unprime (advance and retract) material when transitioning between printing and non-printing moves - and even how many primes or unprimes to do in conjunction with a tool change.
** '''S0.125''' (at 0.125mm)
+
 
 +
In this way, the very same gcode (with temperature changes) can be used with any material, provided you are using the same physical parameters that the model was sliced for.
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
=== G10 UNUSED<sup>1</sup> ===
 +
 
 +
G10 is not recognized by Repetrel.
 +
 
 +
On some other printers, this will set tool offsets; we do this via '''M6'''.
  
== '''Controlling Position and Offsets''' ==
+
On some other printers, this will do a retract; we do this via '''M721'''.
  
The following commands define if new positioning data is defined in inches (G20) or mm (G21); or from the origin (G90) or from the present location (G91). They also stipulate the offsets from one head to another (M6), and how to invoke that offset (T).
+
<br>
 +
<hr>
  
=== G10 UNUSED<sup>2</sup> ===
+
=== G11 UNUSED ===
  
G10 is not recognized by Repetrel.  
+
G11 is not recognized by Repetrel.  
  
On some other printers, this will set tool offsets; we do this via '''M6'''.  
+
On some other printers, this will do an advance or unretract; we do this via '''M722'''.
  
On some other printers, this will do a retract; we do this via '''M721'''.
+
<br>
 +
<hr>
  
=== G20 Set Units to Inches ===
+
=== M82 Absolute E-Values ===
  
G20 declares that henceforth, measurements will be given in inches.
+
M82 stipulates that henceforth, the extrusion positioning (E values) will be calculated from the original (0) point.
  
'''''Working with G20 is experimental and unsupported on Hyrel equipment. Use at your own risk.'''''
+
Note, this only works on v4 and later, when E values are enabled via '''M229'''.
  
 
'''Usage'''
 
'''Usage'''
  
   G20
+
   M82
  
 
'''Parameters'''
 
'''Parameters'''
Line 1,490: Line 1,756:
 
'''Example'''
 
'''Example'''
  
  G20
+
  M82
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G20''' (set units to inches)
+
* '''M82''' (use absolute E values)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G21 Set Units to Millimeters ===
+
=== M83 Relative E-Values ===
  
G21 declares that henceforth, measurements will be given in mm.
+
M83 stipulates that henceforth, the extrusion positioning (E values) will be calculated from the relative (last used) point.
 +
 
 +
Note, this only works on v4 and later, when E values are enabled via '''M229'''.
  
 
'''Usage'''
 
'''Usage'''
  
   G21
+
   M83
  
 
'''Parameters'''
 
'''Parameters'''
Line 1,513: Line 1,781:
 
'''Example'''
 
'''Example'''
  
G21
+
  M83
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G21''' (set units to milimeters)
+
* '''M83''' (use relative E values)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G28 Send X, Y to Physical Home ===
+
=== M221 Set Flow Rate ===
  
G28 sends the X and/or Y axes to the sensor-defined physical home position, regardless of logically set 0,0, then pop-off and re-acquire the sensor threshold at a slower rate. This pop-off and re-acquire was implemented during v3.
+
M221 sends information to the printer about material flow.
  
After homing, a '''G28''' also resets current offsets to 0 - including any may have been set with a '''G92''' or an H (as defined in an '''M660''' and invoked on a '''G1'''), performs a '''G53''', and applies a head offset of 0 mm (as in an '''M6 O0''').
+
''You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.''
  
Any axis not homed will have its position remain unchanged. We do not support intermediate positioning during homing.
+
Note, our default mode is volumetric calculations; if you need to slice with linear calculations, multiply your Pn by approximately 2.4 (you can do the math).
  
 
'''Usage'''
 
'''Usage'''
  
   G28 Xn Yn Zn An Bn I1
+
   M221 Pn Sn Wn Zn T#
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''X0''' ensures that the X axis is homed
+
   '''Pn''' is the number of pulses on the motor to dispense 1 μl of material;
   '''Y0''' ensures that the Y axis is homed
+
   '''Sn''' is the direct flow multiplier (to allow for undersized or oversized stock;
   '''Z0''' ensures that the Z axis is homed
+
   '''Wn''' is the width of the cross section of the volume to fill;
   '''A0''' ensures that the A axis is homed
+
   '''Zn''' is the height (layer thickness) of the cross section of the volume to fill; and
   '''B0''' ensures that the B axis is homed
+
   '''T#''' is the tool (head) to which these values will be applied.
 +
  As always, any parameters not specified will be inherited from your environment.
  
 
'''Example'''
 
'''Example'''
  
   G28 X0 Y0
+
   M221 S1.0 T# P77 W0.5 Z0.3
 +
  G4 P1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G28''' (home axis)
+
* '''M221''' (set flow rate)
** '''X0''' (X axis to 0)
+
** '''S1.0''' (flow multiplier of 1.0)
** '''Y0''' (Y axis to 0)
+
** '''T#''' (target head)
** (Z remains unchanged)
+
** '''P77''' (77 pulses per microliter) 
** (A remains unchanged)
+
** '''W0.5''' (0.5mm nozzle)
** (B remains unchanged)
+
** '''Z0.3''' (0.3mm layer thickness - note that your gcode '''M756''' will overwrite this value)
 +
* '''G4''' (timed pause)
 +
** '''P1''' (one millisecond)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G53 Clear Offsets ===
+
=== M229 Use E Values ===
  
G53 sets the fixture offsets to (0,0,0,0,0). This takes no arguments or variables. It does not clear stored offset values.
+
'''Starting with version 4''', Hyrel will begin to enable the use of E-values in your gcode. Variable extrusion width and support/infill thickness slicers, rejoice! Note, calculations are done for every single move individually.
  
 
'''Usage'''
 
'''Usage'''
  
   G53
+
   M229 En Dn Sn
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''En''' can be 0 (native flow calculation) or 1 (use E values)
 +
  '''Dn''' how directed to head; see below
 +
    '''D0''' on head controller directly; constant flow, not adjusted for motion acceleration/deceleration
 +
    '''D1''' on motion controller, sent to head via CANBUS and adjusted for motion acceleration/deceleration
 +
    '''D2''' on motion controller, sent to head via C axis step pin and adjusted for motion acceleration/deceleration
 +
    '''D3''' on motion controller, sent to head via CANBUS and C axis and adjusted for motion acceleration/deceleration
 +
  '''Sn''' sets a threshold in seconds; isolated non-printing moves below this threshold will not trigger unprime/prime actions
 +
 
 +
Note: E1 D0 is an illegal combination.
  
'''Example'''
+
'''Example 1'''
  
G53
+
  M229 E1 D1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G53''' (set fixture offsets to 0; no effect on H (head) offsets)
+
* '''M229''' (E values) 
 +
** '''E1''' (enabled)
 +
** '''D1''' (flow calculations directed via CANBUS and adjusted to motion acceleration/deceleration)
  
<br>
+
''Above is the default way to enable E values.''
<hr>
 
  
=== G54 - G59 - Set Offsets ===
+
'''Example 2'''
  
G54, G55, G56, G57, G58, and G59 will each store and invoke fixture offsets in the X, Y, Z, A, and/or B axes for all subsequent moves. Any values not invoked will remain with their previous value (0 unless earlier specified otherwise). These offsets apply to all positioning until a new offset is applied, or a '''G53''' is used to clear all offsets.
+
  M229 E0 D0
  
Note that this differs from an '''M6''', where the offsets are only applied to a SINGLE tool position. These offsets are cumulative with '''M6''' values.
+
This command is decoded and executed by the printer as follows:
  
'''Usage'''
+
* '''M229''' (E values) 
 +
** '''E0''' (disabled) 
 +
** '''D0''' (flow calculations on head controller)
  
  G54 (... G59) Xn Yn Zn An Bn
+
''Above is the default way to ignore E values, and is how v3 and earlier releases work.''
  
'''Parameters'''
+
'''Example 3'''
  
   '''Xn''' is the offset in mm in the X axis
+
   M229 E0 D1
  '''Yn''' is the offset in mm in the Y axis
 
  '''Zn''' is the offset in mm in the Z axis
 
  '''An''' is the offset in mm in the A axis
 
  '''Bn''' is the offset in mm in the B axis
 
 
 
'''Example'''
 
 
 
G54 X30 Y-20
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G54''' (set units to milimeters)
+
* '''M229''' (E values)
** '''X30''' (add 30mm to all X positions)
+
** '''E0''' (disabled)
** '''Y-20''' (subtract 20mm from all Y positions)
+
** '''D1''' (flow calculations directed via CANBUS and adjusted to motion acceleration/deceleration)
** (no change to prior stored offsets)
 
  
'''Example'''
+
'''Example 4'''
  
G55
+
  M229 E0 D0 S0.02
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G55''' (apply new fixture offsets)
+
* '''M229''' (E values)
** (no variable: use previous G55 values, or as stored under Settings > Printer > Fixture Offsets)
+
** '''E0''' (disabled) 
 
+
** '''D0''' (flow calculations on head controller)
 +
** '''S0.02''' (isolated non-printing moves of under 0.02 seconds will not trigger unprime/prime actions)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G90 Absolute Positioning ===
+
=== M703 Cloning/Parallel Printing ===
  
G90 stipulates that henceforth, the positioning will be calculated from the origin (0,0 point).
+
<span style="color: red;">'''NOTE: M703 DOES NOT WORK WITH M229 E1 D1. YOU MUST USE M229 E0 D0, and use our native flow calculations instead of E values'''
  
'''Usage'''
+
Clone, slave, or parallel printing, is when one head makes a normal print, and another head makes the ''exact same print'' at the same time.
  
  G90
+
We will normally execute a T command first, to establish the primary or master head (generally the one to the left). Then the M703 command, cloning or slaving another head to the first.
  
'''Parameters'''
+
Remember, this is how we address the tool positions; note that the 30M and ESR have four positions, not five. Counting from the leftmost position:
  
   N/A
+
{| border="1" class="wikitable" style="width: 60%; text-align: center;"
 
+
|+ T Commands and T Variables for Standard Addresses
'''Example'''
+
|-
 +
! style="width: 15%;" | Command
 +
! style="width: 15%;" | <span style="color: red;">1st Slot</span>
 +
! style="width: 15%;" | 2nd Slot
 +
! style="width: 15%;" | <span style="color: royalblue;">3rd Slot</span>
 +
! style="width: 15%;" | 4th Slot
 +
! style="width: 15%;" | <span style="color: limegreen;">5th Slot</span>
 +
|-
 +
! Tool Change
 +
| <span style="color: red;">'''T0'''</span>
 +
| T1
 +
| T2
 +
| T3
 +
| T4
 +
|-
 +
! Clone Address
 +
| T11
 +
| T12
 +
| <span style="color: royalblue;">'''T13'''</span>
 +
| T14
 +
| <span style="color: limegreen;">'''T15'''</span>
 +
|-
 +
! Master Address
 +
| <span style="color: red;">'''S11'''</span>
 +
| S12
 +
| S13
 +
| S14
 +
| S15
 +
|-
 +
|}
 +
 
 +
In the following example we have a five-position yoke; commands executed by the head in <span style="color: red;">'''slot 1''' (far left)</span> will also be executed by the heads in both <span style="color: royalblue;">'''slot 3''' (third from left)</span> and <span style="color: limegreen;">'''slot 5''' (fifth from left)</span>:
 +
 
 +
  <span style="color: red;">T0</span>
 +
  M703 <span style="color: royalblue;">T13</span> <span style="color: red;">S11</span>
 +
   M703 <span style="color: limegreen;">T15</span> <span style="color: red;">S11</span>
 +
 
 +
These commands are decoded and executed by the printer as follows:
 +
 
 +
* <span style="color: red;">'''T0''' - Assign commands to Position 1 (the far left head on yoke 1)</span>
  
G90
+
* '''M703''' - Begin to Duplicate Commands:
 +
** <span style="color: royalblue;">'''T13''' - Tool Position 3 </span>
 +
** <span style="color: red;">'''S11''' - Slave to Position 1</span>
  
This command is decoded and executed by the printer as follows:
+
* '''M703''' - Begin to Duplicate Commands:
 +
** <span style="color: limegreen;">'''T15''' - Tool Position 5</span>
 +
** <span style="color: red;">'''S11''' - Slave to Position 1</span>
  
* '''G90''' (use absolute positioning)
+
Note that only Hydra (16A) and High Resolution Engine (EHR) units have five tool positions; other models have four only. See '''Understanding the T''' at the top of '''[[Gcode|the Gcode page]]''' for tool position nomenclature.
 +
** '''S0.02''' (isolated non-printing moves of under 0.02 seconds will not trigger unprime/prime actions)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G91 Relatative Positioning ===
+
=== M721 Set Unprime Values ===
 +
 
 +
M721 sends information to the printer about how much material to unprime (retract) when a transition from printing move to non-printing move is detected.
  
G91 stipulates that henceforth, the positioning will be calculated relative to the starting position.
+
''You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.''
  
 
'''Usage'''
 
'''Usage'''
  
   G91
+
   M721 Sn En Pn T# In
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''Sn''' is the speed at which unprime moves should be executed; this is normally 10,000
 +
  '''En''' is the number of pulses on the feed (extrusion) motor to execute; this varies greatly among materials
 +
  '''Pn''' is the number of milliseconds prior to the end of the current printing move to begin the unprime (retract) action; a negative number initiates this before the end of the move
 +
  '''T#''' is the target head
 +
  '''In''' is the flag for executing an Immediate action; so '''M721 I1''' would execute an unprime with the previously specified values at that point in the gcode.
  
'''Example'''
+
'''Example 1'''
  
  G91
+
  M721 S10000 E100 P-15 T#
 +
G4 P1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G91''' (use relative positioning)
+
* '''M721''' (unprime) 
 +
** '''S10000''' (set rate to 10,000 pps) 
 +
** '''E100''' (set pulses to 100) 
 +
** '''P-15''' (set dwell to 15ms before end of print move )
 +
** '''T#''' (on target head)
 +
** (but no immediate execution; execute when needed)
 +
* '''G4''' (timed pause)
 +
** '''P1''' (one millisecond)
  
<br>
+
'''Example 2'''
<hr>
 
  
=== G92 Reset Coordinate Offsets ===
+
M721 T# I1
 +
G4 P1
 +
 
 +
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M721''' (unprime) 
 +
** '''T#''' (on target head)
 +
** '''I1''' (now)
 +
* '''G4''' (timed pause)
 +
** '''P1''' (one millisecond)
  
G92 resets the current position to the specified coordinates for all axes enumerated.
+
<br>
 +
<hr>
  
'''Usage'''
+
=== M722 Set Prime Values ===
  
  G92 Xn Yn Zn An Bn En
+
M722 sends information to the printer about how much material to prime (advance) when a transition from non-printing move to printing move is detected. This is done primarily to compensate for an earlier unprime (retract), to prep the head to be ready to dispense.
  
'''Parameters'''
+
''You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.''
  
  '''Xn''' is the new value for the current X position
+
'''Usage'''
  '''Yn''' is the new value for the current Y position
 
  '''Zn''' is the new value for the current Z position
 
  '''An''' is the new value for the current A position
 
  '''Bn''' is the new value for the current B position
 
  '''En''' is the new value for the current E position
 
 
 
'''Example'''
 
  
G92 X0 Y50
+
  M722 Sn En Pn T# In
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''G92''' (replace current values)
+
  '''Sn''' is the speed at which unprime moves should be executed; this is normally 10,000
** '''X0''' (present X position is 0)
+
  '''En''' is the number of pulses on the feed (extrusion) motor to execute; this varies greatly among materials
** '''Y50''' (present Y position is 50)
+
  '''Pn''' is the number of milliseconds to dwell at the start of the next printing move to allow for the prime (advance) action
 +
  '''T#''' is the target head
 +
  '''In''' is the flag for executing an Immediate action; so '''M722 I1''' would execute a prime with the previously specified values at that point in the gcode.
  
 
'''Example'''
 
'''Example'''
  
  G92 E0
+
  M722 S10000 E100 P-15 T#
 +
G4 P1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G92''' (replace current values)
+
* '''M721''' (prime)
** '''E0''' (present E position is 0)
+
** '''S10000''' (set rate to 10,000 pps) 
 +
** '''E100''' (set pulses to 100) 
 +
** '''P-15''' (set dwell to 15ms before end of print move )
 +
** '''T#''' (on target head)
 +
** (but no immediate execution; execute when needed)
 +
* '''G4''' (timed pause)
 +
** '''P1''' (one millisecond)
 +
 
 +
'''Example'''
 +
 
 +
M722 T# I1
 +
G4 P1
 +
 
 +
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M722''' (prime) 
 +
** '''T#''' (on target head)
 +
** '''I1''' (now)
 +
* '''G4''' (timed pause)
 +
** '''P1''' (one millisecond)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G93 Clear Coordinate Offsets ===
+
=== M723 Set Manual Flow ===
 +
 
 +
M723 tells the designated extruder(s) to advance material for the specified number of pulses (on the motor) at the specified rate, regardless of any X/Y/Z movement. It is normally used only during manual operation, not during gcode execution. It can be used after moving to a location to dispense a set amount of material (like depositing material into reservoirs). We recommend adding a timed pause (G4) after the extrusion command if you want to extrude without moving.
 +
 
 +
M723 is also used to activate and set speed on the stirring apparatus on the DMH dynamic mixing head.
  
G93 clears ALL offsets implemented via '''G92''' command.
 
  
 
'''Usage'''
 
'''Usage'''
  
   G93
+
   M723 Sn En T#
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''Sn''' is the speed at which the motor should advance, in pulses per second (default: 500);
 +
  '''En''' is the number of pulses on the feed (extrusion) motor to execute (default of 65535 is essentially "forever");
 +
  '''T#''' is the target head
  
 
'''Example'''
 
'''Example'''
  
  G93
+
  M723 S500 E50000 T#
 +
G4 S5
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G93''' (clear coordinate offset values, all axes)
+
* '''M723''' (start manual feed) 
 +
** '''S500''' (at 500 pulses per second) 
 +
** '''E50000''' (for 50000 pulses) 
 +
** '''T#''' (target head)
 +
* '''G4''' (Timed pause)
 +
** '''S3''' (3 seconds)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M6 Declare Head Offsets ===
+
=== M728 Set Motor Current Boost ===
  
M6 declares that a particular head holds a set of X, Y, and/or Z offsets, which will be invoked during a T (tool change) command. Repetrel reads this data from the heads, and sends it to the printer before the gcode file is loaded.
+
M728 will set the motor current boost; default is 0.
  
 
'''Usage'''
 
'''Usage'''
  
   M6 T# On Xn Yn Zn An Bn Dn In Kn
+
   M728 Sn T#
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''T#''' is the Tool position for which these offsets are being set
+
   '''Sn''' is the new set temperature in °C
  '''On''' is the Offset position where these are being stored
+
   '''T#''' is the target head (or device)
  '''Xn''' is the offset in the X axis
 
   '''Yn''' is the offset in the Y axis
 
  '''Zn''' is the offset in the Z axis
 
  '''An''' is the offset in the A axis
 
  '''Bn''' is the offset in the B axis
 
  '''Dn''' is the current tool diameter (used with pocket commands)
 
  '''In''' non-persistent; can be default 0 (store values but do not move these distances) or 1 (store values and move these distances)
 
  '''Kn''' persistent setting; can be default 0 (use I value) or 1 (ignore I1 and always act with I0)
 
  
 
'''Example'''
 
'''Example'''
  
   M6 T# O1 X20 Y-30 Z40
+
   M728 T# S0
 
 
This happens (for every head loaded) when you click print, and the head values are sent to the Motion Controller.
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M6''' (Declare Head Offsets)  
+
* '''M728''' (set motor current boost)
** '''T#''' (target head)
+
** '''T#''' (target head)
** '''O1''' (offset stored in register "O1")
+
** '''S0''' (off)
** '''X20''' (X+20)
+
<br>
** '''Y-30''' (Y-30)
+
<hr>
** '''Z40''' (Z+40)
 
** (no change to A)
 
** (no change to B)
 
** (no diameter change)
 
** (no move)
 
  
'''Example'''
+
=== M756 Set Height for Flow ===
  
  M6 T# O1 X20 Y-30 Z40 I1
+
M756 will overwrite the Z value from the M221 command, allowing you to calculate flow for thinner or thicker layers. We declare M756 at the beginning of every layer; normally, they are all the same (unless you sliced for varying layer thicknesses).
  
This happens when you execute a tool change with '''T#''', and so it triggers the move ('''I1''') to properly position the next head.
+
Note: this command is ignored if you are using '''M229 E1 D1''' to enable use of E values.
  
This command is decoded and executed by the printer as follows:
+
Note: this does NOT change your Z position; see G0 or G1 for that.
  
* '''M6''' (Declare Head Offsets)
+
'''Usage'''
** '''T#''' (target head) 
+
 
** '''O1''' (offset stored in register "O1") 
+
  M756 Sn
** '''X20''' (X+20)
+
 
** '''Y-30''' (Y-30)
+
'''Parameters'''
** '''Z40''' (Z+40)
+
 
** (no change to A)
+
  '''Sn''' is the layer thickness in mm for flow calculations
** (no change to B)
 
** (no diameter change)
 
** (store and move distances)
 
  
 
'''Example'''
 
'''Example'''
  
   M6 K1
+
   M756 S0.125
 
 
You might include this in your header to change behavior during tool changes.
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M6''' (Declare Head Offsets)
+
* '''M756''' (set layer height for flow calculations)   
** (all future T# or M6 commands)   
+
** '''S0.125''' (at 0.125mm)
** (no offset registers, so ignore all offsets)
 
** '''K1''' (always force I0 with M6 unless K0 present (or has been previously set)
 
 
 
Note that this differs from a G54-G59, where the offsets are applied to EVERY tool position.
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M660 Assign Tool Height Offset ===
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
Used with the High Resolution Engine (and other units which home away from O, like a CNC), an M660 declares that a particular head, when called upon, should print at the gcode-based Z position MODIFIED by this offset, since on these units, the Z-Zero is often BELOW the print surface. By default, this is ONLY used on the EHR (Engine, High Resolution)
+
== '''Controlling Position and Offsets''' ==
  
NOTE: You MUST have a '''G28 Z0''' in your header to run this M660 on the EHR.
+
{| border="1" class="wikitable" style="float:right"
 
+
! colspan="3" | Controlling Position and Offsets
'''Usage'''
+
|-
 
+
! Code
  M660 Hn Zn
+
! Supported
  (followed by)
+
! Brief Description
  G1 Xn Yn Zn Fn Hn (see '''[[#G1_Working_Move]]''' for other details
+
|-
 +
! [[#G10_UNUSED|G10]]
 +
| ''No'' || ''Set Offsets''
 +
|-
 +
! [[#G20_Set_Units_to_Inches|G20]]
 +
| Yes || Set Units to Inches
 +
|-
 +
! [[#G21_Set_Units_to_Milimeters|G21]]
 +
| Yes || Set Units to Milimeters
 +
|-
 +
! [[#G28_Send_to_Physical_Home|G28]]
 +
| Yes || Send to Physical Home
 +
|-
 +
! [[#G53_Clear_Offsets|G53]]
 +
| Yes || Clear Offsets
 +
|-
 +
! [[#G54_-_G59_-_Set_Offsets|G54-59]]
 +
| Yes || Set Offsets
 +
|-
 +
! [[#G90_Absolute_Positioning|G90]]
 +
| Yes || Absolute Positioning
 +
|-
 +
! [[#G91_Relatative_Positioning|G91]]
 +
| Yes || Relatative Positioning
 +
|-
 +
! [[#G92_Reset_Coordinate_Offsets|G92]]
 +
| Yes || Reset Coordinates
 +
|-
 +
! [[#G93_Clear_Coordinate_Offsets|G93]]
 +
| Yes || Reset Coordinates
 +
|-
 +
! [[#M6_Declare_Head_Offsets|M6]]
 +
| Yes || Declare Head Offsets
 +
|-
 +
! [[#M660_Assign_Tool_Height_Offset|M660]]
 +
| Yes || Set Tool Offsets
 +
|-
 +
! [[#M702_-_M704_Cloning_Heads|M702-4]]  
 +
| Yes || Cloning Heads
 +
|-
 +
|}
  
'''Parameters'''
+
<span style="color: red;">'''DRAGGING A GCODE RENDERING AROUND ON THE PRINT BED DOES NOTHING IN EARLIER VERSIONS!''' <br>Either positiong the stl properly before slicing, or reposition the gcode with a G54 offset - read below.</span>.
  
  '''H''' is the head offset registern for which these offsets are being set;
+
The following commands define if new positioning data is defined in inches (G20) or mm (G21); or from the origin (G90) or from the present location (G91). They also stipulate the offsets from one head to another (M6), and how to invoke that offset (T).
  '''Z''' is the offset in the Z axis in mm.
+
 
 +
=== G10 UNUSED<sup>2</sup> ===
  
'''Example 1'''
+
G10 is not recognized by Repetrel.
  
  M660 H2 Z28.2      ; (specified before any moves)
+
On some other printers, this will set tool offsets; we do this via '''M6'''.  
  (followed by)
 
  G1 X50 Y75 F4800 H2  ; (specified on the first G1 move)
 
  
This command is decoded and executed by the printer as follows:
+
On some other printers, this will do a retract; we do this via '''M721'''.
  
* '''M660''' (apply offset)
+
=== G20 Set Units to Inches ===
** '''H2''' (store in register 2)
 
** '''Z28.2''' (+28.2 to Z position)
 
* (there may be more commands before the G1 move invoking the H2)
 
* '''G1''' (working speed straight line move from the current location to)
 
** '''X50''' (50mm in the X)
 
** '''Y75''' (75mm in the Y)
 
** (no change in Z)
 
** '''E1''' (while extruding)
 
** '''F1800''' (moving at 1800mm/min)
 
** '''H2''' (invoke offsets stored in register H2)
 
  
To be clear, this requires editing two lines of code:
+
G20 declares that henceforth, measurements will be given in inches.
  
In your gcode, you will enter the M660 just before the first layer code. Example: <code>M660 H2 Z28.2 ; set tool height for tool two (Z offset)</code>. On the first move of layer one (usually the Z move), you will add an <code>H</code> value so that this tool height is invoked.  
+
'''''Working with G20 is experimental and unsupported on Hyrel equipment. Use at your own risk.'''''
  
'''Example 2'''
+
'''Usage'''
  
Before editing:
+
  G20
  
  G1 Z0.275 F360      ; move to next layer (0)
+
'''Parameters'''
  (followed by)
 
  G1 X50 Y75 F4800
 
  
After editing:
+
  N/A
  
  G1 Z0.275 F360 '''H2'''  ; move to next layer (0) and invoke head Z offset for this tool</code>
+
'''Example'''
  (followed by)
 
  G1 X50 Y75 F4800 '''H2'''
 
  
<br>
+
G20
<hr>
 
  
=== M702 - M704 Cloning Heads ===
+
This command is decoded and executed by the printer as follows:
  
Clone, slave, or parallel printing, is when multiple heads make the ''exact same print'' at the same time.
+
* '''G20''' (set units to inches)
 
 
Usage of these commands with version 4 and earlier is explained on '''[[T_v4]]'''.
 
 
 
Usage of these commands with version 5 and later is explained on '''[[T_v5]]'''.
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== T Tool Change===
+
=== G21 Set Units to Millimeters ===
  
T executes a tool change, invoking the parameters specified in the M6 sent from Repetrel to the printer at the job start. Do not confuse a T command with a T variable.
+
G21 declares that henceforth, measurements will be given in mm.
 
 
'''See the first entry on this page for details. '''
 
 
 
'''[[#What_is_GCode.3F|Back to top]]'''
 
 
 
== '''Lasers and UV Pens''' ==
 
 
 
The CO<sub>2</sub> and Diode Lasers and the UV Pens require the following enabling codes:
 
 
 
=== M620 Enable Device ===
 
 
 
M620 enables the device.
 
  
 
'''Usage'''
 
'''Usage'''
  
   M620 T# En An
+
   G21
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''T#''' is the tool position
+
   N/A
  '''En''' can be the default 0 (disable) or 1 (enable)
 
  '''An''' is the duration in seconds after shut-off that the cooling remains active; default is 30 (but this will not override temperature safety measures)
 
  
 
'''Example'''
 
'''Example'''
  
  M620 T# E1
+
G21
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M620''' (enable device)
+
* '''G21''' (set units to milimeters)
** '''T#''' (target head - MUST be specified, can NOT be inherited)
 
** '''E1''' (enable)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M621 Set Laser Power ===
+
=== G28 Send to Physical Home ===
  
M621 sets the power for the LASER (not other heads).
+
G28 sends the specified axes to the sensor-defined physical home position, regardless of logically set 0,0, then pop-off and re-acquire the sensor threshold at a slower rate. This pop-off and re-acquire was implemented during v3.
 +
 
 +
After homing, a '''G28''' also resets current offsets to 0 - including any may have been set with a '''G92''' or an H (as defined in an '''M660''' and invoked on a '''G1'''), performs a '''G53''', and applies a head offset of 0 mm (as in an '''M6 O0''').
 +
 
 +
Any axis not homed will have its position remain unchanged. We do not support intermediate positioning during homing.
  
 
'''Usage'''
 
'''Usage'''
  
   M621 Dn Pn
+
   G28 Xn Yn Zn An Bn I1
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Pn''' is the power, in a value between 0 (min) and 100 (max).
+
   '''X0''' ensures that the X axis is homed
   '''Dn''' is the initial power (similar to a prime) to penetrate material (optional; uses Pn if unspecified)
+
  '''Y0''' ensures that the Y axis is homed
 
+
   '''Z0''' ensures that the Z axis is homed
Note: No tool is specified; this will happen on the laser already enabled with M620.
+
  '''A0''' ensures that the A axis is homed
 +
  '''B0''' ensures that the B axis is homed
  
 
'''Example'''
 
'''Example'''
  
   M621 P40
+
   G28 X0 Y0
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M621''' (activate device)  
+
* '''G28''' (home axis)
** '''P40''' (at 40% during "printing" (E-value) moves)
+
** '''X0''' (X axis to 0)
 +
** '''Y0''' (Y axis to 0)
 +
** (Z remains unchanged)
 +
** (A remains unchanged)
 +
** (B remains unchanged)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M623 Duration Emit ===
+
=== G53 Clear Offsets ===
  
M623 sets the power for the laser or UV pen, and takes the following parameters:
+
G53 sets the fixture offsets to (0,0,0,0,0). This takes no arguments or variables. It does not clear stored offset values.
  
 
'''Usage'''
 
'''Usage'''
  
   M623 Dn Pn
+
   G53
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Dn''' is the duration, in miliseconds (only used for static exposures, not during moves)
+
   N/A
  '''Pn''' is the power, in a value between 0 (min) and 100 (max).
 
  
Note: Dn max for UV pens is 60,000 (1 minute); Dn max for other devices 1,000 (1 second);
+
'''Example'''
  
Here are examples:
+
G53
  
  M623 P80 D500
+
This command is decoded and executed by the printer as follows:
  
This command is decoded and executed by the printer as follows:
+
* '''G53''' (set fixture offsets to 0; no effect on H (head) offsets)
  
* '''M623''' (activate tool)
+
<br>
** '''P80''' (power 80%)
+
<hr>
** '''D500''' (duration 500 miliseconds)
 
  
  M623 P80 D10000
+
=== G54 - G59 - Set Offsets ===
  
This command is decoded and executed by the printer as follows:
+
G54, G55, G56, G57, G58, and G59 will each store and invoke fixture offsets in the X, Y, Z, A, and/or B axes for all subsequent moves. Any values not invoked will remain with their previous value (0 unless earlier specified otherwise). These offsets apply to all positioning until a new offset is applied, or a '''G53''' is used to clear all offsets.
  
* '''M623''' (activate tool) 
+
This graphic shows how printers (OTHER THAN THE EHR) use the G54-G59 offsets:
** '''P80''' (power 80%)
 
** '''D10000''' (duration 10 seconds)
 
  
=== Laser Examples ===
+
[[File:G54.png|600px]]
  
A sample of code for lasering will look like this:
+
Note that this differs from an '''M6''', where the offsets are only applied to a SINGLE tool position. These offsets are cumulative with '''M6''' values.
  
  G0 X100 Y100 F1000  ; move to start location at 1000 mm/min
+
'''Usage'''
  M620 T# E1          ; enable target device
 
  M621 P100          ; set light emission in vector mode (slot 3) to full power (100%)
 
  T#                  ; toolchange to target head
 
  G1 X120 Y100 E1    ; emitting (printing) move 20mm from origin in X axis
 
  G1 X120 Y120 E1    ; emitting (printing) move 20mm from origin in Y axis
 
  G1 X120 Y130        ; non-emitting move 10mm from origin in Y axis
 
  G1 X140 Y130 E1    ; emitting move 20mm from origin in X axis
 
 
 
  ... (the rest of your lasering job)
 
 
 
  M620 T# E0          ; disable target device <= should be before M30 command
 
  
=== UV Pen Examples ===
+
  G54 (... G59) Xn Yn Zn An Bn
  
A sample of code for UV Curing will look like this:
+
'''Parameters'''
  
   G0 X100 Y100 F1000  ; move to start location at 1000 mm/min
+
   '''Xn''' is the offset in mm in the X axis
  M620 T# E1        ; enable target device
+
   '''Yn''' is the offset in mm in the Y axis
  M621 P100          ; set light emission in vector mode (slot 3) to full power (100%)
+
   '''Zn''' is the offset in mm in the Z axis
  T#                  ; toolchange to target head
+
   '''An''' is the offset in mm in the A axis
  G1 X120 Y100 E1    ; emitting (printing) move 20mm from origin in X axis
+
   '''Bn''' is the offset in mm in the B axis
   G1 X120 Y120 E1    ; emitting (printing) move 20mm from origin in Y axis
 
   G1 X120 Y130        ; non-emitting move 10mm from origin in Y axis
 
   G1 X140 Y130 E1    ; emitting move 20mm from origin in X axis
 
    
 
  ... (the rest of your curing job)
 
 
 
  M620 T# E0        ; disable target device <= should be before M30 command
 
  
For more complex examples, see the '''[[UV_and_Clench]]''' page.
+
'''Example'''
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
G54 X30 Y-20
  
== '''Spindles and Lathes''' ==
+
This command is decoded and executed by the printer as follows:
  
Machining and Spindle Tool commands. Note, we recommend using [http://mr-soft.net/ SimplyCAM].
+
* '''G54''' (set units to milimeters)
 +
** '''X30''' (add 30mm to all X positions)
 +
** '''Y-20''' (subtract 20mm from all Y positions)
 +
** (no change to prior stored offsets)
  
You can review the 5-axis gcode we used for [https://www.youtube.com/watch?v=B0lvN-aPYHI this video] from [http://hyrel3d.net/downloads/gcode/Ardes_tube_cap_milling.gcode here].
+
'''Example'''
  
=== M3 Turn On Spindle (CW) ===
+
G55
  
M3 tells the printer to activate (start) the spindle motor in the clockwise direction on the current head (if it has one), using the value set on the head for RPM. Note: S0 is the same as turning it off. Note: DO NOT CHANGE DIRECTION while the spindle is in motion.
+
This command is decoded and executed by the printer as follows:
  
'''Usage'''
+
* '''G55''' (apply new fixture offsets)
 +
** (no variable: use previous G55 values, or as stored under Settings > Printer > Fixture Offsets)
  
  M3 T# Sn Fn
 
  
'''Parameters'''
+
<br>
 +
<hr>
  
  '''T#''' - target head
+
=== G90 Absolute Positioning ===
  '''Sn''' - power (0-100%)
 
  '''Fn''' - optional; PWM in Hz (defaults on heads should be fine for most uses)
 
  
'''Example'''
+
G90 stipulates that henceforth, the positioning will be calculated from the origin (0,0 point).
 +
 
 +
'''Usage'''
 +
 
 +
  G90
  
  M3 T# S75
+
'''Parameters'''
  
This command is decoded and executed by the printer as follows:
+
  N/A
  
* '''M3''' (activate spindle clockwise)
+
'''Example'''
** '''T#''' (target head)
 
** '''S75''' (at 75% power)
 
** (default PWM)
 
  
<br>
+
G90
<hr>
 
  
=== M4 Turn On Spindle (CCW) ===
+
This command is decoded and executed by the printer as follows:
  
Please refer to M3, above, for details. All options are identical, with the exception of direction (counterclockwise).
+
* '''G90''' (use absolute positioning)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M5 Turn Off Spindle ===
+
=== G91 Relatative Positioning ===
  
M5 tells the printer to deactivate (stop) the spindle motor on the current head (if it has one). M5 has the same effect as M3 S0 or M4 S0.
+
G91 stipulates that henceforth, the positioning will be calculated relative to the starting position.
  
 
'''Usage'''
 
'''Usage'''
  
   M5 T#
+
   G91
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''T#''' - target head
+
   N/A
  
 
'''Example'''
 
'''Example'''
  
  M5 T#
+
G91
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M3''' (deactivate spindle )
+
* '''G91''' (use relative positioning)
** '''T#''' (target head)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M253 Turn On Lathe (CW) ===
+
=== G92 Reset Coordinate Offsets ===
  
M253 tells the printer to activate (start) the lathe motor in the clockwise direction (if it has one), using the value set with M92 for RPM. Only available on Hydra 16A models.
+
G92 resets the current position to the specified coordinates for all axes enumerated.  
 
 
Note: S0 is the same as turning it off.  
 
  
 
'''Usage'''
 
'''Usage'''
  
   M253 Sn
+
   G92 Xn Yn Zn An Bn En
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' - speed in units per minute (default: RPM if set with M92 as steps per revolution)
+
   '''Xn''' is the new value for the current X position
 
+
  '''Yn''' is the new value for the current Y position
 +
  '''Zn''' is the new value for the current Z position
 +
  '''An''' is the new value for the current A position
 +
  '''Bn''' is the new value for the current B position
 +
  '''En''' is the new value for the current E position
 +
 
 
'''Example'''
 
'''Example'''
  
  M253 S75
+
G92 X0 Y50
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M253''' (activate spindle clockwise)
+
* '''G92''' (replace current values)
** '''S75''' (at 75 RPM)  
+
** '''X0''' (present X position is 0)
 +
** '''Y50''' (present Y position is 50)
 +
 
 +
'''Example'''
  
<br>
+
G92 E0
<hr>
 
  
=== M254 Turn On Lathe (CCW) ===
+
This command is decoded and executed by the printer as follows:
  
Please refer to M253, above, for details. All options are identical, with the exception of direction (counterclockwise).
+
* '''G92''' (replace current values)
 +
** '''E0''' (present E position is 0)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M255 Turn Off Lathe ===
+
=== G93 Clear Coordinate Offsets ===
  
M255 tells the printer to deactivate (stop) the lathe motor (if it has one). M255 has the same effect as G253 S0 or G254 S0.
+
G93 clears ALL offsets implemented via '''G92''' command.
  
 
'''Usage'''
 
'''Usage'''
  
   M255
+
   G93
  
 
'''Parameters'''
 
'''Parameters'''
Line 2,126: Line 2,468:
 
'''Example'''
 
'''Example'''
  
  M255
+
G93
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M255''' (deactivate lathe)
+
* '''G93''' (clear coordinate offset values, all axes)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== G81 Peck Drilling ===
+
=== M6 Declare Head Offsets ===
  
G81 tells the printer to move to a start position in X/Y and then in Z, and to make (if needed) repeated descents and retracts. This is used to make holes, especially deep holes. Note that the spindle tool is turned on with an M3 or M4 before this command, and turned off with an M5 after all work is done.
+
M6 declares that a particular head holds a set of X, Y, and/or Z offsets, which will be invoked during a T (tool change) command. Repetrel automatically reads this data from the information stored on the heads, and sends it to the printer before the gcode file is loaded.
  
 
'''Usage'''
 
'''Usage'''
  
   G81 T# Xn Yn In Pn Qn Zn Fn
+
   M6 T# On Xn Yn Zn An Bn Dn In Kn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''T#''' - target head
+
   '''T#''' is the Tool position for which these offsets are being set
   '''Xn''' - X position
+
  '''On''' is the Offset position where these are being stored
   '''Yn''' - Y position
+
   '''Xn''' is the offset in the X axis
   '''In''' - initial Z position
+
   '''Yn''' is the offset in the Y axis
   '''Pn''' - peck downward this many mm during each cycle
+
   '''Zn''' is the offset in the Z axis
   '''Qn''' - retract upward this many mm after each cycle (to clear debris)
+
  '''An''' is the offset in the A axis
   '''Zn''' - maximum pecking depth
+
   '''Bn''' is the offset in the B axis
   '''Fn''' - Z working speed in mm/min
+
   '''Dn''' is the current tool diameter (used with pocket commands)
 +
   '''In''' non-persistent; can be default 0 (store values but do not move these distances) or 1 (store values and move these distances)
 +
   '''Kn''' persistent setting; can be default 0 (use I value) or 1 (ignore I1 and always act with I0)
  
 
'''Example'''
 
'''Example'''
  
   G81 T# X100 Y75 I3 P3 Q-2 Z-7.5 F200
+
   M6 T# O1 X20 Y-30 Z40
  
''NOTE that an M660 offset must be set and applied BEFORE THIS COMMAND to allow for tool length.''
+
This happens (for every head loaded) when you click print, and the head values are sent to the Motion Controller.
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''G81''' (begin pecking cycle)  
+
* '''M6''' (Declare Head Offsets)  
** '''X100 Y75''' (move to X/Y starting position X100 Y75)  
+
** '''T#''' (target head)
** '''I3''' (move to Z starting position Z3, which will be our greatest retract height)  
+
** '''O1''' (offset stored in register "O1")
** '''P3''' (peck downward an additional 3mm at a time)
+
** '''X20''' (X+20)
** '''Q-2''' (retract upward 2mm after each peck (to clear debris))
+
** '''Y-30''' (Y-30)
** '''Z-7.5''' (peck to a maximum depth of 7.5mm)
+
** '''Z40''' (Z+40)
** '''F200''' (working (drilling) travel speed of 200 mm/min)
+
** (no change to A)
** ''after this, the head will retract up to the I position (Z3 in this case) before moving on to the next line''
+
** (no change to B)
 +
** (no diameter change)
 +
** (no move)
  
<br>
+
'''Example'''
<hr>
 
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
  M6 T# O1 X20 Y-30 Z40 I1
  
== '''Reporting and Diagnostics''' ==
+
This happens when you execute a tool change with '''T#''', and so it triggers the move ('''I1''') to properly position the next head.
  
The following commands help with reporting and diagnostics. Most users never need them, but here are the basics. More advanced/detailed reporting is available.
+
This command is decoded and executed by the printer as follows:
  
=== M701 Set Head Reporting ===
+
* '''M6''' (Declare Head Offsets)
 +
** '''T#''' (target head) 
 +
** '''O1''' (offset stored in register "O1") 
 +
** '''X20''' (X+20)
 +
** '''Y-30''' (Y-30)
 +
** '''Z40''' (Z+40)
 +
** (no change to A)
 +
** (no change to B)
 +
** (no diameter change)
 +
** '''I1''' (store and move distances)
  
M701 tells heads how often to send head-specific information to the Motion Controller and on to Repetrel (and pass along to a text file if enabled via M719).
+
'''Example'''
  
'''Usage'''
+
  M6 K1
  
  M701 T# Pn
+
You might include this in your header to change behavior during tool changes.
  
'''Parameters'''
+
This command is decoded and executed by the printer as follows:
  
  '''T#''' - target head
+
* '''M6''' (Declare Head Offsets)
  '''Pn''' - period in seconds between entries (default 1)
+
** (all future T# or M6 commands) 
 +
** (no offset registers, so ignore all offsets)
 +
** '''K1''' (always force I0 with M6 unless K0 present (or has been previously set)
  
'''Example'''
+
Note that this differs from a G54-G59, where the offsets are applied to EVERY tool position.
 
 
  M701 P12
 
 
 
This command is decoded and executed by the printer as follows:
 
 
 
* '''M701''' (head reporting)
 
** (currently active head)
 
** '''P12''' (every 12 seconds)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M718 Stop Logging to File ===
+
=== M660 Assign Tool Height Offset ===
 +
 
 +
Used with the High Resolution Engine (and other units which home away from O, like a CNC), an M660 declares that a particular head, when called upon, should print at the gcode-based Z position MODIFIED by this offset, since on these units, the Z-Zero is often BELOW the print surface. By default, this is ONLY used on the EHR (Engine, High Resolution)
  
M718 tells Repetrel to stop any logging of data to text file that may have been enabled with M719.
+
NOTE: You MUST have a '''G28 Z0''' in your header to run this M660 on the EHR.
  
 
'''Usage'''
 
'''Usage'''
  
   M718
+
   M660 Hn Zn
 +
  (followed by)
 +
  G1 Xn Yn Zn Fn Hn (see '''[[#G1_Working_Move]]''' for other details
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''H''' is the head offset register for which these offsets are being set;
 +
  '''Z''' is the offset in the Z axis in mm.
  
'''Example'''
+
'''Example 1'''
  
   M718
+
   M660 H2 Z28.2      ; (specified before any moves)
 +
  (followed by)
 +
  G1 X50 Y75 F4800 H2  ; (specified on the first G1 move)
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M718''' (logging off)  
+
* '''M660''' (apply offset)  
 
+
** '''H2''' (store in register 2)
<br>
+
** '''Z28.2''' (+28.2 to Z position)
<hr>
+
* (there may be more commands before the G1 move invoking the H2)
 
+
* '''G1''' (working speed straight line move from the current location to)
=== M719 Start Logging to File ===
+
** '''X50''' (50mm in the X)
 +
** '''Y75''' (75mm in the Y)
 +
** (no change in Z)
 +
** '''E1''' (while extruding)
 +
** '''F1800''' (moving at 1800mm/min)
 +
** '''H2''' (invoke offsets stored in register H2)
  
M719 tells the Motion Controller what system-wide information to report back to Repetrel, and also tells Repetrel to begin logging these details to a text file.
+
To be clear, this requires editing two lines of code:
  
'''Usage'''
+
In your gcode, you will enter the M660 just before the first layer code. Example: <code>M660 H2 Z28.2 ; set tool height for tool two (Z offset)</code>. On the first move of layer one (usually the Z move), you will add an <code>H</code> value so that this tool height is invoked.
  
  M719 Pn Sn
+
'''Example 2'''
 
 
  M719 Pn Xn Yn Zn An Bn Vn En Ln
 
  
'''Parameters'''
+
Before editing:
  
   '''Pn''' - period in seconds between entries
+
   G1 Z0.275 F360      ; move to next layer (0)
   '''Sn''' - can be default 0 (see options below) or 1 (report ALL data)  
+
   (followed by)
   '''Xn''' - report X position with each entry
+
   G1 X50 Y75 F4800
  '''Yn''' - report Y position with each entry
 
  '''Zn''' - report Z position with each entry
 
  '''An''' - report A position with each entry
 
  '''Bn''' - report B position with each entry
 
  '''Vn''' - report velocity with each entry
 
  '''En''' - report flow rate with each entry
 
  '''Ln''' - report gcode line number with each entry
 
  
Note: these values are persistent, and if previously enabled, will still be enabled unless disabled with a 0 parameter.
+
After editing:
  
'''Example 1'''
+
  G1 Z0.275 F360 '''H2'''  ; move to next layer (0) and invoke head Z offset for this tool</code>
 +
  (followed by)
 +
  G1 X50 Y75 F4800 '''H2'''
  
  M719 P10 S1
+
<br>
 +
<hr>
  
This command is decoded and executed by the printer as follows:
+
=== M703 Cloning Heads ===
  
* '''M719''' (logging on)
+
Clone, slave, or parallel printing, is when multiple heads make the ''exact same print'' at the same time.
** '''P10''' (every 10 seconds)
 
** '''S1''' (report everything)
 
 
 
'''Example 2'''
 
  
  M719 P.1 Xn Yn Zn Ln
+
Usage of these commands with version 4 and earlier is explained in detail at '''https://hyrel3d.com/wiki/index.php/Cloning_and_Mixing'''.
 
 
* '''M719''' (logging on)
 
** '''P.1''' (every 0.1 seconds)
 
** '''X1''' (report X position)
 
** '''Y1''' (report Y position)
 
** '''Z1''' (report Z position)
 
** (don't report A position)
 
** (don't report B position)
 
** (don't report velocity)
 
** (don't report flow rate)
 
** '''L1''' (report line number)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M670 Enable Gantry / Y-arm Light ===
+
=== T Tool Change===
  
M670 sets the intensity of the Y-arm LEDs.
+
T executes a tool change, invoking the parameters specified in the M6 sent from Repetrel to the printer at the job start. Do not confuse a T command with a T variable.
  
'''Usage'''
+
'''See the first entry on this page for details. '''
  
  M670 Sn Pn
+
<br>
 +
<hr>
  
'''Parameters'''
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
  '''Sn''' is the (percent of duty cycle, 0-100) for the LEDs
+
== '''Controlling Lasers and UV Pens''' ==
  '''Pn''' is the period (on-off interval - default is 1 second)
 
  
'''Example 1'''
+
{| border="1" class="wikitable" style="float:right"
 
+
! colspan="3" | Controlling Lasers and UV Pens
  M670 S50 P1
+
|-
 +
! Code
 +
! Supported
 +
! Brief Description
 +
|--
 +
! [[#M620_Enable_Device|M620]]
 +
| Yes || Enable Device
 +
|-
 +
! [[#M621_Set_Laser_Power|M621]]
 +
| Yes || Set Laser Power
 +
|-
 +
! [[#M623_Duration_Emit|M623]]
 +
| Yes || Duration Emit
 +
|-
 +
| colspan="3" | [[#Laser_Examples|Laser Examples]]
 +
|-
 +
| colspan="3" | [[#UV_Pen_Examples|UV Pen Examples]]
 +
|}
  
This command is decoded and executed by the printer as follows:
 
  
* '''M670''' (enable Y-arm light)
+
The CO<sub>2</sub> and Diode Lasers and the UV Pens require the following enabling codes:
** '''S50''' (50% duty cycle)
 
** '''P1''' (1 second cycle)
 
  
This would turn the Y-arm light on for 50% of 1 second, then off for 50% of 1 second - or on for 0.5 seconds, off for 0.5 seconds.
+
=== M620 Enable Device ===
  
'''Example 2'''
+
M620 enables the device.
  
  M670 S25 P4
+
'''Usage'''
  
This command is decoded and executed by the printer as follows:
+
  M620 T# En An
  
* '''M670''' (enable Y-arm light)
+
'''Parameters'''
** '''S25''' (25% duty cycle)
 
** '''P4''' (4 second cycle)
 
  
This would turn the Y-arm light on for 25% of 4 second, then off for 75% of 4 seconds - or on for 1 second, off for 3 seconds.
+
  '''T#''' is the tool position
 +
  '''En''' can be the default 0 (disable) or 1 (enable)
 +
  '''An''' is the duration in seconds after shut-off that the cooling remains active; default is 30 (but this will not override temperature safety measures)
  
<br>
+
'''Example'''
<hr>
 
  
=== M672 Set Gantry / Y-arm State ===
+
  M620 T# E1
  
M672 can be used to have the Gantry / Y-arm light change states to reflect the state of a sensor. For example, you can have it come on when the X axis is homed, or when the Y axis has a fault.
+
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M620''' (enable device)
 +
** '''T#''' (target head - MUST be specified, can NOT be inherited)
 +
** '''E1''' (enable)
 +
 
 +
<br>
 +
<hr>
 +
 
 +
=== M621 Set Laser Power ===
 +
 
 +
M621 sets the power for the LASER (not other heads).
  
 
'''Usage'''
 
'''Usage'''
  
   M672 Sn
+
   M621 Dn Pn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' can be (unlisted numbers are unused at present):
+
   '''Pn''' is the power, in a value between 0 (min) and 100 (max).
        '''0''' : Normal on/off
+
  '''Dn''' is the initial power (similar to a prime) to penetrate material (optional; uses Pn if unspecified)
        '''10''' : X Home
+
 
        '''11''' : X Limit1
+
Note: No tool is specified; this will happen on the laser already enabled with M620.
        '''12''' : X Limit2
+
 
        '''13''' : X Fault
+
'''Example'''
        '''20''' : Y Home
+
 
        '''21''' : Y Limit1
+
   M621 P40
        '''22''' : Y Limit2
+
 
        '''23''' : Y Fault
+
This command is decoded and executed by the printer as follows:
        '''30''' : Z Home
+
 
        '''31''' : Z Limit1
+
* '''M621''' (activate device)
        '''32''' : Z Limit2
+
** '''P40''' (at 40% during "printing" (E-value) moves)
        '''33''' : Z Fault
 
        '''40''' : A Home
 
        '''41''' : A Limit1
 
        '''42''' : A Limit2
 
        '''43''' : A Fault
 
        '''50''' : B Home
 
        '''11''' : B Limit1
 
        '''52''' : B Limit2
 
        '''53''' : B Fault
 
        '''60''' : C Home
 
        '''61''' : C Limit1
 
        '''62''' : C Limit2
 
        '''63''' : C Fault
 
 
 
'''Example'''
 
 
 
   M672 S
 
 
 
This command is decoded and executed by the printer as follows:
 
 
 
* '''M672''' (map Y-arm light to state of sensor)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M772 Reset All Metrics ===
 
  
M772 will reset all internal gathering registers to '''0'''.
+
=== M623 Duration Emit ===
 +
 
 +
M623 sets the power for the laser or UV pen, and takes the following parameters:
  
 
'''Usage'''
 
'''Usage'''
  
   M772 Sn
+
   M623 Dn Pn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' 0 is default; S can be...
+
   '''Dn''' is the duration, in miliseconds (only used for static exposures, not during moves)
      '''0''' reset all values only
+
  '''Pn''' is the power, in a value between 0 (min) and 100 (max).
      '''1''' also generates a basic printing report
 
      '''255''' also generates all possible reports (helpful for advanced debugging)
 
  
'''Example'''
+
Note: Dn max for UV pens is 60,000 (1 minute); Dn max for other devices 1,000 (1 second);
  
   M772 S1
+
Here are examples:
 +
 
 +
   M623 P80 D500
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M772''' (reset all metrics)
+
* '''M623''' (activate tool)  
** '''S1''' (and generate basic printing report
+
** '''P80''' (power 80%)
 +
** '''D500''' (duration 500 miliseconds)
  
<br>
+
  M623 P80 D10000
<hr>
 
  
=== M773 Generate Basic Report ===
+
This command is decoded and executed by the printer as follows:
  
M773 generates a basic report of printing statistics (including average speed, number of primes, etc.)
+
* '''M623''' (activate tool) 
 +
** '''P80''' (power 80%)
 +
** '''D10000''' (duration 10 seconds)
  
Note: this report will be more meaningful if you use '''M772''' to reset these counters at the start of a job.
+
=== Emitting Move Example for the Laser ===
  
'''Usage'''
+
A sample of code for lasering will look like this:
  
   M773
+
   G0 X100 Y100 F1000  ; move to start location at 1000 mm/min
 +
  M620 T# E1          ; enable target device
 +
  M621 P100          ; set light emission in vector mode (slot 3) to full power (100%)
 +
  T#                  ; toolchange to target head
 +
  G1 X120 Y100 E1    ; emitting (printing) move 20mm from origin in X axis
 +
  G1 X120 Y120 E1    ; emitting (printing) move 20mm from origin in Y axis
 +
  G1 X120 Y130        ; non-emitting move 10mm from origin in Y axis
 +
  G1 X140 Y130 E1    ; emitting move 20mm from origin in X axis
 +
 
 +
  ... (the rest of your lasering job)
 +
 
 +
  M620 T# E0          ; disable target device <= should be before M30 command
  
'''Parameters'''
+
=== Emitting Move Example for the UV Pen ===
  
  N/A
+
A sample of code for UV Curing will look like this:
  
'''Example'''
+
  G0 X100 Y100 F1000  ; move to start location at 1000 mm/min
 
+
  M620 T# E1        ; enable target device
  M773
+
  M621 P100          ; set light emission in vector mode (slot 3) to full power (100%)
 +
  T#                  ; toolchange to target head
 +
  G1 X120 Y100 E1    ; emitting (printing) move 20mm from origin in X axis
 +
  G1 X120 Y120 E1    ; emitting (printing) move 20mm from origin in Y axis
 +
  G1 X120 Y130        ; non-emitting move 10mm from origin in Y axis
 +
  G1 X140 Y130 E1    ; emitting move 20mm from origin in X axis
 +
 
 +
  ... (the rest of your curing job)
 +
 
 +
  M620 T# E0        ; disable target device <= should be before M30 command
 +
 
 +
For more complex examples, see the '''[[UV_and_Clench]]''' page.
  
This command is decoded and executed by the printer as follows:
+
<br>
 +
<hr>
  
* '''M773''' (generate basic report)
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
'''Sample Output'''
+
== '''Controlling Spindles and Lathes''' ==
  
  >IN: 50: ******************************************************************
+
{| border="1" class="wikitable" style="float:right"
  >IN:  50: **  Begin M773 - print job metrics Report
+
! colspan="3" | Controlling Spindles and Lathes
  >IN:  50: ******************************************************************
+
|-
  >IN:  50:
+
! Code
  >IN:  50:                      Time (s)    Dist (m)
+
! Supported
  >IN:  50:                      --------    --------
+
! Brief Description
  >IN:  50: Totals:                    0.0      0.000
+
|-
  >IN:  50:
+
! [[#M3_Turn_On_Spindle_.28CW.29|M3]]
  >IN:  50: Printing moves:            0.0      0.000
+
| Yes || Spindle On CW
  >IN:  50: Non-printing moves        0.0      0.000
+
|-
  >IN:  50:
+
! [[#M4_Turn_On_Spindle_.28CCW.29R|M4]]
  >IN:  50: Accelerating:              0.0      0.000
+
| Yes || Spindle On CCW
  >IN:  50: Cruising:                  0.0      0.000
+
|-
  >IN:  50: Decelerating:              0.0      0.000
+
! [[#M5_Turn_Off_Spindle|M5]]
  >IN:  50:
+
| Yes || Spindle Off
  >IN:  50: can e steps issued:      0
+
|-
  >IN:  50: approx filament (PI*d)    0.000 m
+
! [[#M253_Turn_On_Lathe_.28CW.29|M253]]
  >IN:  50: approx filament (PIr^2)   0.000 m
+
| Yes || Turn On Lathe (CW)
  >IN:  50: unprimes issued:          0
+
|-
  >IN:  50: primes issued:            0
+
! [[#M254_Turn_On_Lathe_.28CCW.29|M254]]
  >IN:  50: unprime-primes avoided:  0
+
| Yes || Turn On Lathe (CCW)
  >IN:  50:
+
|-
  >IN:  50: ******************************************************************
+
! [[#M255_Turn_Off_Lathe|M255]]
  >IN:  50: **  End M773 Report
+
| Yes || Turn Off Lathe
  >IN:  50: ******************************************************************
+
|-
 +
! [[#G81_Peck_Drilling|G81]]
 +
| G81 || Peck Drilling
 +
|-
 +
|}
  
<br>
+
Machining and Spindle Tool commands. Note, we recommend using [http://mr-soft.net/ SimplyCAM].
<hr>
 
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
You can review the 5-axis gcode we used for [https://www.youtube.com/watch?v=B0lvN-aPYHI this video] from [http://hyrel3d.net/downloads/gcode/Ardes_tube_cap_milling.gcode here].
  
== '''Controlling Aux Devices''' ==
+
=== M3 Turn On Spindle (CW) ===
  
Individual port control commands.
+
M3 tells the printer to activate (start) the spindle motor in the clockwise direction on the current head (if it has one), using the value set on the head for RPM. Note: S0 is the same as turning it off. Note: DO NOT CHANGE DIRECTION while the spindle is in motion.
 
 
=== M7 Activate Aux 1 ===
 
 
 
[[File:M7m8m9_ehr.jpg|thumb|12VDC Ports on EHR|right]]
 
 
 
[[File:M7m8m9_30m_esr.jpg|thumb|12VDC Ports on 30M, ESR|right]]
 
 
 
M7 sends 12VDC to the port associated with "Mist Coolant", which we sometimes call Aux1. With no parameters, it is read as M7 S100 (on continuously).  
 
  
 
'''Usage'''
 
'''Usage'''
  
   M7 Sn
+
   M3 T# Sn Fn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100) for Aux 1 to come on (default is 100)
+
  '''T#''' - target head
 +
   '''Sn''' - power (0-100%)
 +
  '''Fn''' - optional; PWM in Hz (defaults on heads should be fine for most uses)
  
'''Example 1'''
+
'''Example'''
  
   M7 S100
+
   M3 T# S75
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M7''' (Aux1 value)  
+
* '''M3''' (activate spindle clockwise)
** '''S21100''' (set to 100%)
+
** '''T#''' (target head)
 +
** '''S75''' (at 75% power)
 +
** (default PWM)
  
'''Example 2'''
+
<br>
 +
<hr>
  
  M7 S25
+
=== M4 Turn On Spindle (CCW) ===
  
This command is decoded and executed by the printer as follows:
+
Please refer to M3, above, for details. All options are identical, with the exception of direction (counterclockwise).
  
* '''M7''' (Aux1 value)
+
<br>
** '''S25''' (set to 25%)
+
<hr>
  
'''Example 3'''
+
===  M5 Turn Off Spindle ===
  
  M7 S0
+
M5 tells the printer to deactivate (stop) the spindle motor on the current head (if it has one). M5 has the same effect as M3 S0 or M4 S0.
  
This command is decoded and executed by the printer as follows:
+
'''Usage'''
  
* '''M7''' (Aux1 value)  
+
  M5 T#
** '''S0''' (set to 0%)
+
 
 +
'''Parameters'''
 +
 
 +
  '''T#''' - target head
 +
 
 +
'''Example'''
 +
 
 +
  M5 T#
 +
 
 +
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M3''' (deactivate spindle )
 +
** '''T#''' (target head)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M8 Activate Aux 2 ===
+
=== M253 Turn On Lathe (CW) ===
  
M7 sends 12VDC to the port associated with "Flood Coolant", which we sometimes call Aux2. With no parameters, it is read as M8 S100 (on continuously).  
+
M253 tells the printer to activate (start) the lathe motor in the clockwise direction (if it has one), using the value set with M92 for RPM. Only available on Hydra 16A models.
 +
 
 +
Note: S0 is the same as turning it off.  
  
 
'''Usage'''
 
'''Usage'''
  
   M8 Sn
+
   M253 Sn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100) for Aux 2 to come on (default is 100)
+
   '''Sn''' - speed in units per minute (default: RPM if set with M92 as steps per revolution)
  
'''Example 1'''
+
'''Example'''
  
   M8 S100
+
   M253 S75
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M8''' (Aux2 value)  
+
* '''M253''' (activate spindle clockwise)
** '''S100''' (set to 100%)
+
** '''S75''' (at 75 RPM)  
  
'''Example 2'''
+
<br>
 +
<hr>
  
  M8 S25
+
=== M254 Turn On Lathe (CCW) ===
  
This command is decoded and executed by the printer as follows:
+
Please refer to M253, above, for details. All options are identical, with the exception of direction (counterclockwise).
 
 
* '''M8''' (Aux2 value)
 
** '''S25''' (set to 25%)
 
 
 
'''Example 3'''
 
 
 
  M8 S0
 
 
 
This command is decoded and executed by the printer as follows:
 
 
 
* '''M8''' (Aux2 value)
 
** '''S''' (set to 0%)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M9 Deactivate Aux1 & Aux2 ===
+
=== M255 Turn Off Lathe ===
  
M9 cuts power to both Aux1 and Aux2. It is equivalent to running M7 S0 and M8 S0.
+
M255 tells the printer to deactivate (stop) the lathe motor (if it has one). M255 has the same effect as G253 S0 or G254 S0.
  
 
'''Usage'''
 
'''Usage'''
  
   M9
+
   M255
  
 
'''Parameters'''
 
'''Parameters'''
Line 2,558: Line 2,929:
 
'''Example'''
 
'''Example'''
  
   M9
+
   M255
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M9''' (set Aux 1 and Aux 2 to value 0 (off))  
+
* '''M255''' (deactivate lathe)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M620 Activate Emitter ===
+
===  G81 Peck Drilling ===
  
See [[#M620_Enable_Device]] above.
+
G81 tells the printer to move to a start position in X/Y and then in Z, and to make (if needed) repeated descents and retracts. This is used to make holes, especially deep holes. Note that the spindle tool is turned on with an M3 or M4 before this command, and turned off with an M5 after all work is done.
 
 
<br>
 
<hr>
 
 
 
=== M670 Activate Gantry / Y-Arm ===
 
 
 
M670 sends 12VDC to the port associated turning on the Gantry (16A) or Y-arm (30M, ESR) lights.
 
  
 
'''Usage'''
 
'''Usage'''
  
   M670 Sn
+
   G81 T# Xn Yn In Pn Qn Zn Fn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
   '''T#''' - target head
 
+
  '''Xn''' - X position
'''Example 1'''
+
  '''Yn''' - Y position
 +
  '''In''' - initial Z position
 +
  '''Pn''' - peck downward this many mm during each cycle
 +
  '''Qn''' - retract upward this many mm after each cycle (to clear debris)
 +
  '''Zn''' - maximum pecking depth
 +
  '''Fn''' - Z working speed in mm/min
  
  M670 S100
+
'''Example'''
  
This command is decoded and executed by the printer as follows:
+
  G81 T# X100 Y75 I3 P3 Q-2 Z-7.5 F200
  
* '''M670''' (Gantry / Y-arm value)
+
''NOTE that an M660 offset must be set and applied BEFORE THIS COMMAND to allow for tool length.''
** '''S100''' (set to 100%)
 
 
 
'''Example 2'''
 
 
 
  M670 S25
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M670''' (Gantry / Y-arm value)  
+
* '''G81''' (begin pecking cycle)
** '''S25''' (set to 25%)
+
** '''X100 Y75''' (move to X/Y starting position X100 Y75)  
 
+
** '''I3''' (move to Z starting position Z3, which will be our greatest retract height)  
'''Example 3'''
+
** '''P3''' (peck downward an additional 3mm at a time)
 
+
** '''Q-2''' (retract upward 2mm after each peck (to clear debris))
  M670 S0
+
** '''Z-7.5''' (peck to a maximum depth of 7.5mm)
 
+
** '''F200''' (working (drilling) travel speed of 200 mm/min)
This command is decoded and executed by the printer as follows:
+
** ''after this, the head will retract up to the I position (Z3 in this case) before moving on to the next line''
 
 
* '''M670''' (Gantry / Y-arm value)  
 
** '''S0''' (set to 0%)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M671 Activate Danger Lights ===
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
M671 sends 12VDC to the port associated turning on the X-arm / Danger lights (30M/ESR only).
+
== '''Reporting and Diagnostics''' ==
  
'''Usage'''
+
{| border="1" class="wikitable" style="float:right"
 +
! colspan="3" | Reporting and Diagnostics
 +
|-
 +
! Code
 +
! Supported
 +
! Brief Description
 +
|-
 +
! [[#M701_Set_Head_Reporting|M701]]
 +
| Yes || Set Head Reporting
 +
|-
 +
! [[#M718_Stop_Logging_to_File|M718]]
 +
| Yes || Stop Logging to File
 +
|-
 +
! [[#M719_Start_Logging_to_File|M719]]
 +
| Yes || Start Logging to File
 +
|-
 +
! [[#M670_M670_Enable_Gantry_/_Y-arm_Light|M670]]
 +
| Yes || Enable Y-arm Light
 +
|- || Activate Danger Light
 +
|-
 +
! [[#M672_Set_Y-arm_Light|M672]]
 +
| Yes || Set Y-arm Light
 +
|-
 +
! [[#M772_Reset_All_Metrics|M772]]
 +
| Yes || Reset All Metrics
 +
|-
 +
! [[#M773_Generate_Basic_Report|M773]]
 +
| Yes || Generate Basic Report
 +
|-
 +
|}
  
  M671 Sn
+
The following commands help with reporting and diagnostics. Most users never need them, but here are the basics. More advanced/detailed reporting is available.
  
'''Parameters'''
+
=== M701 Set Head Reporting ===
  
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
M701 tells heads how often to send head-specific information to the Motion Controller and on to Repetrel (and pass along to a text file if enabled via M719).
  
'''Example 1'''
+
'''Usage'''
  
   M671 S100
+
   M701 T# Pn
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M671''' (X-arm / Danger value)
+
  '''T#''' - target head
** '''S100''' (set to 100%)
+
  '''Pn''' - period in seconds between entries (default 1)
  
'''Example 2'''
+
'''Example'''
  
   M671 S25
+
   M701 P12
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M671''' (X-arm / Danger value)  
+
* '''M701''' (head reporting)  
** '''S25''' (set to 25%)
+
** (currently active head)
 
+
** '''P12''' (every 12 seconds)
'''Example 3'''
 
 
 
  M671 S0
 
 
 
This command is decoded and executed by the printer as follows:
 
 
 
* '''M671''' (X-arm / Danger value)  
 
** '''S0''' (set to 0%)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M675 Activate Response LEDs ===
+
=== M718 Stop Logging to File ===
  
M675 sends 12VDC to the port associated turning on the Response LEDs (30M/16A only).
+
M718 tells Repetrel to stop any logging of data to text file that may have been enabled with M719.
  
 
'''Usage'''
 
'''Usage'''
  
   M675 Sn
+
   M718
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
   N/A
  
'''Example 1'''
+
'''Example'''
  
   M675 S100
+
   M718
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M675''' (Response LEDs value)
+
* '''M718''' (logging off)  
** '''S100''' (set to 100%)
 
  
'''Example 2'''
+
<br>
 +
<hr>
  
  M675 S25
+
=== M719 Start Logging to File ===
  
This command is decoded and executed by the printer as follows:
+
M719 tells the Motion Controller what system-wide information to report back to Repetrel, and also tells Repetrel to begin logging these details to a text file.
  
* '''M675''' (Response LEDs value)
+
'''Usage'''
** '''S25''' (set to 25%)
 
  
'''Example 3'''
+
  M719 Pn Sn
 +
 
 +
  M719 Pn Xn Yn Zn An Bn Vn En Ln
  
  M675 S0
+
'''Parameters'''
  
This command is decoded and executed by the printer as follows:
+
  '''Pn''' - period in seconds between entries
 +
  '''Sn''' - can be default 0 (see options below) or 1 (report ALL data)
 +
  '''Xn''' - report X position with each entry
 +
  '''Yn''' - report Y position with each entry
 +
  '''Zn''' - report Z position with each entry
 +
  '''An''' - report A position with each entry
 +
  '''Bn''' - report B position with each entry
 +
  '''Vn''' - report velocity with each entry
 +
  '''En''' - report flow rate with each entry
 +
  '''Ln''' - report gcode line number with each entry
  
* '''M675''' (Response LEDs value)
+
Note: these values are persistent, and if previously enabled, will still be enabled unless disabled with a 0 parameter.
** '''S0''' (set to 0%)
 
  
<br>
+
'''Example 1'''
<hr>
 
  
=== M676 Activate Recirc. Fan ===
+
  M719 P10 S1
  
M676 sends 12VDC to the port associated turning on the Recirc. Fan (16A only).
+
This command is decoded and executed by the printer as follows:
  
'''Usage'''
+
* '''M719''' (logging on)
 +
** '''P10''' (every 10 seconds)
 +
** '''S1''' (report everything)
  
  M676 Sn
+
'''Example 2'''
  
'''Parameters'''
+
  M719 P.1 Xn Yn Zn Ln
  
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
* '''M719''' (logging on)
 +
** '''P.1''' (every 0.1 seconds)
 +
** '''X1''' (report X position)
 +
** '''Y1''' (report Y position)
 +
** '''Z1''' (report Z position)
 +
** (don't report A position)
 +
** (don't report B position)
 +
** (don't report velocity)
 +
** (don't report flow rate)
 +
** '''L1''' (report line number)
  
'''Example 1'''
+
<br>
 +
<hr>
  
  M676 S100
+
=== M670 Enable Gantry / Y-arm Light ===
  
This command is decoded and executed by the printer as follows:
+
M670 sets the intensity of the Y-arm LEDs.
  
* '''M676''' (Recirc. Fan value)
+
'''Usage'''
** '''S100''' (set to 100%)
 
  
'''Example 2'''
+
  M670 Sn Pn
  
  M676 S25
+
'''Parameters'''
  
This command is decoded and executed by the printer as follows:
+
  '''Sn''' is the (percent of duty cycle, 0-100) for the LEDs
 +
  '''Pn''' is the period (on-off interval - default is 1 second)
  
* '''M676''' (Recirc. Fan value)
+
'''Example 1'''
** '''S25''' (set to 25%)
 
  
'''Example 3'''
+
   M670 S50 P1
 
 
   M676 S0
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M676''' (Recirc. Fan value)  
+
* '''M670''' (enable Y-arm light)
** '''S0''' (set to 0%)
+
** '''S50''' (50% duty cycle)
 +
** '''P1''' (1 second cycle)
  
<br>
+
This would turn the Y-arm light on for 50% of 1 second, then off for 50% of 1 second - or on for 0.5 seconds, off for 0.5 seconds.
<hr>
 
  
=== M677 Activate Buzzer ===
+
'''Example 2'''
  
M677 sends 12VDC to the port associated turning on the Buzzer (older 30Ms only).
+
  M670 S25 P4
  
'''Usage'''
+
This command is decoded and executed by the printer as follows:
  
  M677 Sn
+
* '''M670''' (enable Y-arm light)
 +
** '''S25''' (25% duty cycle)
 +
** '''P4''' (4 second cycle)
  
'''Parameters'''
+
This would turn the Y-arm light on for 25% of 4 second, then off for 75% of 4 seconds - or on for 1 second, off for 3 seconds.
  
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
<br>
 +
<hr>
  
'''Example 1'''
+
=== M672 Set Gantry / Y-arm State ===
  
  M677 S100
+
M672 can be used to have the Gantry / Y-arm light change states to reflect the state of a sensor. For example, you can have it come on when the X axis is homed, or when the Y axis has a fault.
  
This command is decoded and executed by the printer as follows:
+
'''Usage'''
  
* '''M677''' (Buzzer value)
+
  M672 Sn
** '''S100''' (set to 100%)
 
  
'''Example 2'''
+
'''Parameters'''
  
   M677 S25
+
   '''Sn''' can be (unlisted numbers are unused at present):
 
+
        '''0'''  : Normal on/off
This command is decoded and executed by the printer as follows:
+
        '''10''' : X Home
 +
        '''11''' : X Limit1
 +
        '''12''' : X Limit2
 +
        '''13''' : X Fault
 +
        '''20''' : Y Home
 +
        '''21''' : Y Limit1
 +
        '''22''' : Y Limit2
 +
        '''23''' : Y Fault
 +
        '''30''' : Z Home
 +
        '''31''' : Z Limit1
 +
        '''32''' : Z Limit2
 +
        '''33''' : Z Fault
 +
        '''40''' : A Home
 +
        '''41''' : A Limit1
 +
        '''42''' : A Limit2
 +
        '''43''' : A Fault
 +
        '''50''' : B Home
 +
        '''11''' : B Limit1
 +
        '''52''' : B Limit2
 +
        '''53''' : B Fault
 +
        '''60''' : C Home
 +
        '''61''' : C Limit1
 +
        '''62''' : C Limit2
 +
        '''63''' : C Fault
  
* '''M677''' (Buzzer value)
+
'''Example'''
** '''S25''' (set to 25%)
 
  
'''Example 3'''
+
   M672 S
 
 
   M677 S0
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M677''' (Buzzer value)
+
* '''M672''' (map Y-arm light to state of sensor)
** '''S0''' (set to 0%)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M678 Activate Laser X-hair ===
+
=== M772 Reset All Metrics ===
  
M678 sends 12VDC to the port associated turning on the Laser X-hair (16A with CO<sub>2</sub> lasers only).
+
M772 will reset all internal gathering registers to '''0'''.
  
 
'''Usage'''
 
'''Usage'''
  
   M678 Sn
+
   M772 Sn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
   '''Sn''' 0 is default; S can be...
 +
      '''0''' reset all values only
 +
      '''1''' also generates a basic printing report
 +
      '''255''' also generates all possible reports (helpful for advanced debugging)
  
'''Example 1'''
+
'''Example'''
  
   M678 S100
+
   M772 S1
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M678''' (Laser X-hair value)  
+
* '''M772''' (reset all metrics)
** '''S100''' (set to 100%)
+
** '''S1''' (and generate basic printing report
  
'''Example 2'''
+
<br>
 +
<hr>
  
  M678 S25
+
=== M773 Generate Basic Report ===
  
This command is decoded and executed by the printer as follows:
+
M773 generates a basic report of printing statistics (including average speed, number of primes, etc.)
  
* '''M678''' (Laser X-hair value)
+
Note: this report will be more meaningful if you use '''M772''' to reset these counters at the start of a job.
** '''S25''' (set to 25%)
 
  
'''Example 3'''
+
'''Usage'''
  
   M678 S0
+
   M773
  
This command is decoded and executed by the printer as follows:
+
'''Parameters'''
  
* '''M678''' (Laser X-hair value)
+
  N/A
** '''S0''' (set to 0%)
 
  
<br>
+
'''Example'''
<hr>
 
  
<br>
+
  M773
<hr>
 
  
=== M679 Activate Vacuum ===
+
This command is decoded and executed by the printer as follows:
  
M679 sends 12VDC to the port associated turning on the Vacuum (30M/ESR only).
+
* '''M773''' (generate basic report)
  
'''Usage'''
+
'''Sample Output'''
  
   M671 Sn
+
   >IN:  50: ******************************************************************
 +
  >IN:  50: **  Begin M773 - print job metrics Report
 +
  >IN:  50: ******************************************************************
 +
  >IN:  50:
 +
  >IN:  50:                      Time (s)    Dist (m)
 +
  >IN:  50:                      --------    --------
 +
  >IN:  50: Totals:                    0.0      0.000
 +
  >IN:  50:
 +
  >IN:  50: Printing moves:            0.0      0.000
 +
  >IN:  50: Non-printing moves        0.0      0.000
 +
  >IN:  50:
 +
  >IN:  50: Accelerating:              0.0      0.000
 +
  >IN:  50: Cruising:                  0.0      0.000
 +
  >IN:  50: Decelerating:              0.0      0.000
 +
  >IN:  50:
 +
  >IN:  50: can e steps issued:      0
 +
  >IN:  50: approx filament (PI*d)    0.000 m
 +
  >IN:  50: approx filament (PIr^2)  0.000 m
 +
  >IN:  50: unprimes issued:          0
 +
  >IN:  50: primes issued:            0
 +
  >IN:  50: unprime-primes avoided:  0
 +
  >IN:  50:
 +
  >IN:  50: ******************************************************************
 +
  >IN:  50: **  End M773 Report
 +
  >IN:  50: ******************************************************************
  
'''Parameters'''
+
<br>
 +
<hr>
  
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
'''[[#What_is_GCode.3F|Back to top]]'''
  
'''Example 1'''
+
== '''Controlling Aux Devices''' ==
  
  M679 S100
+
{| border="1" class="wikitable" style="float:right"
 
+
! colspan="3" | Controlling Aux Devices
This command is decoded and executed by the printer as follows:
+
|-
 
+
! Code
* '''M679''' (Vacuum value)  
+
! Supported
** '''S100''' (set to 100%)
+
! Brief Description
 
+
|-
'''Example 2'''
+
! [[#M7_Set_Power_On_Aux_1|M7]]
 
+
| Yes || Aux 1 On (Mist)
  M679 S25
+
|-
 
+
! [[#M8_Set_Power_On_Aux_2|M8]]
This command is decoded and executed by the printer as follows:
+
| Yes || Aux 2 On (Flood)
 
+
|-
* '''M679''' (Vacuum value)  
+
! [[#M9_Turn_Off_All_Aux|M9]]
** '''S25''' (set to 25%)
+
| Yes || All Aux Off
 
+
|-
'''Example 3'''
+
! [[#M620_Enable_Device|M620]]
 
+
| Yes || Enable Device
  M679 S0
+
|-
 +
! [[#M670_Activate_Y-Arm_.28Gantry.29_Lights|M670]]
 +
| Yes || Enable Y-arm (Gantry) Lights
 +
|-
 +
! [[#M671_Activate_X-Arm_.28Danger.29_Lights|M671]]
 +
| Yes || Activate X-Arm (Danger) Lights
 +
|-
 +
! [[#M675_Activate_Response_LEDs|M675]]
 +
| Yes || Activate Response LEDs
 +
|-
 +
! [[#M676_Activate_Recirc._Fan|M676]]
 +
| Yes || Activate Recirc. Fan
 +
|-
 +
! [[#M677_Activate_Buzzer|M677]]
 +
| Yes || Activate Buzzer
 +
|-
 +
! [[#M678_Activate_Laser_X-hair|M678]]
 +
| Yes || Activate Laser X-hair
 +
|-
 +
! [[#M679_Activate_Vacuum|M679]]
 +
| Yes || Activate Vacuum
 +
|-
 +
! [[#M684_Activate_Exhaust|M684]]
 +
| Yes || Activate Exhaust
 +
|-
 +
! [[#M685_Set_Power_on_Air|M685]]
 +
| Yes || Activate Air
 +
|-
 +
! [[#M689_Activate_Ext._Head|M689]]
 +
| Yes || Activate Ext. Head
 +
|-
 +
! [[#M783_Tie_Aux_to_Extrusion|M783]]
 +
| Yes || Tie Aux to Extrusion
 +
|-
 +
|}
  
This command is decoded and executed by the printer as follows:
 
  
* '''M679''' (Vacuum value)
+
Individual port control commands.
** '''S0''' (set to 0%)
+
 
 +
=== M7 Activate Aux 1 ===
  
<br>
+
[[File:M7m8m9_ehr.jpg|thumb|12VDC Ports on EHR|right]]
<hr>
 
  
=== M684 Activate Exhaust ===
+
[[File:M7m8m9_30m_esr.jpg|thumb|12VDC Ports on 30M, ESR|right]]
  
M671 sends 12VDC to the port associated turning on the Exhaust (16A only).
+
M7 sends 12VDC to the port associated with "Mist Coolant", which we sometimes call Aux1. With no parameters, it is read as M7 S100 (on continuously). See also [[#M783_Tie_Aux_to_Extrusion|'''M783''' Tie Aux to Extrusion]].
  
 
'''Usage'''
 
'''Usage'''
  
   M684 Sn
+
   M7 Sn Tn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
   '''Sn''' is the percentage (0-100) for Aux 1 to come on (default is 100)
 +
  '''Tn''' is the head to which Aux 1 will synchronize, coming on at 100% when that head is extruding; using a '''T''' value forces '''S100'''
  
 
'''Example 1'''
 
'''Example 1'''
  
   M684 S100
+
   M7 S100
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M684''' (Exhaust value)  
+
* '''M7''' (Aux1 value)  
 
** '''S100''' (set to 100%)
 
** '''S100''' (set to 100%)
  
 
'''Example 2'''
 
'''Example 2'''
  
   M684 S25
+
   M7 S25
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M684''' (Exhaust value)  
+
* '''M7''' (Aux1 value)  
 
** '''S25''' (set to 25%)
 
** '''S25''' (set to 25%)
  
 
'''Example 3'''
 
'''Example 3'''
  
   M684 S0
+
   M7 S0
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M684''' (Exhaust value)  
+
* '''M7''' (Aux1 value)  
 
** '''S0''' (set to 0%)
 
** '''S0''' (set to 0%)
 +
 +
'''Example 4'''
 +
 +
  M7 T#
 +
 +
This command is decoded and executed by the printer as follows:
 +
 +
* '''M7''' (Aux1 value)
 +
** '''T#''' (set to 100% when T# is extruding)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M685 Set Power on Air ===
+
===  M8 Activate Aux 2 ===
  
M685 sends 12VDC to the port associated turning on the (positive pressure) Air (16A only).
+
M7 sends 12VDC to the port associated with "Flood Coolant", which we sometimes call Aux2. With no parameters, it is read as M8 S100 (on continuously).  See also [[#M783_Tie_Aux_to_Extrusion|'''M783''' Tie Aux to Extrusion]].
  
 
'''Usage'''
 
'''Usage'''
  
   M685 Sn
+
   M8 Sn Tn
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
   '''Sn''' is the percentage (0-100) for Aux 2 to come on (default is 100)
 +
  '''Tn''' is the head to which Aux 2 will synchronize, coming on at 100% when that head is extruding; using a '''T''' value forces '''S100'''
  
 
'''Example 1'''
 
'''Example 1'''
  
   M685 S100
+
   M8 S100
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M685''' (Air value)  
+
* '''M8''' (Aux2 value)  
 
** '''S100''' (set to 100%)
 
** '''S100''' (set to 100%)
  
 
'''Example 2'''
 
'''Example 2'''
  
   M685 S25
+
   M8 S25
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M685''' Air value)  
+
* '''M8''' (Aux2 value)  
 
** '''S25''' (set to 25%)
 
** '''S25''' (set to 25%)
  
 
'''Example 3'''
 
'''Example 3'''
  
   M685 S0
+
   M8 S0
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M685''' (Air value)  
+
* '''M8''' (Aux2 value)  
** '''S0''' (set to 0%)
+
** '''S''' (set to 0%)
 +
 
 +
'''Example 4'''
 +
 
 +
  M8 T#
 +
 
 +
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M8''' (Aux2 value)
 +
** '''T#''' (set to 100% when T# is extruding)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M689 Activate Ext. Head  ===
+
=== M9 Deactivate Aux1 & Aux2 ===
  
M689 sends 12VDC to the port associated turning on the Ext. Head.
+
M9 cuts power to both Aux1 and Aux2. It is equivalent to running M7 S0 and M8 S0.
  
 
'''Usage'''
 
'''Usage'''
  
   M689 Sn
+
   M9
  
 
'''Parameters'''
 
'''Parameters'''
  
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
+
   N/A
  
'''Example 1'''
+
'''Example'''
  
   M689 S100
+
   M9
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M689''' (Ext. Head value)  
+
* '''M9''' (set Aux 1 and Aux 2 to value 0 (off))  
** '''S100''' (set to 100%)
 
  
'''Example 2'''
+
<br>
 +
<hr>
  
  M689 S25
+
=== M620 Activate Emitter  ===
  
This command is decoded and executed by the printer as follows:
+
See [[#M620_Enable_Device]] above.
  
* '''M689''' (Ext. Head value)
+
<br>
** '''S25''' (set to 25%)
+
<hr>
  
'''Example 3'''
+
=== M670 Activate Y-Arm (Gantry) Lights ===
  
  M689 S0
+
M670 sends 12VDC to the port associated turning on the Gantry (16A) or Y-arm (30M, ESR) lights.
  
This command is decoded and executed by the printer as follows:
+
'''Usage'''
  
* '''M689''' (Ext. Head value)
+
  M670 Sn
** '''S0''' (set to 0%)
 
  
<br>
+
'''Parameters'''
<hr>
 
  
== '''Other''' ==
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
  
Other commands.
+
'''Example 1'''
  
=== M17 Engage Motors ===
+
  M670 S100
  
M17 will apply power to all motors (positioning and extruder motors), locking them at their current postion; this prevents the bed and yoke from being pushed manually in the X and Y.
+
This command is decoded and executed by the printer as follows:
  
Note that an '''M18''' or '''M84''' will disengage motors.
+
* '''M670''' (Gantry / Y-arm value)
 +
** '''S100''' (set to 100%)
  
'''Usage'''
+
'''Example 2'''
  
   M17
+
   M670 S25
  
'''Parameters'''
+
This command is decoded and executed by the printer as follows:
  
  N/A
+
* '''M670''' (Gantry / Y-arm value)
 +
** '''S25''' (set to 25%)
  
'''Example'''
+
'''Example 3'''
  
   M17
+
   M670 S0
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M17''' (engage motors)  
+
* '''M670''' (Gantry / Y-arm value)
 +
** '''S0''' (set to 0%)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M18 Disengage Motors ===
+
=== M671 Activate X-Arm (Danger) Lights ===
  
M18 will cut power to all motors (positioning and extruder motors), unlocking them; this allows the motors to cool down (as they normally lock in place while still), as well as allowing one to manually push the bed and yoke in the X and Y. It also notifies the GUI that motors are disabled. All axes with homes must be rehomed after an M18.
+
M671 sends 12VDC to the port associated turning on the X-arm / Danger lights (30M/ESR only).
 
 
Note this is identical to '''M84''' and the opposite of '''M17'''.
 
  
 
'''Usage'''
 
'''Usage'''
  
   M18
+
   M671 Sn
  
 
'''Parameters'''
 
'''Parameters'''
  
   N/A
+
   '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
  
'''Example'''
+
'''Example 1'''
  
   M18
+
   M671 S100
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M18''' (disengage motors)  
+
* '''M671''' (X-arm / Danger value)
 +
** '''S100''' (set to 100%)
  
<br>
+
'''Example 2'''
<hr>
 
  
=== M30 End of Program ===
+
  M671 S25
  
M30 tells the printer that this job is complete. No gocde after an M30 will be executed as part of the previous job.
+
This command is decoded and executed by the printer as follows:
  
Note M30 also dissolves any cloning setups, changes head index to 0, clears fixture offsets (G63), clears any M229 E-value settings, resets M106 persistent range, resets any printing errors, resets M660 head offsets to 0, resets heads to their stored values, and triggers any queued reports.
+
* '''M671''' (X-arm / Danger value)
 +
** '''S25''' (set to 25%)
  
'''Usage'''
+
'''Example 3'''
  
   M30
+
   M671 S0
 
 
'''Parameters'''
 
 
 
  N/A
 
 
 
'''Example'''
 
 
 
  M30
 
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M30''' (end or program)  
+
* '''M671''' (X-arm / Danger value)
 +
** '''S0''' (set to 0%)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M84 Disable Motors ===
+
=== M675 Activate Response LEDs ===
  
M84 invokes an M18. Please see M18 for usage.
+
M675 sends 12VDC to the port associated turning on the Response LEDs (30M/16A only).
  
<br>
+
'''Usage'''
<hr>
+
 
 +
  M675 Sn
 +
 
 +
'''Parameters'''
  
 +
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
  
 +
'''Example 1'''
  
=== M783 Tie Aux to Extrusion ===
+
  M675 S100
  
M783 can tie some auxiliary port (like Aux 1) to be powered (at 100%) during a certain head's extrusion. Some users use this so that they can print with an Ultimus head on our equipment.
+
This command is decoded and executed by the printer as follows:
  
Note: M619 can be used to map which port M783 ties to.
+
* '''M675''' (Response LEDs value)
 +
** '''S100''' (set to 100%)
  
'''Usage'''
+
'''Example 2'''
  
   M783 T#
+
   M675 S25
  
'''Parameters'''
+
This command is decoded and executed by the printer as follows:
  
  '''T#''' is the tool to which the designated aux port will be tied
+
* '''M675''' (Response LEDs value)
 +
** '''S25''' (set to 25%)
  
'''Example'''
+
'''Example 3'''
  
   M783 T#
+
   M675 S0
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M783''' (Tie current Aux port to status of head)
+
* '''M675''' (Response LEDs value)  
** '''T#''' (target head)
+
** '''S0''' (set to 0%)
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
=== M790 New Layer Actions ===
+
=== M676 Activate Recirc. Fan ===
  
M790 will trigger any associated new layer actions, which can include capturing an image from the designated camera. It takes no parameters.
+
M676 sends 12VDC to the port associated turning on the Recirc. Fan (16A only).
  
=== M791 Snap Image ===
+
'''Usage'''
  
M791 will cause the camera selected under the Interface > Camera1 tab, if set to live video, to capture an image and save it to <code>C:\Users\hyrel\Pictures\HyrelPrinterPictures\snap Shots\snap Shots</code>, named <code>pic#.png</code>
+
  M676 Sn
  
=== M792 Execute Action ===
+
'''Parameters'''
  
M792 causes Repetrel to perform an action, such as displaying an image or making a warning beep.
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
 +
 
 +
'''Example 1'''
 +
 
 +
  M676 S100
 +
 
 +
This command is decoded and executed by the printer as follows:
  
'''Usage'''
+
* '''M676''' (Recirc. Fan value)
 +
** '''S100''' (set to 100%)
  
  M792 [ SAY | PIC | VID | SEND | BEEP | SHELL ]
+
'''Example 2'''
  
'''Parameters'''
+
  M676 S25
  
  '''SAY sample message''' - the computer will use built-in text-to-speech to echo the message over the speaker(s)
+
This command is decoded and executed by the printer as follows:
  '''PIC C:\sample.jpg''' - the computer will display the image at the specified location
 
  '''VID C:\sample.mp4''' - the computer will play the video at the specified location
 
  '''SEND sample message''' - the computer will send the message to the Aux port if connected
 
  '''BEEP''' - the computer will sound a beep
 
  '''SHELL C:\program.exe''' - the computer will execute the file at the specified location
 
  
Note that multiple options can be combined.
+
* '''M676''' (Recirc. Fan value)
 +
** '''S25''' (set to 25%)
  
'''Example'''
+
'''Example 3'''
  
   M792 ; SAY Hello Wilbur ; PIC C:\mr_ed.png
+
   M676 S0
  
 
This command is decoded and executed by the printer as follows:
 
This command is decoded and executed by the printer as follows:
  
* '''M792''' (execute action)
+
* '''M676''' (Recirc. Fan value)  
** '''SAY Hello Wilbur''' (Announce Text: Hello Wilbur)
+
** '''S0''' (set to 0%)
** '''PIC C:\mr_ed.png''' (Display Image: C:\mr_ed.png)
 
  
 
<br>
 
<br>
 
<hr>
 
<hr>
  
'''[[#What_is_GCode.3F|Back to top]]'''
+
=== M677 Activate Buzzer ===
  
== Chart of Codes ==
+
M677 sends 12VDC to the port associated turning on the Buzzer (older 30Ms only).
  
 +
'''Usage'''
  
{| border="1" class="wikitable"
+
  M677 Sn
|+ G- and M- Code Reference Chart
+
 
! Code
+
'''Parameters'''
! Supported
+
 
! Brief Description
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
|-
+
 
! [[#G0_Rapid_Move|G0]]
+
'''Example 1'''
| Yes || Rapid Move
+
 
|-
+
  M677 S100
! [[#G1_Working_Move|G1]]
+
 
| Yes || Working Move
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#G2_Clockwise_Arc|G2]]
+
* '''M677''' (Buzzer value)
| Yes || Clockwise Arc
+
** '''S100''' (set to 100%)
|-
+
 
! [[#G2.1_Spiral_CW_Arc1|G2.1]]
+
'''Example 2'''
| Yes || Spiral CW Arc<sup>1</sup>
+
 
|-
+
  M677 S25
! [[#G2.2_Spiral_CW_Arc2|G2.2]]
+
 
| Yes || Spiral CW Arc<sup>2</sup>
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#G2.3_3-Space_CW_Arc|G2.3]]
+
* '''M677''' (Buzzer value)
| Yes || 3-Space CW Spiral Arc
+
** '''S25''' (set to 25%)
|-
+
 
! [[#G3_Counterclockwise_Arc|G3]]
+
'''Example 3'''
| Yes || Counterclockwise Arc
+
 
|-
+
  M677 S0
! [[#G3.1_Spiral_CCW_Arc1</sup>|G3.1]]
+
 
| Yes || Spiral CCW Arc<sup>1</sup>
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#G3.2_Spiral_CCW_Arc2|G3.2]]
+
* '''M677''' (Buzzer value)
| Yes || Spiral CCW Arc<sup>2</sup>
+
** '''S0''' (set to 0%)
|-
+
 
! [[#G3.3_3-Space_CCW_Arc|G3.3]]
+
<br>
| Yes || 3-Space CCW Spiral Arc
+
<hr>
|-
+
 
! [[#G4_Timed_Pause|G4]]
+
=== M678 Activate Laser X-hair ===
| Yes || Timed Pause
+
 
|-
+
M678 sends 12VDC to the port associated turning on the Laser X-hair (16A with CO<sub>2</sub> lasers only).
! [[#G10_UNUSED|G10]]
+
 
| ''No'' || ''Absolute E''
+
'''Usage'''
|-
+
 
! [[#G11_UNUSED|G11]]
+
  M678 Sn
| ''No'' || ''Relative E''
+
 
|-
+
'''Parameters'''
! [[#G16_Arc_Plane:_Any|G16]]
+
 
| Yes || Arc in Any Plane
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
|-
+
 
! [[#G17_Arc_Plane:_XY|G17]]
+
'''Example 1'''
| Yes || Arc in XY Plane
+
 
|-
+
  M678 S100
! [[#G18_Arc_Plane:_XZ|G18]]
+
 
| Yes || Arc in XZ Plane
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#G19_Arc_Plane:_YZ|G19]]
+
* '''M678''' (Laser X-hair value)
| Yes || Arc in YZ Plane
+
** '''S100''' (set to 100%)
|-
+
 
! [[#G20_Set_Units_to_Inches|G20]]
+
'''Example 2'''
| Yes || Set Units to Inches
+
 
|-
+
  M678 S25
! [[#G21_Set_Units_to_Milimeters|G21]]
+
 
| Yes || Set Units to Milimeters
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#G28_Send_X,_Y_to_Physical_Home|G28]]
+
* '''M678''' (Laser X-hair value)
| Yes || Send X, Y to Physical Home
+
** '''S25''' (set to 25%)
|-
+
 
! [[#G53_Clear_Offsets|G53]]
+
'''Example 3'''
| Yes || Clear Offsets
+
 
|-
+
  M678 S0
! [[#G54_-_G59_-_Set_Offsets|G54-59]]
+
 
| Yes || Set Offsets
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#G81_Peck_Drilling|G81]]
+
* '''M678''' (Laser X-hair value)
| G81 || Peck Drilling
+
** '''S0''' (set to 0%)
|-
+
 
! [[#G90_Absolute_Positioning|G90]]
+
<br>
| Yes || Absolute Positioning
+
<hr>
|-
+
 
! [[#G91_Relatative_Positioning|G91]]
+
<br>
| Yes || Relatative Positioning
+
<hr>
|-
+
 
! [[#G92_Reset_Coordinate_Offsets|G92]]
+
=== M679 Activate Vacuum ===
| Yes || Reset Coordinates
+
 
|-
+
M679 sends 12VDC to the port associated turning on the Vacuum (30M/ESR only).
! [[#G93_Clear_Coordinate_Offsets|G93]]
+
 
| Yes || Reset Coordinates
+
'''Usage'''
|-
+
 
! [[#M0_Stop_Until_Resume|M0]]
+
  M671 Sn
| Yes || Stop Until Resume
+
 
|-
+
'''Parameters'''
! [[#M3_Turn_On_Spindle_.28CW.29|M3]]
+
 
| Yes || Spindle On CW
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
|-
+
 
! [[#M4_Turn_On_Spindle_.28CCW.29R|M4]]
+
'''Example 1'''
| Yes || Spindle On CCW
+
 
|-
+
  M679 S100
! [[#M5_Turn_Off_Spindle|M5]]
+
 
| Yes || Spindle Off
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M6_Declare_Head_Offsets|M6]]
+
* '''M679''' (Vacuum value)
| Yes || Declare Head Offsets
+
** '''S100''' (set to 100%)
|-
+
 
! [[#M7_Set_Power_On_Aux_1|M7]]
+
'''Example 2'''
| Yes || Aux 1 On (Mist)
+
 
|-
+
  M679 S25
! [[#M8_Set_Power_On_Aux_2|M8]]
+
 
| Yes || Aux 2 On (Flood)
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M9_Turn_Off_All_Aux|M9]]
+
* '''M679''' (Vacuum value)
| Yes || All Aux Off
+
** '''S25''' (set to 25%)
|-
+
 
! [[#M17_Engage_Motors|M17]]
+
'''Example 3'''
| Yes || Engage Motors
+
 
|-
+
  M679 S0
! [[#M18_Disengage_Motors|M18]]
+
 
| Yes || Disengage Motors
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M30_End_of_Program|M30]]
+
* '''M679''' (Vacuum value)  
| Yes || End of Program
+
** '''S0''' (set to 0%)
|-
+
 
! [[#M82_Absolute_E-Values|M82]]
+
<br>
| Yes || Absolute E-Values
+
<hr>
|-
+
 
! [[#M83_Relative_E-Values|M83]]
+
=== M684 Activate Exhaust ===
| Yes || Relative E-Values
+
 
|-
+
M671 sends 12VDC to the port associated turning on the Exhaust (16A only).
! [[#M84_Disable_Motors|M84]]
+
 
| Yes || Disable Motors
+
'''Usage'''
|-
+
 
! [[#M104_Set_Temp_.28Head.29|M104]]
+
  M684 Sn
| Yes || Set Temp (Head)
+
 
|-
+
'''Parameters'''
! [[#M106_Set_Cooling_.2F_Etc.|M106]]
+
 
| Yes || Set Cooling / Etc.
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
|-
+
 
! [[#M107_Stop_Cooling_.2F_Etc.|M107]]
+
'''Example 1'''
| Yes || Stop Cooling / Etc.
+
 
|-
+
  M684 S100
! [[#M109_Wait_for_Temp_.28Head.29|M109]]
+
 
| Yes || Wait for Temp (Head)
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M116_UNUSED|M116]]
+
* '''M684''' (Exhaust value)
| ''No'' || ''Pause for All Temps''
+
** '''S100''' (set to 100%)
|-
+
 
! [[#M140_Set_Temp_.28Bed.29|M140]]
+
'''Example 2'''
| Yes || Set Temp (Bed)
+
 
|-
+
  M684 S25
! [[#M141_Set_Temp_.28Chamber.29|M141]]
+
 
| Yes || Set Temp (Chamber)
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M190_Wait_for_Temp_.28Bed.29|M190]]
+
* '''M684''' (Exhaust value)
| Yes || Wait for Temp (Bed)
+
** '''S25''' (set to 25%)
|-
+
 
! [[#M191_Wait_for_Temp_.28Chamber.29|M191]]
+
'''Example 3'''
| Yes || Wait for Temp (Chamber)
+
 
|-
+
  M684 S0
! [[#M203_Set_G0_Speed|M203]]
+
 
| Yes || Set G0 Speed
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M221_Set_Flow_Rate|M221]]
+
* '''M684''' (Exhaust value)
| Yes || Set Flow Rate
+
** '''S0''' (set to 0%)
|-
+
 
! [[#M229_Use_E_Values|M229]]
+
<br>
| Yes || Use E Values
+
<hr>
|-
+
 
! [[#M253_Turn_On_Lathe_.28CW.29|M253]]
+
=== M685 Set Power on Air  ===
| Yes || Turn On Lathe (CW)
+
 
|-
+
M685 sends 12VDC to the port associated turning on the (positive pressure) Air (16A only).
! [[#M254_Turn_On_Lathe_.28CCW.29|M254]]
+
 
| Yes || Turn On Lathe (CCW)
+
'''Usage'''
|-
+
 
! [[#M255_Turn_Off_Lathe|M255]]
+
  M685 Sn
| Yes || Turn Off Lathe
+
 
|-
+
'''Parameters'''
! [[#M619_Map_Aux_Port|M619]]
+
 
| Yes || Map Aux Port
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
|-
+
 
! [[#M620_Enable_Device|M620]]
+
'''Example 1'''
| Yes || Enable Device
+
 
|-
+
  M685 S100
! [[#M621_Set_Laser_Power|M621]]
+
 
| Yes || Set Laser Power
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M623_Duration_Emit|M623]]
+
* '''M685''' (Air value)
| Yes || Duration Emit
+
** '''S100''' (set to 100%)
|-
+
 
! [[#M660_Assign_Tool_Height_Offset|M660]]
+
'''Example 2'''
| Yes || Set Tool Offsets
+
 
|-
+
  M685 S25
! [[#M670_Enable_Y-arm_Light|M670]]
+
 
| Yes || Enable Y-arm Light
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M671_Activate_Danger_Lights|M671]]
+
* '''M685''' Air value)
| Yes || Activate Danger Light
+
** '''S25''' (set to 25%)
|-
+
 
! [[#M672_Set_Y-arm_Light|M672]]
+
'''Example 3'''
| Yes || Set Y-arm Light
+
 
|-
+
  M685 S0
! [[#M675_Activate_Response_LEDs|M675]]
+
 
| Yes || Activate Response LEDs
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M676_Activate_Recirc._Fan|M676]]
+
* '''M685''' (Air value)
| Yes || Activate Recirc. Fan
+
** '''S0''' (set to 0%)
|-
+
 
! [[#M677_Activate_Buzzer|M677]]
+
<br>
| Yes || Activate Buzzer
+
<hr>
|-
+
 
! [[#M678_Activate_Laser_X-hair|M678]]
+
=== M689 Activate Ext. Head  ===
| Yes || Activate Laser X-hair
+
 
|-
+
M689 sends 12VDC to the port associated turning on the Ext. Head.
! [[#M679_Activate_Vacuum|M679]]  
+
 
| Yes || Activate Vacuum
+
'''Usage'''
|-
+
 
! [[#M684_Activate_Exhaust|M684]]  
+
  M689 Sn
| Yes || Activate Exhaust
+
 
|-
+
'''Parameters'''
! [[#M685_Set_Power_on_Air|M685]]
+
 
| Yes || Activate Air
+
  '''Sn''' is the percentage (0-100; no default - if no Sn, no change)
|-
+
 
! [[#M689_Activate_Ext._Head|M689]]
+
'''Example 1'''
| Yes || Activate Ext. Head
+
 
|-
+
  M689 S100
! [[#M701_Set_Head_Reporting|M701]]
+
 
| Yes || Set Head Reporting
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M702_-_M704_Cloning_Heads|M702]]
+
* '''M689''' (Ext. Head value)
| Yes || Establish Clone Squad
+
** '''S100''' (set to 100%)
|-
+
 
! [[#M702_-_M704_Cloning_Heads|M703]]
+
'''Example 2'''
| Yes || Add to Clone Squad
+
 
|-
+
  M689 S25
! [[#M702_-_M704_Cloning_Heads|M704]]
+
 
| Yes || Remove from Clone Squad
+
This command is decoded and executed by the printer as follows:
|-
+
 
! [[#M718_Stop_Logging_to_File|M718]]
+
* '''M689''' (Ext. Head value)
| Yes || Stop Logging to File
+
** '''S25''' (set to 25%)
|-
+
 
! [[#M719_Start_Logging_to_File|M719]]  
+
'''Example 3'''
| Yes || Start Logging to File
+
 
|-
+
  M689 S0
! [[#M721_Set_Unprime_Values|M721]]
+
 
| Yes || Set Unprime Values
+
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M689''' (Ext. Head value)
 +
** '''S0''' (set to 0%)
 +
 
 +
<br>
 +
<hr>
 +
 
 +
=== M783 Tie Aux to Extrusion ===
 +
 
 +
M783 can tie some auxiliary port (like Aux 1, normally controlled by M7, or Aux 2, normally controlled by M8, etc.) to be powered (at 100%) during a certain head's extrusion. Some users use this so that they can print with Ultimus or Viscotec heads on our equipment. See also [[#M7_Set_Power_On_Aux_1|M7]] and [[#M8_Set_Power_On_Aux_2|M8]].
 +
 
 +
Note: M619 can be used to map which port M783 ties to - contact us for more information.
 +
 
 +
'''Usage'''
 +
 
 +
  M783 T#  
 +
 
 +
'''Parameters'''
 +
 
 +
  '''T#''' is the tool to which the designated aux port will be tied
 +
 
 +
'''Example'''
 +
 
 +
  M783 T#
 +
 
 +
This command is decoded and executed by the printer as follows:
 +
 
 +
* '''M783''' (Tie current Aux port to status of head)
 +
** '''T#''' (target head)
 +
 
 +
<br>
 +
<hr>
 +
 
 +
 
 +
'''[[#What_is_GCode.3F|Back to top]]'''
 +
 
 +
== '''Other Commands''' ==
 +
 
 +
{| border="1" class="wikitable" style="float:right"
 +
! colspan="3" | Other Commands
 
|-
 
|-
! [[#M722_Set_Prime_Values|M722]]
+
! Code
| Yes || Set Prime Values
+
! Supported
 +
! Brief Description
 
|-
 
|-
! [[#M723_Set_Manual_Flow|M723]]  
+
! [[#M17_Engage_Motors|M17]]  
| Yes || Set Manual Flow
+
| Yes || Engage Motors
 
|-
 
|-
! [[#M728_Set_Motor_Current_Boost|M728]]  
+
! [[#M18_Disengage_Motors|M18]]  
| Yes || Set Motor Current Boost
+
| Yes || Disengage Motors
 
|-
 
|-
! [[#M756_Set_Height_for_Flow|M756]]  
+
! [[#M30_End_of_Program|M30]]  
| Yes || Set Height for Flow
+
| Yes || End of Program
 
|-
 
|-
! [[#M772_Reset_All_Metrics|M772]]  
+
! [[#M84_Disable_Motors|M84]]  
| Yes || Reset All Metrics
+
| Yes || Disable Motors
|-
 
! [[#M773_Generate_Basic_Report|M773]]
 
| Yes || Generate Basic Report
 
|-
 
! [[#M783_Tie_Aux_to_Extrusion|M783]]
 
| Yes || Tie Aux to Extrusion
 
 
|-
 
|-
 
! [[#M790_New_Layer_Actions|M790]]  
 
! [[#M790_New_Layer_Actions|M790]]  
Line 3,430: Line 3,966:
 
|-
 
|-
 
|}
 
|}
 +
 +
Other commands.
 +
 +
=== M17 Engage Motors ===
 +
 +
M17 will apply power to all motors (positioning and extruder motors), locking them at their current postion; this prevents the bed and yoke from being pushed manually in the X and Y.
 +
 +
Note that an '''M18''' or '''M84''' will disengage motors on ESR and 30M models, but 16A and EHR models use different controllers, and these commands do not unlock the motors. On a 16A or a 30M, you may engage the emergency stop for the same effect.
 +
 +
'''Usage'''
 +
 +
  M17
 +
 +
'''Parameters'''
 +
 +
  N/A
 +
 +
'''Example'''
 +
 +
  M17
 +
 +
This command is decoded and executed by the printer as follows:
 +
 +
* '''M17''' (engage motors)
 +
 +
<br>
 +
<hr>
 +
 +
=== M18 Disengage Motors ===
 +
 +
M18 will cut power to all motors (positioning and extruder motors), unlocking them; this allows the motors to cool down (as they normally lock in place while still), as well as allowing one to manually push the bed and yoke in the X and Y. It also notifies the GUI that motors are disabled. All axes with homes must be rehomed after an M18.
 +
 +
Note this is identical to '''M84''' and the opposite of '''M17'''.
 +
 +
Note that an '''M18''' or '''M84''' will disengage motors on ESR and 30M models, but 16A and EHR models use different controllers, and these commands do not unlock the motors. On a 16A or a 30M, you may engage the emergency stop for the same effect.
 +
 +
'''Usage'''
 +
 +
  M18
 +
 +
'''Parameters'''
 +
 +
  N/A
 +
 +
'''Example'''
 +
 +
  M18
 +
 +
This command is decoded and executed by the printer as follows:
 +
 +
* '''M18''' (disengage motors)
 +
 +
<br>
 +
<hr>
 +
 +
=== M30 End of Program ===
 +
 +
M30 tells the printer that this job is complete. No gocde after an M30 will be executed as part of the previous job.
 +
 +
Note M30 also dissolves any cloning setups, changes head index to 0, clears fixture offsets (G53), clears any M229 E-value settings, resets M106 persistent range, resets any printing errors, resets M660 head offsets to 0, resets heads to their stored values, and triggers any queued reports.
 +
 +
'''Usage'''
 +
 +
  M30
 +
 +
'''Parameters'''
 +
 +
  N/A
 +
 +
'''Example'''
 +
 +
  M30
 +
 +
This command is decoded and executed by the printer as follows:
 +
 +
* '''M30''' (end or program)
 +
 +
<br>
 +
<hr>
 +
 +
=== M84 Disable Motors ===
 +
 +
M84 invokes an M18. Please see M18 for usage.
 +
 +
Note that an '''M18''' or '''M84''' will disengage motors on ESR and 30M models, but 16A and EHR models use different controllers, and these commands do not unlock the motors. On a 16A or a 30M, you may engage the emergency stop for the same effect.
 +
 +
<br>
 +
<hr>
 +
 +
=== M790 New Layer Actions ===
 +
 +
M790 will trigger any associated new layer actions, which can include capturing an image from the designated camera. It takes no parameters.
 +
 +
=== M791 Snap Image ===
 +
 +
M791 will cause the camera selected under the Interface > Camera1 tab, if set to live video, to capture an image and save it to <code>C:\Users\hyrel\Pictures\HyrelPrinterPictures\Camera1</code>, named <code>pic#.png</code>
 +
 +
=== M792 Execute Action ===
 +
 +
M792 causes Repetrel to perform an action, such as displaying an image or making a warning beep.
 +
 +
'''Usage'''
 +
 +
  M792 [ SAY | PIC | VID | SEND | BEEP | SHELL ]
 +
 +
'''Parameters'''
 +
 +
  '''SAY sample message''' - the computer will use built-in text-to-speech to echo the message over the speaker(s)
 +
  '''PIC C:\sample.jpg''' - the computer will display the image at the specified location
 +
  '''VID C:\sample.mp4''' - the computer will play the video at the specified location
 +
  '''SEND sample message''' - the computer will send the message to the Aux port if connected
 +
  '''BEEP''' - the computer will sound a beep
 +
  '''SHELL C:\program.exe''' - the computer will execute the file at the specified location
 +
 +
Note that multiple options can be combined.
 +
 +
'''Example'''
 +
 +
  M792 ; SAY Hello Wilbur ; PIC C:\mr_ed.png
 +
 +
This command is decoded and executed by the printer as follows:
 +
 +
* '''M792''' (execute action)
 +
** '''SAY Hello Wilbur''' (Announce Text: Hello Wilbur)
 +
** '''PIC C:\mr_ed.png''' (Display Image: C:\mr_ed.png)
 +
 +
<br>
 +
<hr>
  
 
'''[[#What_is_GCode.3F|Back to top]]'''
 
'''[[#What_is_GCode.3F|Back to top]]'''
 +
 +
== Gcode Header ==
 +
 +
Here are some sample headers for Gcode on our equipment:
 +
 +
=== 16A, T1, Heated ===
 +
 +
Below is our standard header for using a heated head in the second slot with a heated bed on a 16A:
 +
 +
  ; ///////////////  BEGIN HYREL HEADER for a 16A with a Heated Head in T1/T12 - 2021.02.24  \\\\\\\\\\\\\\\
 +
 
 +
  ; GENERAL :
 +
 
 +
  N14                ; set line numbers for error logging - Slic3r version
 +
  M772 S1            ; reset metrics and arm automatic reporting
 +
  M627 X0 Y0 Z0 J-500 K5                ; setup abort action
 +
 
 +
 
 +
  M107              ; fans/UV          ; off
 +
  M106 C255          ; fans/UV          ; set to 0-255 range
 +
 
 +
  G53                ; clear offsets
 +
  G21                ; units            : mm
 +
  G91                ; coordinatess      : relative
 +
  G0 Z10           ; drop bed
 +
  G90                ; coordinates      : absolute
 +
 
 +
  M229 E1 D1        ; enable E-values (volumetric)
 +
 
 +
  ; TEMP CONTROL :
 +
 
 +
  M190 S100          ; bed preheat  : set and wait
 +
  M140 S[bed_temperature]          ; bed temp    : set, no wait
 +
  M104 T12 S[temperature]      ; head temp    : set, no wait
 +
 
 +
  G28 X0 Y0          ; home, goto  : X and Y
 +
 
 +
  M190 S[bed_temperature]          ; bed temp    : set and wait
 +
  M109 T12 S[temperature]      ; head temp    : set and wait
 +
 
 +
  T1                ; use SECOND tool position from the left   
 +
 
 +
  ; \\\\\\\\\\\\\\\  END HYREL HEADER for a 16A with a Heated Head in T1/T12 - 2021.02.24  ///////////////</code>
 +
 +
=== 30M and ESR, T1, Heated ===
 +
 +
Below is our standard header for using a heated head in the second slot with a heated bed on a 16A:
 +
 +
  ; ///////////////  BEGIN HYREL HEADER for a 30M/ESR with an Unheated Head in T0/T11 - 2021.02.24  \\\\\\\\\\\\\\\
 +
 
 +
  ; GENERAL :
 +
 
 +
  N14                ; set line numbers for error logging - Slic3r version
 +
  M772 S1            ; reset metrics and arm automatic reporting
 +
  M627 X0 Y0 Z0 J-500 K5                ; setup abort action
 +
 
 +
 
 +
  M107              ; fans/UV          ; off
 +
  M106 C255          ; fans/UV          ; set to 0-255 range
 +
 
 +
  G53                ; clear offsets
 +
  G21                ; units            : mm
 +
  G91                ; coordinatess      : relative
 +
  G0 Z10           ; drop bed
 +
  G90                ; coordinates      : absolute
 +
 
 +
  G28 Z0            ; home, goto        : Z (ignored if no Z home)
 +
  G28 X0 Y0          ; home, goto        : X and Y
 +
 
 +
  M229 E1 D1        ; enable E-values (volumetric)
 +
 
 +
  ; TEMP CONTROL :
 +
 
 +
  ;M190 S[bed_temperature]          ; bed temp    : set and wait    <= COMMENTED OUT
 +
  ;M109 T11 S[temperature]        ; head temp    : set and wait    <= COMMENTED OUT
 +
 
 +
  T0                ; use FIRST tool position from the left   
 +
 
 +
  ; \\\\\\\\\\\\\\\  END HYREL HEADER for a 30M/ESR with an Unheated Head in T0/T11 - 2021.02.24  ///////////////
 +
 +
== Gcode Footer ==
 +
 +
=== Standard, All Models ===
 +
 +
Below is our standard Gcode footer, which should be at the end of all your gcode files:
 +
 +
  ; ///////////////  BEGIN HYREL STANDARD FOOTER - 2021.02.12  \\\\\\\\\\\\\\\
 +
 
 +
  ; temp control:
 +
 
 +
 
 +
  M107 T100      ; fans, diodes  : off
 +
  M620 T100 E0    ; CO2 lasers    ; off
 +
  M104 T100 S0    ; head temps    : off
 +
  M140 T90 S0    ; bed temps    : off
 +
  M5              ; spindles      : off
 +
 
 +
  ; housekeeping
 +
 
 +
  G91            ; coordinates  : relative
 +
  G0 Z10          ; drop bed
 +
  G90            ; coordinates  : absolute
 +
  G0 Y0          ; home, goto    : Y axis
 +
  G0 X0          ; home, goto    : X axis
 +
  M84            ; motors        : disable
 +
  G53            ; clear offsets
 +
  M30            ; program      : end
 +
 
 +
  ; \\\\\\\\\\\\\\\  END HYREL STANDARD FOOTER - 2021.02.12  ///////////////

Revision as of 14:28, 6 March 2024



Main Sections
What is GCode?
Understanding the T
Most Commonly Edited GCodes
Controlling Movement
Controlling Temperature
Controlling Material Flow
Controlling Position and Offsets
Controlling Lasers and UV Pens
Controlling Spindles and Lathes
Reporting and Diagnostics
Controlling Aux Devices
Other Commands
Gcode Headers
Gcode Footer

Note: Codes in Black are supported on version 4 and above (v4+), and most likely on version 3 as well.

Note: Codes in Orange are supported on version 5 and above (v5+) only.

Note that Repetrel versions prior to 4.2 can not properly process gcode with "tab" characters - tab was a reserved character.

What is GCode?

Everything your Hyrel 3D Printer does is done by executing GCode, whether you are aware of it or not.

Every button you press on the screen sends a gcode to the printer.

When you start a job (by pressing "Print"), the settings from your head are sent to the printer (including flow and prime/unprime values); then the gcode file is sent, line by line, to the printer.

All parameters are persistent, so once they are set, they will remain in place unless or until you (or the file) sends a new, updated value (including setting to 0).

Please note that there are many flavors of gcode, and while most have the same (or very similar) G0-G100 and M0-M100, codes above 100 are largely nonstandard.

It is important to remember that different variable letters can have different meanings, depending on the G- or M- code being used - especially the T value.

The Table of Contents to the right lists the main categories of Gcodes.

Below is a table listing them in numerical order (click Expand to expand):

Code_Chart
Code Supported Brief Description
G0 Yes Rapid Move
G1 Yes Working Move
G2 Yes Clockwise Arc
G2.1 Yes Spiral CW Arc1
G2.2 Yes Spiral CW Arc2
G2.3 Yes 3-Space CW Spiral Arc
G3 Yes Counterclockwise Arc
G3.1 Yes Spiral CCW Arc1
G3.2 Yes Spiral CCW Arc2
G3.3 Yes 3-Space CCW Spiral Arc
G4 Yes Timed Pause
G10 No Absolute E
G11 No Relative E
G16 Yes Arc in Any Plane
G17 Yes Arc in XY Plane
G18 Yes Arc in XZ Plane
G19 Yes Arc in YZ Plane
G20 Yes Set Units to Inches
G21 Yes Set Units to Milimeters
G28 Yes Send X, Y to Physical Home
G53 Yes Clear Offsets
G54-59 Yes Set Offsets
G81 Yes Peck Drilling
G90 Yes Absolute Positioning
G91 Yes Relatative Positioning
G92 Yes Reset Coordinates
G93 Yes Reset Coordinates
M0 Yes Stop Until Resume
M3 Yes Spindle On CW
M4 Yes Spindle On CCW
M5 Yes Spindle Off
M6 Yes Declare Head Offsets
M7 Yes Aux 1 On (Mist)
M8 Yes Aux 2 On (Flood)
M9 Yes All Aux Off
M17 Yes Engage Motors
M18 Yes Disengage Motors
M30 Yes End of Program
M82 Yes Absolute E-Values
M83 Yes Relative E-Values
M84 Yes Disable Motors
M104 Yes Set Temp (Head)
M106 Yes Set Cooling / Etc.
M107 Yes Stop Cooling / Etc.
M109 Yes Wait for Temp (Head)
M116 v5+ Pause for All Temps
M140 Yes Set Temp (Bed)
M141 Yes Set Temp (Chamber)
M190 Yes Wait for Temp (Bed)
M191 Yes Wait for Temp (Chamber)
M203 Yes Set G0 Speed
M221 Yes Set Flow Rate
M229 Yes Use E Values
M253 Yes Turn On Lathe (CW)
M254 Yes Turn On Lathe (CCW)
M255 Yes Turn Off Lathe
M619 Yes Map Aux Port
M620 Yes Enable Device
M621 Yes Set Laser Power
M623 Yes Duration Emit
M660 Yes Set Tool Offsets
M670 Yes Enable Y-arm (Gantry) Lights
M671 Yes Activate X-Arm (Danger) Lights
M672 Yes Set Y-arm Light
M674 Yes Rapid G1 Moves
M675 Yes Activate Response LEDs
M676 Yes Activate Recirc. Fan
M677 Yes Activate Buzzer
M678 Yes Activate Laser X-hair
M679 Yes Activate Vacuum
M684 Yes Activate Exhaust
M685 Yes Activate Air
M689 Yes Activate Ext. Head
M701 Yes Set Head Reporting
M703 Yes Parallel Printing
M718 Yes Stop Logging to File
M719 Yes Start Logging to File
M721 Yes Set Unprime Values
M722 Yes Set Prime Values
M723 Yes Set Manual Flow
M728 Yes Set Motor Current Boost
M756 Yes Set Height for Flow
M772 Yes Reset All Metrics
M773 Yes Generate Basic Report
M783 Yes Tie Aux to Extrusion
M790 Yes New Layer Actions
M791 Yes Snap Image
M792 Yes Execute Action

Header Explained

Please visit GCode Header for a detailed description of our standard GCode headers.

Understanding the T

A T Command changes which head has the focus of the motion controller and is executing the gcode. Each of our printers have at least four tool positions.

The use of T commands and variables changes greatly (for the better) with the jump to version 5 from the previous versions.

Please see T_v4 for CURRENT (v4 and earlier) use, where the nomenclature for T Commands and the T Variables are not the same.

We will use a T# in the descriptions below to avoid confusion; please find the correct designation for your version by following the links above.

Most Commonly Edited Gcodes

Below are the gcodes users should first become familiar with.

Tool Changes

T0 tells the printer to perform extrusion (or emission) from the tool in the far left position
T1 tells the printer to perform extrusion (or emission) from the tool in the second-from-left position
T2 tells the printer to perform extrusion (or emission) from the tool in the third-from-left position
T3 tells the printer to perform extrusion (or emission) from the tool in the fourth-from-left position
T4 tells the printer to perform extrusion (or emission) from the tool in the fifth-from-left position (if available)

Movement

G0 for "rapid", non-printing moves
G1 for "working speed" moves, which may be printing (with E value) or non-printing (no E value)

Temperature

M104 to set head temp
M109 to set and wait for head temp
M140 to set bed temp
M190 to set and wait for bed temp

Others

Which commands to learn from here will depend on what the user intends to do with the equipment.

Controlling Movement

Controlling Movement
Code Supported Brief Description
G0 Yes Rapid Move
G1 Yes Working Move
G2 Yes Clockwise Arc
G2.1 Yes Spiral CW Arc1
G2.2 Yes Spiral CW Arc2
G2.3 Yes 3-Space CW Spiral Arc
G3 Yes Counterclockwise Arc
G3.1 Yes Spiral CCW Arc1
G3.2 Yes Spiral CCW Arc2
G3.3 Yes 3-Space CCW Spiral Arc
G4 Yes Timed Pause
G16 Yes Arc in Any Plane
G17 Yes Arc in XY Plane
G18 Yes Arc in XZ Plane
G19 Yes Arc in YZ Plane
M0 Yes Stop Until Resume
M203 Yes Set G0 Speed
M674 Yes Rapid G1 Moves

G0 Rapid Move

G0 is a rapid positioning move. It is not a working move, meaning that your equipment will not be printing, milling, lasering, or doing any other active work during a G0 move. G0 is intended to move your tool to a new position, where the work will happen. Accordingly, G0 movement speeds are set in your configuration settings, rather than being specified in your gcode file.

Special note: a G0 command will take an F variable as a nonpersistent, one-time velocity setting.

Usage

 G0 Xn Yn Zn An Bn Fn

Parameters

 Xn is the new X position to move to
 Yn is the new Y position to move to
 Zn is the new Z position to move to 
 An is the new A position to move to
 Bn is the new B position to move to
 Fn is the feed rate or travel speed to use. Only on G0 is it not persistent

Any values not stipulated remain unchanged.

Note: These positioning values can be absolute or relative to the last position; which depends on whether you are running on G90 absolute positioning or G91 relative positioning. Absolute is the default and should be used in the majority of cases.

Note: All Hyrel printers have built-in support for three axes. Hyrel model 16A and EHR printers may be expanded to five; an additional axis on each machine is reserved for E values.

Example

 G0 X50 Y75 Z10

This command is decoded and executed by the printer as follows:

  • G0 (rapid (nonprinting) straight line move from the current location to)
    • X50 (50mm in the X)
    • Y75 (75mm in the Y)
    • Z10 (10mm in the Z)
    • (no change in A)
    • (no change in B)
    • (no change in F, use settings-specified feed rate)



G1 Working Move

G1 is a working move, during which you may be printing, milling, lasering, or doing other active work - provided an E (extrude) value is given. In native mode (if you don't add M229 E1 Dn, the value of Extrusion rate E will be ignored, but E will trigger a working or printing move. In E-value mode (by adding M229 E1 Dn, the slicer-determined E value will be used to control material flow. G1 moves are made at the rate indicated by the F (feed rate) value; if no F value is specified, the last F value set will be used. See M229 for more details.

Usage

 G1 Xn Yn Zn An Bn Fn Sn En

Parameters

 Xn is the new X position to move to
 Yn is the new Y position to move to
 Zn is the new Z position to move to 
 An is the new A position to move to
 Bn is the new B position to move to
 En is the cumulative E axis (extrusion) position to move (or advance) to
 Hn is the stored head offset to apply (see M660 to store offsets)
 Fn is the feed rate or travel speed to use. Only on G0 is it not persistent
 Sn is a one-time (non-persistent) material flow rate multiplier (rarely used) applied to this move only

Any values not stipulated remain unchanged.

Note: These positioning values can be absolute or relative to the last position; which depends on whether you are running on G90 absolute positioning or G91 relative positioning. Absolute is the default and should be used in the majority of cases; there will be problems with an entire model sliced in relative mode. Relative is intended for special operations like drilling holes.

Note: All Hyrel printers have built-in support for three axes. Hyrel model 16A and EHR printers may be expanded to five; an additional axis on each machine is reserved for E values.

Example

 G1 X50 Y75 E1 F1800 H2

This command is decoded and executed by the printer as follows:

  • G1 (working speed straight line move from the current location to)
    • X50 (50mm in the X)
    • Y75 (75mm in the Y)
    • (no change in A)
    • (no change in B)
    • E1 (while extruding)
    • F1800 (moving at 1800mm/min)
    • H2 (invoking offsets stored in register H2)
    • (no temporary scaling)



G2 Clockwise Arc

A G2 move specifies a clockwise arc (or complete circle) from the current position to position (X,Y,Z)curr by following an arc about the center point (Xcurr+I, Ycurr+J).

Usage

 G2 Xn Yn Zn In Jn Fn En Sn

Parameters

 Xn is the new X position to move to
 Yn is the new Y position to move to
 Zn is the new Z position to end at (optional and usually not stipulated)
 In is the relative distance from the current X position to the center position about which to arc (default 0)
 Jn is the relative distance from the current Y position to the center position about which to arc (default 0)
 Fn is the Feed rate (travel speed) at which to execute this move.
 En indicates a working or printing move
 Sn dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
   S values less than 3.0 dictate the length in mm of each segment for this element
   S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°

Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.

Example

 G2 X50 Y75 I15 J20 E1 F1800

This command is decoded and executed by the printer as follows:

  • G2 (working speed clockwise arc/circle move from the current location to)
    • X50 (50mm in the X)
    • Y75 (75mm in the Y)
    • (centered about a point located)
    • I15 (15mm further in the X)
    • J20 (20mm further in the Y)
    • E1 (while extruding)
    • F1800 (moving at 1800mm/min)

Example

 G2 X50 Y75 I15 J20 E1 S6

This command is decoded and executed by the printer as follows:

  • G2 (working speed clockwise arc/circle move from the current location to)
    • X50 (50mm in the X)
    • Y75 (75mm in the Y)
    • (centered about a point located)
    • I15 (15mm further in the X)
    • J20 (20mm further in the Y)
    • E1 (while extruding)
    • (using previously established F rate)
    • S6 (made up of six sides - resulting in a hexagon with one point at the origin, with all corners inscribed on the circle)

Further Examples

90°
G2-1.png

180°
G2-2.png

270°
G2-3.png

360°
G2-4.png
Note, if no endpoints are defined, G2 will make a 360° circle by default.

And since this can be a lot to take in, please feel fre to play around with Repetrel's built-in Arc/Spiral tool:

Arctool1.png




G2.1 Spiral CW Arc1

A G2.1 makes a spiral circular move (only supports full 360 arcs, or Ln * 360). This arc is CW if spiraling in and CCW if spiraling out. Effective ending X/Y is always the same as the current XY and is not specified (though the actual final position is a function of the number of laps, the pitch, and the reverse code. An end Z can be supplied to have a uniform displacement during the move. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs). An important feature is the "reverse code" to allow the creation of frog toes without having to jump over the frog toe once it's made.

Usage

 G2.1 Zn In Jn Pn Ln En Sn Rn Fn

Parameters

 Zn is the new Z position to end at (optional and usually not stipulated; will be relative or absolute, depending on current mode)
 In is the relative distance from the current X position to the center position about which to arc (default 0)
 Jn is the relative distance from the current Y position to the center position about which to arc (default 0)
   Note: In and Jn both default to 0, but at least one of them must be explicitly declared with a non-zero value.
 Pn is the pitch (how close the laps are) in mm (required)
 Ln is the number of laps to complete (must be a positive integer; you don't need to finish the spiral)
 En indicates a working or printing move
 Sn dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
   S values less than 3.0 dictate the length in mm of each segment for this element
   S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°
 Rn is a flag; 0 to spiral in (default), 1 to spiral out (after inward jump), 2 spiral out from current position
 Fn is the Feed rate (travel speed) at which to execute this move.

Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.

Example 1

 G2.1 I15 J20 P1.2 E1

This command is decoded and executed by the printer as follows:

  • G2.1 (working speed clockwise spiral move from the current location)
    • (no change in Z)
    • (centered about a point located)
    • I15 (15mm further in the X)
    • J20 (20mm further in the Y)
    • (complete all laps)
    • P1.2 (1.2 mm between centers of travel of adjacent laps)
    • E1 (while extruding)
    • (use default S of 0.33333 mm segments)
    • (use default R of 0, spiral in toward center from current location)
    • (moving at established G1 F speed)

Example 2

 G2.1 Z10 I15 J20 P0.5 L50 E1 S9 R1 F1200

This command is decoded and executed by the printer as follows:

  • G2.1 (working speed clockwise spiral move from the current location)
    • Z10 (change Z position incrementally during move to end at Z10 (relative or absolute, depending on current mode))
    • (centered about a point located)
    • I15 (15mm further in the X)
    • J20 (20mm further in the Y)
    • L50 (complete no more than 50 laps)
    • P0.5 (0.5 mm between centers of travel of adjacent laps)
    • E1 (while extruding)
    • S9 (each 360 degrees composted of a total of 9 segments)
    • R1 (spiral out from center to current location)
    • F1200 (at a speed of 1200 mm/min)

Example 3

 G0 X0 Y25                   ; start location for outer spiral
 G0 Z1                       ; go to print layer height
 G2.1 I25 J0 P4 L3 E1        ; spiral in 3 laps, 4mm pitch 
 G1 X14 E1                   ; add connector for the arcs
 G2.1 I11 J0 P4 L3 E1 R2     ; spiral out 3 laps, 4mm pitch

This gcode generates the following:

Spiral.png

And since this can be a lot to take in, please feel fre to play around with Repetrel's built-in Arc/Spiral tool:

Arctool2.1.png




G2.2 Spiral CW Arc2

A G2.2 makes a spiral circular move (only supports full 360 arcs, or Ln * 360). This arc is CW if spiraling in and CCW if spiraling out. Unlike G2.1, G2.2 specifies final X/Y (and Z) location. An end Z can be supplied to have a uniform displacement during the move. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs). Unlike G2.1, G2.2 does not require a reverse code as the direction of spiral is determined by the positional relationship of the current position, final position, and center position.

Usage

 G2.2 Xn Yn Zn In Jn Pn Ln En Sn Rn Fn

Parameters

 Xn is the new X position to move to
 Yn is the new Y position to move to
 Zn is the new Z position to end at (optional and usually not stipulated; will be relative or absolute, depending on current mode)
 In is the relative distance from the current X position to the center position about which to arc (default 0)
 Jn is the relative distance from the current Y position to the center position about which to arc (default 0)
   Starting with Motion Controller firmware 4.203a:
   If I and J are both zero (center = start), path will spiral outward CCW from current to final position.
   If I and J match the end (center = end), path will spiral inward CW from current to final position."
 Pn is the pitch (how close the laps are) in mm (optional)
 Ln is the number of laps (or paths) to complete (you don't need to finish the spiral)
   Note, if P and L values conflict, L will be modified to match what P will allow; at least one must be specified
 En indicates a working or printing move
 Sn dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
   S values less than 3.0 dictate the length in mm of each segment for this element
   S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°
 Fn is the Feed rate (travel speed) at which to execute this move.

Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.

Example 1

 G2.2 I15 J20 P1 E1

This command is decoded and executed by the printer as follows:

  • G2.2 (working speed clockwise spiral move from the current location)
    • (no change in Z)
    • (centered about a point located)
    • I15 (15mm further in the X)
    • J20 (20mm further in the Y)
    • P2 (1mm between centers of travel of adjacent laps)
    • (complete all laps)
    • E1 (while extruding)
    • (use default S of 0.33333 mm segments)
    • (moving at established G1 F speed)

Example 2

 G2.2 Z10 I15 J20 P2 L50 E1 S9 F1200

This command is decoded and executed by the printer as follows:

  • G2.2 (working speed clockwise spiral move from the current location)
    • Z10 (change Z position incrementally during move to end at Z10 (relative or absolute, depending on current mode))
    • (centered about a point located)
    • I15 (15mm further in the X)
    • J20 (20mm further in the Y)
    • P2 (2mm between centers of travel of adjacent laps)
    • L50 (complete no more than 50 laps)
    • E1 (while extruding)
    • S9 (each 360 degrees composted of a total of 9 segments)
    • F1200 (at a speed of 1200 mm/min)

Example 3

 G0 X0 Y25                   ; start location for outer spiral
 G0 Z1                       ; go to print layer height
 G2.2 X12 I25 P4 E1          ; spiral in 3 laps, 4mm pitch
 G1 X14 E1                   ; add connector to next spiral
 G2.2 X2 I11 P4 E1           ; spiral out 3 laps, 4mm pitch

This gcode also generates the following:

Spiral.png



G2.3 3-Space CW Arc

A G2.3 move specifies a clockwise arc (or complete circle(s) from the current position to position (X,Y,Z)curr following a circular arc about the center point (Xcurr+I, Ycurr+J, Zcurr+K). Unlike G2, G2.1 and G2.2, G2.3 is not bound to the X/Y plane. The number of full 360 arcs can be specified as well as the pitch (centerline between arcs). Usage

 G2.3 Xn Yn Zn An Bn In Jn Kn Un Vn Wn Dn Pn En Sn Fn

Note: If we are in G16 mode, Un, Vn, Wn define the vector normal to the work plane. If we are in G17 (X/Y plane) or G18 (X/Z plane) or G19 (Y/Z plane) mode, these are ignored.

Parameters

 Xn is the new X position to end at
 Yn is the new Y position to end at
 Zn is the new Z position to end at
 An is the new A position to end at (4th axis)
 Bn is the new B position to end at (5th axis)
 In is the relative distance from the current X position to the center position about which to arc (default 0)
 Jn is the relative distance from the current Y position to the center position about which to arc (default 0)
 Kn is the relative distance from the current Z position to the center position about which to arc (default 0)
   Note: In, Jn, and Kn all default to 0, but at least one of them must be explicitly declared with a non-zero value.
 Un is the X component of a vector normal to the working plane (default 0)
 Vn is the Y component of a vector normal to the working plane (default 0) 
 Wn is the Z component of a vector normal to the working plane (default 0)
 Dn is the overall displacement normal to the working plane for this element
 Pn is the pitch (how close the laps are normal to the working plane) in mm (default 0; one path, no incremental displacement)
 En indicates a working or printing move
 Sn dictates how many segments are used to create the arc (or circle); 0.33333 mm is the default value
   S values less than 3.0 dictate the length in mm of each segment for this element
   S values of 3.0 or more dictate how many total segments comprise this element - only allowed on complete circles of 360°
 Fn is the Feed rate (travel speed) at which to execute this move.

Any values not stipulated remain unchanged. We will print this element with our native Hyrel flow calculations (based on nozzle diameter, layer thickness, and feed rate) even if your gcode has enabled the use of E values with M229 E1 D1.



G3 Counterclockwise Arc

Please refer to G2, above, for details. All options are identical, with the exception of direction (CCW).

Further Examples

90°
G3-1.png

180°
G3-2.png

270°
G3-3.png

360°
G3-4.png
Note, if no endpoints are defined, G3 will make a 360° circle by default.



G3.1 Spiral CCW Arc1

Please refer to G2.1, above, for details. All options are identical, with the exception of direction (CCW if spiraling in and CW if spiraling out).



G3.2 Spiral CCW Arc2

Please refer to G2.2, above, for details. All options are identical, with the exception of direction (CCW if spiraling in and CW if spiraling out).



G3.3 3-Space CCW Arc

Please refer to G2.3, above, for details. All options are identical, with the exception of direction (CCW).



G4 Timed Pause

G4 is a pause for a set number of seconds (S) or milliseconds (P).

You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.

Usage

 G4 Sn Pn

Parameters

 Sn is the number of Seconds to pause
 Pn is the number of Milliseconds to pause

You may use S or P, or if you use both, the total value will be the pause duration.

Example

 G4 S0.5

This command is decoded and executed by the printer as follows:

  • G4 (Timed pause)
    • S0.5 (0.5 seconds)

Example

 G4 P500

This command is decoded and executed by the printer as follows:

  • G4 (Timed pause)
    • P500 (500 milliseconds)



G16 Arc Plane: Any

G16 permits free-form designation of points in space, without limiting them to an axial plane.

G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.

Usage

 G16

Parameters

 N/A

Example

 G16

This command is decoded and executed by the printer as follows:

  • G16 (allow element in any orientation)



G17 Arc Plane: XY

G17 restricts this element to the X/Y plane.

G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.

Usage

 G17

Parameters

 N/A

Example

 G17

This command is decoded and executed by the printer as follows:

  • G17 (restrict element to X/Y plane)



G18 Arc Plane: XZ

G18 restricts this element to the X/Z plane.

G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.

Usage

 G18

Parameters

 N/A

Example

 G18

This command is decoded and executed by the printer as follows:

  • G18 (restrict element to X/Z plane)



G19 Arc Plane: YZ

G19 restricts this element to the Y/Z plane.

G16 through G19 only apply to G2.x and G3.x commands, and define the plane on which the element will be created.

Usage

 G19

Parameters

 N/A

Example

 G19

This command is decoded and executed by the printer as follows:

  • G19 (restrict element to Y/Z plane)



M0 Stop Until Resume

M0 is a stop until resume command; text listed after a semicolon will be displayed, and clicking the Play button (which replaces the Pause button) will cause the job to resume. Note that all lines will be truncated at 100 characters.

  • ; All text following the ; will be echoed to the print mask (Control Tab).

Additionally, an M0 command can also take the following parameters, and so will pause and then:

Usage

 M0 [ SAY | PIC | VID | SEND | BEEP | SHELL ]

Parameters

 SAY sample message - the computer will use built-in text-to-speech to echo the message over the speaker(s)
 PIC C:\sample.jpg - the computer will display the image at the specified location
 VID C:\sample.mp4 - the computer will play the video at the specified location
 SEND sample message - the computer will send the message to the Aux port if connected
 BEEP - the computer will sound a beep
 SHELL C:\program.exe - the computer will execute the file at the specified location

Note that multiple options can be combined.

Example

 M0

This command is decoded and executed by the printer as follows:

  • M0 (Pause until Resume)

Example

 M0 ; SAY Hello Wilbur ; PIC C:\mr_ed.png

This command is decoded and executed by the printer as follows:

  • M0 (Pause until Resume)
    • SAY Hello Wilbur (Announce Text: Hello Wilbur)
    • PIC C:\mr_ed.png (Display Image: C:\mr_ed.png)



M203 Set G0 Speed

M203 will redesignate the rate at which G0 movements are executed. If undeclared, the values stored in Repetrel for your equipment will be used. These can be changed under Settings > Printer, on the Printer tab. The values set on your unit are set based on testing; exceed them at your own risk.

Usage

 M203 Xn Yn Zn An Bn

Parameters

 Xn is the new speed in the X axis for G0 moves
 Yn is the new speed in the Y axis for G0 moves
 Zn is the new speed in the Z axis for G0 moves
 An is the new speed in the A axis for G0 moves
 Bn is the new speed in the B axis for G0 moves

Example

 M203 Y2000

This command is decoded and executed by the printer as follows:

  • M203 (Set G0 Speed)
    • (X remains unchanged)
    • Y2000 (Y axis: 2000mm/min)
    • (Z remains unchanged)
    • (A remains unchanged)
    • (B remains unchanged)



M674 Use Turbo Mode

M674 will enable Turbo Mode, where certain non-printing (no E value) working (G1, G2, or G3) moves will be treated as G0 moves (executed at "rapid move speed" rather than "working move speed"). Killing a job will clear the M674 setting.

Usage

 M674 Sn

Parameters

 Sn is the minimum distance threshold for Turbo Mode to activate, and is required; no S value returns an error.

Example 1

 M674 S2

This command is decoded and executed by the printer as follows:

  • M674 (Set Turbo Mode)
    • S2 (for moves of 2 mm or greater)

Example 2

 M674 S50

This command is decoded and executed by the printer as follows:

  • M674 (Set Turbo Mode)
    • S50 (for moves of 50 mm or greater)



Back to top

Controlling Temperature

Controlling Temperature
Code Supported Brief Description
M104 Yes Set Temp (Head)
M106 Yes Set Cooling / Etc.
M107 Yes Stop Cooling / Etc.
M109 Yes Wait for Temp (Head)
M116 v5+ Pause for All Temps
M140 Yes Set Temp (Bed)
M141 Yes Set Temp (Chamber)
M190 Yes Wait for Temp (Bed)
M191 Yes Wait for Temp (Chamber)

What's Hotbed 2 and Chamber 2? Well, our Hydra models have room to have a second hotbed, which could be a smaller, higher temperature hotbed, or a sub-ambient chilled bed, or even a High Resolution hotbed. And we've talked about having a smaller chamber inside the primary chamber, to bring the air around the print (but not the head) to much higher temperatures; call for details.



M104 Set Temp (Head)

M104 sets the extruder temperature but does not pause the printer.

Note that the actual T# values can be found on T_v4 or T_v5, depending on which version you are running.

Usage

 M104 Sn T#

Parameters

 Sn is the new set temperature in °C
 T# is the tool assignment for this temperature command

Example

M104 T# S75 

This command is decoded and executed by the printer as follows:

  • M104 (Set Temperature)
    • T# (target head)
    • S75 (to 75°C)



M106 Set Cooling / Etc.

M106 sets the cooling fan (or crosslinking LEDs) speed (or intensity). This also turns on the Quiet Storm fan.

Usage

 M106 Cn

or

 M106 T# Sn

or

 M106 T# Pn

Parameters

 T# is the target head
 Sn is the percent of duty cycle for the cooling fan (or LEDs); default: 100
 Cn is the range (0-100 or 0-255) that we will use; if unspecified, the default is C100 (use C255 to be compatible with most slicers)
 Pn is the percent of duty cycle for the cooling fan (or LEDs) to come on only during extrusion moves

Example

 M106 C255

This command is decoded and executed by the printer as follows:

  • M106 (Set Cooling/LEDs)
    • (on all tools)
    • (no speed)
    • C255 (of range 0-255)

Note, with this command, all following M106 commands for the rest of this print job will be based on this range (unless specified with a new C value).

Example

 M106 T# S50

This command is decoded and executed by the printer as follows:

  • M106 (Set Cooling/LEDs)
    • T# (target head)
    • S50 (target value of 50)
    • (previously defined (or default 0-100) range)

Example

M106 T# P100 

This command is decoded and executed by the printer as follows:

  • M106 (Set Cooling/LEDs)
    • T# (target head)
    • P100 (during extrusion moves at 100% duty cycle

But Davo, I want to cure a certain spot for 10 seconds with every layer change; how do I do this?

Easy. Edit your slicer recipe to add the following code after layer changes (edit as needed for duration, intensity, or position):

 ;---- BEGIN COD CODE
 G91 ; relative moves
 G0 Z5 ; drop bed
 G90 ; absolute moves
 G0 X130 Y110 ; move into position
 M106 S100 T# ; turn on T# UV at 100%
 G1 X140 Y110 F100 ; move 10 mm in the X at 100 mm/min
 G1 X140 Y120 F100 ; move 10 mm in the Y at 100 mm/min
 G1 X130 Y120 F100 ; move -10 mm in the X at 100 mm/min
 G1 X130 Y110 F100 ; move -10 mm in the Y at 100 mm/min
 M106 S0 T# ; turn off T# UV (set it to 0%)
 ;--- END COD GCODE

These commands are decoded and executed by the printer as follows:

  • G91 (Use relative moves)
  • G0 (Non-working move)
    • Z5 (+5 mm in the Z)
  • G90 (Use absolute moves)
  • G0 (Non-working move)
    • X130 (To position X130)
    • Y110 (To position Y110)
  • M106 (Set Aux (UV))
    • S100 (100% duty)
    • T# (On target head)
  • G1 (Working (printing) move)
    • X140 (To position X140)
    • Y110 (To position Y110
    • F100 (At 100 mm/min)
  • G1 (Working (printing) move)
    • X140 (To position X140)
    • Y120 (To position Y120
    • F100 (At 100 mm/min)
  • G1 (Working (printing) move)
    • X130 (To position X130)
    • Y120 (To position Y120
    • F100 (At 100 mm/min)
  • G1 (Working (printing) move)
    • X130 (To position X130)
    • Y110 (To position Y110
    • F100 (At 100 mm/min)
  • M106 (Set Aux (UV))
    • S0 (0% duty)
    • T# (On target head)



M107 Stop Cooling / Etc.

M107 turns off the cooling fan (or crosslinking LEDs); this is essentially the same as an M106 S0 (setting it to 0 percent). This will also turn off the Quiet Storm fan.

Usage

 M107 T#

Parameters

 T# (target head)

Example

M107 T#  

This command is decoded and executed by the printer as follows:

  • M107 (Set Cooling/LEDs to 0%)
    • T# (target head)



M109 Wait for Temp (Head)

M109 waits for the extruder to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) heads as options.

Note that the actual T# values can be found on T_v4 or T_v5, depending on which version you are running.

Usage

 M109 T# Sn Hn Cn Ln Un Rn W0

Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M109 command.

Note, this will FAIL (non-fatally) if you address a virtual group address; be sure to use an actual physical address.

Parameters

 T# is the target head - (required)
 Sn (optional) is the new set temperature in °C; if omitted, no new target temperature is set
 Hn if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
 Cn if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
 Ln if present, is the lower-end relative temperature difference from set temp after which we stop pausing
 Un if present, is the upper-end relative temperature difference from set temp after which we stop pausing
 Rn if present, is how close the relative temperature needs to be to the set temp to end the pause
 W0 if present, will set the temp and advance to the next line without pause, but upon executing M116, will pause until temp is reached

Think of Sn as the target temperature, but once the target is between Cn (or Ln) and Hn (or Un), the pause is over (but the Sn is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.

Example 1

 M109 T# S240

This command is decoded and executed by the printer as follows:

  • M109 (wait for temp)
    • T# (target head)
    • S240 (and set temp to 240°C)

Example 2

 M109 T# S240 R5

This command is decoded and executed by the printer as follows:

  • M109 (wait for temp)
    • T# (target head)
    • S240 (and set temp to 240°C)
    • R5 (but end the wait once the target's temperature is within 5°C of the set point)

Example 3

 M109 T# S240 H230

This command is decoded and executed by the printer as follows:

  • M109 (wait for temp)
    • T# (target head)
    • S240 (and set temp to 240°C)
    • H230 (but end the wait once the target's temperature reaches 230°C)

Example 4

 M109 T# S240 L10 U5

This command is decoded and executed by the printer as follows:

  • M109 (wait for temp)
    • T# (target head)
    • S240 (and set temp to 240°C)
    • L10 (but end the wait once the target's temperature reaches 10°C below the set point)
    • U5 (or end the wait once the target's temperature reaches 5°C above the set point)

Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C

Example 5

 M109 T# S0 R5

This command is decoded and executed by the printer as follows:

  • M109 (wait for temp)
    • T# (target head)
    • S0 (to 0°C)
    • R5 (but end the wait once the target's temperature is +/-5°C of the set temperature)

Example 6

 M109 R10
  • M109 (wait for temp)
    • (no T# - use head with current focus)
    • R10 (to get +/-10°C of set temperature)

Example 7

 M109 T# S240 W0

This command is decoded and executed by the printer as follows:

  • M109 (wait for temp)
    • T# (target head)
    • S240 (and set temp to 240°C)
    • W0 (but do not pause until M116 is executed)



M116 Wait for Temps (v5+)

M116 is supported with version 5.x and later (v5+) of Repetrel Software and Motion Controller Firmware.

Usage

 M116 

Parameters

 'none'

Example

 M116

This command is decoded and executed by the printer as follows:

  • M116 (wait for any set temps (M109, M190, M191) with W0 values before proceding



M140 Set Temp (Bed)

M140 sets the bed temperature (without waiting for the new temperature to be reached).

Usage

 M140 Sn T#

Parameters

 Sn is the new set temperature in °C
 T# is the target bed (default is the primary bed)

Example

M140 S75

This command is decoded and executed by the printer as follows:

  • M140 (set bed temperature)
    • S75 (to 75°C)
    • (on primary bed)



M141 Set Temp (Chamber)

M141 sets the chamber temperature (without waiting for the new temperature to be reached).

Usage

 M141 Sn T#

Parameters

 Sn is the new set temperature in °C
 T# is the target chamber (default is the primary chamber)

Example

M141 S75

This command is decoded and executed by the printer as follows:

  • M141 (set chamber temperature)
    • S75 (to 75°C)
    • (on primary chamber)



M190 Wait for Temp (Bed)

M190 waits for the bed to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) beds as options.

Usage

 M190 T# Sn Hn Cn Ln Un Rn

Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M190 command.

Note, this will FAIL (non-fatally) if you address a virtual group address; be sure to use an actual physical address.

Parameters

 T# (optional) is the target bed (default is the primary (or only) bed)
 Sn (optional) is the new set temperature in °C; if omitted, no new target temperature is set
 Hn if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
 Cn if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
 Ln if present, is the lower-end relative temperature difference from set temp after which we stop pausing
 Un if present, is the upper-end relative temperature difference from set temp after which we stop pausing
 Rn if present, is how close the relative temperature needs to be to the set temp to end the pause

Think of Sn as the target temperature, but once the target is between Cn (or Ln) and Hn (or Un), the pause is over (but the Sn is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.

Example 1

 M190 T# S240

This command is decoded and executed by the printer as follows:

  • M190 (wait for temp)
    • T# (target bed)
    • S240 (and set temp to 240°C)

Example 2

 M190 T# S240 R5

This command is decoded and executed by the printer as follows:

  • M190 (wait for temp)
    • T# (target bed)
    • S240 (and set temp to 240°C)
    • R5 (but end the wait once the target's temperature is within 5°C of the set point)

Example 3

 M190 T# S240 H230

This command is decoded and executed by the printer as follows:

  • M190 (wait for temp)
    • T# (target bed)
    • S240 (and set temp to 240°C)
    • H230 (but end the wait once the target's temperature reaches 230°C)

Example 4

 M190 T# S240 L10 U5

This command is decoded and executed by the printer as follows:

  • M190 (wait for temp)
    • T# (target bed)
    • S240 (and set temp to 240°C)
    • L10 (but end the wait once the target's temperature reaches 10°C below the set point)
    • U5 (or end the wait once the target's temperature reaches 5°C above the set point)

Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C

Example 5

 M190 T# S0 R5

This command is decoded and executed by the printer as follows:

  • M190 (wait for temp)
    • T# (target bed)
    • S0 (to 0°C)
    • R5 (but end the wait once the target's temperature is +/-5°C of the set temperature)

Example 6

 M190 R10
  • M190 (wait for temp)
    • (no T# - use bed with current focus)
    • R10 (to get +/-10°C of set temperature)



M191 Wait for Temp (Chamber)

M191 waits for the chamber to reach temperature, with an option to also set the temperature. Remember, we have both heated and chilled (sub-ambient) chambers as options.

Usage

 M191 T# Sn Hn Cn Ln Un Rn

Please use EITHER (H and/or C) OR (L and/or U) OR (R) with your M191 command.

Note, this will FAIL (non-fatally) if you address a virtual group address; be sure to use an actual physical address.

Parameters

 T# is the target chamber (default is the primary (or only) chamber)
 Sn (optional) is the new set temperature in °C; if omitted, no new target temperature is set
 Hn if present, is the low-end (or "heat up to") absolute temperature after which we stop pausing
 Cn if present, is the high-end (or "cool down to") absolute temperature after which we stop pausing
 Ln if present, is the lower-end relative temperature difference from set temp after which we stop pausing
 Un if present, is the upper-end relative temperature difference from set temp after which we stop pausing
 Rn if present, is how close the relative temperature needs to be to the set temp to end the pause

Think of Sn as the target temperature, but once the target is between Cn (or Ln) and Hn (or Un), the pause is over (but the Sn is still the set temp to reach. You can use Hn or Ln, but not both. You can use Cn or Un, but not both.

Example 1

 M191 T# S240

This command is decoded and executed by the printer as follows:

  • M191 (wait for temp)
    • T# (target chamber)
    • S240 (and set temp to 240°C)

Example 2

 M191 T# S240 R5

This command is decoded and executed by the printer as follows:

  • M191 (wait for temp)
    • T# (target chamber)
    • S240 (and set temp to 240°C)
    • R5 (but end the wait once the target's temperature is within 5°C of the set point)

Example 3

 M191 T# S240 H230

This command is decoded and executed by the printer as follows:

  • M191 (wait for temp)
    • T# (target chamber)
    • S240 (and set temp to 240°C)
    • H230 (but end the wait once the target's temperature reaches 230°C)

Example 4

 M191 T# S240 L10 U5

This command is decoded and executed by the printer as follows:

  • M191 (wait for temp)
    • T# (target chamber)
    • S240 (and set temp to 240°C)
    • L10 (but end the wait once the target's temperature reaches 10°C below the set point)
    • U5 (or end the wait once the target's temperature reaches 5°C above the set point)

Note: this wait ends when the target's temperature is anywhere between 230°C and 245°C

Example 5

 M191 T# S0 R5

This command is decoded and executed by the printer as follows:

  • M191 (wait for temp)
    • T# (target chamber)
    • S0 (to 0°C)
    • R5 (but end the wait once the target's temperature is +/-5°C of the set temperature)

Example 6

 M191 R10
  • M191 (wait for temp)
    • (no T# - use chamber with current focus)
    • R10 (to get +/-10°C of set temperature)



Back to top

Controlling Material Flow

Controlling Material Flow
Code Supported Brief Description
G10 No Absolute E
G11 No Relative E
M82 Yes Absolute E-Values
M83 Yes Relative E-Values
M221 Yes Set Flow Rate
M229 Yes Use E Values
M703 Yes Parallel Printing
M721 Yes Unprime or Retract
M722 Yes Prime or Advance
M723 Yes Set Manual Flow
M728 Yes Set Motor Current Boost
M756 Yes Set Height for Flow

You can specify flow rate variables in your gcode; we do not do this by default, but take these values from the head itself. Any values you stipulate in your gcode will supersede the values stored on the head. With our recipes the slicing program generates gcode which dictates temperature and movement commands and indicates which moves should dispense material (a G1 move with an E value).

However, we have two different ways to control flow.

  • If you use M229 E1 D1 we will use the E values generated by the slicer for printing moves, but we will always use the prime/unprime settings on the head for advancing and retracting when transitioning between printing and non-printing moves. This allows for varying extrusion widths and layer thicknesses (on the same layer - as with support material). This is how just about all slicers and printers work.
  • If you do not use that command, we do not use that E value (except to distinguish printing from non-printing moves) we calculate for flow based purely on travel speed, declared layer thickness, and nozzle diameter. This is explained at http://hyrel3d.net/wiki/index.php/Flow_Rate

When a head is loaded, it sends this flow data (how to calculate flow, as well as how much to prime and unprime (advance and retract) material when transitioning between printing and non-printing moves - and even how many primes or unprimes to do in conjunction with a tool change.

In this way, the very same gcode (with temperature changes) can be used with any material, provided you are using the same physical parameters that the model was sliced for.



G10 UNUSED1

G10 is not recognized by Repetrel.

On some other printers, this will set tool offsets; we do this via M6.

On some other printers, this will do a retract; we do this via M721.



G11 UNUSED

G11 is not recognized by Repetrel.

On some other printers, this will do an advance or unretract; we do this via M722.



M82 Absolute E-Values

M82 stipulates that henceforth, the extrusion positioning (E values) will be calculated from the original (0) point.

Note, this only works on v4 and later, when E values are enabled via M229.

Usage

 M82

Parameters

 N/A

Example

M82

This command is decoded and executed by the printer as follows:

  • M82 (use absolute E values)



M83 Relative E-Values

M83 stipulates that henceforth, the extrusion positioning (E values) will be calculated from the relative (last used) point.

Note, this only works on v4 and later, when E values are enabled via M229.

Usage

 M83

Parameters

 N/A

Example

 M83

This command is decoded and executed by the printer as follows:

  • M83 (use relative E values)



M221 Set Flow Rate

M221 sends information to the printer about material flow.

You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.

Note, our default mode is volumetric calculations; if you need to slice with linear calculations, multiply your Pn by approximately 2.4 (you can do the math).

Usage

 M221 Pn Sn Wn Zn T#

Parameters

 Pn is the number of pulses on the motor to dispense 1 μl of material;
 Sn is the direct flow multiplier (to allow for undersized or oversized stock;
 Wn is the width of the cross section of the volume to fill;
 Zn is the height (layer thickness) of the cross section of the volume to fill; and
 T# is the tool (head) to which these values will be applied.
 As always, any parameters not specified will be inherited from your environment.

Example

 M221 S1.0 T# P77 W0.5 Z0.3
 G4 P1

This command is decoded and executed by the printer as follows:

  • M221 (set flow rate)
    • S1.0 (flow multiplier of 1.0)
    • T# (target head)
    • P77 (77 pulses per microliter)
    • W0.5 (0.5mm nozzle)
    • Z0.3 (0.3mm layer thickness - note that your gcode M756 will overwrite this value)
  • G4 (timed pause)
    • P1 (one millisecond)



M229 Use E Values

Starting with version 4, Hyrel will begin to enable the use of E-values in your gcode. Variable extrusion width and support/infill thickness slicers, rejoice! Note, calculations are done for every single move individually.

Usage

 M229 En Dn Sn

Parameters

 En can be 0 (native flow calculation) or 1 (use E values)
 Dn how directed to head; see below
   D0 on head controller directly; constant flow, not adjusted for motion acceleration/deceleration
   D1 on motion controller, sent to head via CANBUS and adjusted for motion acceleration/deceleration
   D2 on motion controller, sent to head via C axis step pin and adjusted for motion acceleration/deceleration
   D3 on motion controller, sent to head via CANBUS and C axis and adjusted for motion acceleration/deceleration
 Sn sets a threshold in seconds; isolated non-printing moves below this threshold will not trigger unprime/prime actions

Note: E1 D0 is an illegal combination.

Example 1

 M229 E1 D1

This command is decoded and executed by the printer as follows:

  • M229 (E values)
    • E1 (enabled)
    • D1 (flow calculations directed via CANBUS and adjusted to motion acceleration/deceleration)

Above is the default way to enable E values.

Example 2

 M229 E0 D0

This command is decoded and executed by the printer as follows:

  • M229 (E values)
    • E0 (disabled)
    • D0 (flow calculations on head controller)

Above is the default way to ignore E values, and is how v3 and earlier releases work.

Example 3

 M229 E0 D1

This command is decoded and executed by the printer as follows:

  • M229 (E values)
    • E0 (disabled)
    • D1 (flow calculations directed via CANBUS and adjusted to motion acceleration/deceleration)

Example 4

 M229 E0 D0 S0.02

This command is decoded and executed by the printer as follows:

  • M229 (E values)
    • E0 (disabled)
    • D0 (flow calculations on head controller)
    • S0.02 (isolated non-printing moves of under 0.02 seconds will not trigger unprime/prime actions)



M703 Cloning/Parallel Printing

NOTE: M703 DOES NOT WORK WITH M229 E1 D1. YOU MUST USE M229 E0 D0, and use our native flow calculations instead of E values

Clone, slave, or parallel printing, is when one head makes a normal print, and another head makes the exact same print at the same time.

We will normally execute a T command first, to establish the primary or master head (generally the one to the left). Then the M703 command, cloning or slaving another head to the first.

Remember, this is how we address the tool positions; note that the 30M and ESR have four positions, not five. Counting from the leftmost position:

T Commands and T Variables for Standard Addresses
Command 1st Slot 2nd Slot 3rd Slot 4th Slot 5th Slot
Tool Change T0 T1 T2 T3 T4
Clone Address T11 T12 T13 T14 T15
Master Address S11 S12 S13 S14 S15

In the following example we have a five-position yoke; commands executed by the head in slot 1 (far left) will also be executed by the heads in both slot 3 (third from left) and slot 5 (fifth from left):

 T0
 M703 T13 S11
 M703 T15 S11

These commands are decoded and executed by the printer as follows:

  • T0 - Assign commands to Position 1 (the far left head on yoke 1)
  • M703 - Begin to Duplicate Commands:
    • T13 - Tool Position 3
    • S11 - Slave to Position 1
  • M703 - Begin to Duplicate Commands:
    • T15 - Tool Position 5
    • S11 - Slave to Position 1

Note that only Hydra (16A) and High Resolution Engine (EHR) units have five tool positions; other models have four only. See Understanding the T at the top of the Gcode page for tool position nomenclature.

    • S0.02 (isolated non-printing moves of under 0.02 seconds will not trigger unprime/prime actions)



M721 Set Unprime Values

M721 sends information to the printer about how much material to unprime (retract) when a transition from printing move to non-printing move is detected.

You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.

Usage

 M721 Sn En Pn T# In

Parameters

 Sn is the speed at which unprime moves should be executed; this is normally 10,000
 En is the number of pulses on the feed (extrusion) motor to execute; this varies greatly among materials
 Pn is the number of milliseconds prior to the end of the current printing move to begin the unprime (retract) action; a negative number initiates this before the end of the move
 T# is the target head
 In is the flag for executing an Immediate action; so M721 I1 would execute an unprime with the previously specified values at that point in the gcode.

Example 1

M721 S10000 E100 P-15 T#
G4 P1

This command is decoded and executed by the printer as follows:

  • M721 (unprime)
    • S10000 (set rate to 10,000 pps)
    • E100 (set pulses to 100)
    • P-15 (set dwell to 15ms before end of print move )
    • T# (on target head)
    • (but no immediate execution; execute when needed)
  • G4 (timed pause)
    • P1 (one millisecond)

Example 2

M721 T# I1
G4 P1

This command is decoded and executed by the printer as follows:

  • M721 (unprime)
    • T# (on target head)
    • I1 (now)
  • G4 (timed pause)
    • P1 (one millisecond)



M722 Set Prime Values

M722 sends information to the printer about how much material to prime (advance) when a transition from non-printing move to printing move is detected. This is done primarily to compensate for an earlier unprime (retract), to prep the head to be ready to dispense.

You should ALWAYS include a one millisecond pause (G4 P1) after changing flow parameters with M221, prime parameters with M722, or unprime parameters with M721.

Usage

 M722 Sn En Pn T# In

Parameters

 Sn is the speed at which unprime moves should be executed; this is normally 10,000
 En is the number of pulses on the feed (extrusion) motor to execute; this varies greatly among materials
 Pn is the number of milliseconds to dwell at the start of the next printing move to allow for the prime (advance) action
 T# is the target head
 In is the flag for executing an Immediate action; so M722 I1 would execute a prime with the previously specified values at that point in the gcode.

Example

M722 S10000 E100 P-15 T#
G4 P1

This command is decoded and executed by the printer as follows:

  • M721 (prime)
    • S10000 (set rate to 10,000 pps)
    • E100 (set pulses to 100)
    • P-15 (set dwell to 15ms before end of print move )
    • T# (on target head)
    • (but no immediate execution; execute when needed)
  • G4 (timed pause)
    • P1 (one millisecond)

Example

M722 T# I1
G4 P1

This command is decoded and executed by the printer as follows:

  • M722 (prime)
    • T# (on target head)
    • I1 (now)
  • G4 (timed pause)
    • P1 (one millisecond)



M723 Set Manual Flow

M723 tells the designated extruder(s) to advance material for the specified number of pulses (on the motor) at the specified rate, regardless of any X/Y/Z movement. It is normally used only during manual operation, not during gcode execution. It can be used after moving to a location to dispense a set amount of material (like depositing material into reservoirs). We recommend adding a timed pause (G4) after the extrusion command if you want to extrude without moving.

M723 is also used to activate and set speed on the stirring apparatus on the DMH dynamic mixing head.


Usage

 M723 Sn En T#

Parameters

 Sn is the speed at which the motor should advance, in pulses per second (default: 500);
 En is the number of pulses on the feed (extrusion) motor to execute (default of 65535 is essentially "forever");
 T# is the target head

Example

M723 S500 E50000 T#
G4 S5

This command is decoded and executed by the printer as follows:

  • M723 (start manual feed)
    • S500 (at 500 pulses per second)
    • E50000 (for 50000 pulses)
    • T# (target head)
  • G4 (Timed pause)
    • S3 (3 seconds)



M728 Set Motor Current Boost

M728 will set the motor current boost; default is 0.

Usage

 M728 Sn T#

Parameters

 Sn is the new set temperature in °C
 T# is the target head (or device)

Example

 M728 T# S0

This command is decoded and executed by the printer as follows:

  • M728 (set motor current boost)
    • T# (target head)
    • S0 (off)



M756 Set Height for Flow

M756 will overwrite the Z value from the M221 command, allowing you to calculate flow for thinner or thicker layers. We declare M756 at the beginning of every layer; normally, they are all the same (unless you sliced for varying layer thicknesses).

Note: this command is ignored if you are using M229 E1 D1 to enable use of E values.

Note: this does NOT change your Z position; see G0 or G1 for that.

Usage

 M756 Sn

Parameters

 Sn is the layer thickness in mm for flow calculations

Example

 M756 S0.125

This command is decoded and executed by the printer as follows:

  • M756 (set layer height for flow calculations)
    • S0.125 (at 0.125mm)



Back to top

Controlling Position and Offsets

Controlling Position and Offsets
Code Supported Brief Description
G10 No Set Offsets
G20 Yes Set Units to Inches
G21 Yes Set Units to Milimeters
G28 Yes Send to Physical Home
G53 Yes Clear Offsets
G54-59 Yes Set Offsets
G90 Yes Absolute Positioning
G91 Yes Relatative Positioning
G92 Yes Reset Coordinates
G93 Yes Reset Coordinates
M6 Yes Declare Head Offsets
M660 Yes Set Tool Offsets
M702-4 Yes Cloning Heads

DRAGGING A GCODE RENDERING AROUND ON THE PRINT BED DOES NOTHING IN EARLIER VERSIONS!
Either positiong the stl properly before slicing, or reposition the gcode with a G54 offset - read below.
.

The following commands define if new positioning data is defined in inches (G20) or mm (G21); or from the origin (G90) or from the present location (G91). They also stipulate the offsets from one head to another (M6), and how to invoke that offset (T).

G10 UNUSED2

G10 is not recognized by Repetrel.

On some other printers, this will set tool offsets; we do this via M6.

On some other printers, this will do a retract; we do this via M721.

G20 Set Units to Inches

G20 declares that henceforth, measurements will be given in inches.

Working with G20 is experimental and unsupported on Hyrel equipment. Use at your own risk.

Usage

 G20

Parameters

 N/A

Example

G20

This command is decoded and executed by the printer as follows:

  • G20 (set units to inches)



G21 Set Units to Millimeters

G21 declares that henceforth, measurements will be given in mm.

Usage

 G21

Parameters

 N/A

Example

G21

This command is decoded and executed by the printer as follows:

  • G21 (set units to milimeters)



G28 Send to Physical Home

G28 sends the specified axes to the sensor-defined physical home position, regardless of logically set 0,0, then pop-off and re-acquire the sensor threshold at a slower rate. This pop-off and re-acquire was implemented during v3.

After homing, a G28 also resets current offsets to 0 - including any may have been set with a G92 or an H (as defined in an M660 and invoked on a G1), performs a G53, and applies a head offset of 0 mm (as in an M6 O0).

Any axis not homed will have its position remain unchanged. We do not support intermediate positioning during homing.

Usage

 G28 Xn Yn Zn An Bn I1

Parameters

 X0 ensures that the X axis is homed
 Y0 ensures that the Y axis is homed
 Z0 ensures that the Z axis is homed
 A0 ensures that the A axis is homed
 B0 ensures that the B axis is homed

Example

 G28 X0 Y0

This command is decoded and executed by the printer as follows:

  • G28 (home axis)
    • X0 (X axis to 0)
    • Y0 (Y axis to 0)
    • (Z remains unchanged)
    • (A remains unchanged)
    • (B remains unchanged)



G53 Clear Offsets

G53 sets the fixture offsets to (0,0,0,0,0). This takes no arguments or variables. It does not clear stored offset values.

Usage

 G53

Parameters

 N/A

Example

G53

This command is decoded and executed by the printer as follows:

  • G53 (set fixture offsets to 0; no effect on H (head) offsets)



G54 - G59 - Set Offsets

G54, G55, G56, G57, G58, and G59 will each store and invoke fixture offsets in the X, Y, Z, A, and/or B axes for all subsequent moves. Any values not invoked will remain with their previous value (0 unless earlier specified otherwise). These offsets apply to all positioning until a new offset is applied, or a G53 is used to clear all offsets.

This graphic shows how printers (OTHER THAN THE EHR) use the G54-G59 offsets:

G54.png

Note that this differs from an M6, where the offsets are only applied to a SINGLE tool position. These offsets are cumulative with M6 values.

Usage

 G54 (... G59) Xn Yn Zn An Bn

Parameters

 Xn is the offset in mm in the X axis
 Yn is the offset in mm in the Y axis
 Zn is the offset in mm in the Z axis
 An is the offset in mm in the A axis
 Bn is the offset in mm in the B axis

Example

G54 X30 Y-20

This command is decoded and executed by the printer as follows:

  • G54 (set units to milimeters)
    • X30 (add 30mm to all X positions)
    • Y-20 (subtract 20mm from all Y positions)
    • (no change to prior stored offsets)

Example

G55

This command is decoded and executed by the printer as follows:

  • G55 (apply new fixture offsets)
    • (no variable: use previous G55 values, or as stored under Settings > Printer > Fixture Offsets)




G90 Absolute Positioning

G90 stipulates that henceforth, the positioning will be calculated from the origin (0,0 point).

Usage

 G90

Parameters

 N/A

Example

G90

This command is decoded and executed by the printer as follows:

  • G90 (use absolute positioning)



G91 Relatative Positioning

G91 stipulates that henceforth, the positioning will be calculated relative to the starting position.

Usage

 G91

Parameters

 N/A

Example

G91

This command is decoded and executed by the printer as follows:

  • G91 (use relative positioning)



G92 Reset Coordinate Offsets

G92 resets the current position to the specified coordinates for all axes enumerated.

Usage

 G92 Xn Yn Zn An Bn En

Parameters

 Xn is the new value for the current X position
 Yn is the new value for the current Y position
 Zn is the new value for the current Z position
 An is the new value for the current A position
 Bn is the new value for the current B position
 En is the new value for the current E position
 

Example

G92 X0 Y50

This command is decoded and executed by the printer as follows:

  • G92 (replace current values)
    • X0 (present X position is 0)
    • Y50 (present Y position is 50)

Example

G92 E0

This command is decoded and executed by the printer as follows:

  • G92 (replace current values)
    • E0 (present E position is 0)



G93 Clear Coordinate Offsets

G93 clears ALL offsets implemented via G92 command.

Usage

 G93

Parameters

 N/A

Example

G93

This command is decoded and executed by the printer as follows:

  • G93 (clear coordinate offset values, all axes)



M6 Declare Head Offsets

M6 declares that a particular head holds a set of X, Y, and/or Z offsets, which will be invoked during a T (tool change) command. Repetrel automatically reads this data from the information stored on the heads, and sends it to the printer before the gcode file is loaded.

Usage

 M6 T# On Xn Yn Zn An Bn Dn In Kn

Parameters

 T# is the Tool position for which these offsets are being set
 On is the Offset position where these are being stored
 Xn is the offset in the X axis
 Yn is the offset in the Y axis
 Zn is the offset in the Z axis
 An is the offset in the A axis
 Bn is the offset in the B axis
 Dn is the current tool diameter (used with pocket commands)
 In non-persistent; can be default 0 (store values but do not move these distances) or 1 (store values and move these distances)
 Kn persistent setting; can be default 0 (use I value) or 1 (ignore I1 and always act with I0)

Example

 M6 T# O1 X20 Y-30 Z40

This happens (for every head loaded) when you click print, and the head values are sent to the Motion Controller.

This command is decoded and executed by the printer as follows:

  • M6 (Declare Head Offsets)
    • T# (target head)
    • O1 (offset stored in register "O1")
    • X20 (X+20)
    • Y-30 (Y-30)
    • Z40 (Z+40)
    • (no change to A)
    • (no change to B)
    • (no diameter change)
    • (no move)

Example

 M6 T# O1 X20 Y-30 Z40 I1

This happens when you execute a tool change with T#, and so it triggers the move (I1) to properly position the next head.

This command is decoded and executed by the printer as follows:

  • M6 (Declare Head Offsets)
    • T# (target head)
    • O1 (offset stored in register "O1")
    • X20 (X+20)
    • Y-30 (Y-30)
    • Z40 (Z+40)
    • (no change to A)
    • (no change to B)
    • (no diameter change)
    • I1 (store and move distances)

Example

 M6 K1

You might include this in your header to change behavior during tool changes.

This command is decoded and executed by the printer as follows:

  • M6 (Declare Head Offsets)
    • (all future T# or M6 commands)
    • (no offset registers, so ignore all offsets)
    • K1 (always force I0 with M6 unless K0 present (or has been previously set)

Note that this differs from a G54-G59, where the offsets are applied to EVERY tool position.



M660 Assign Tool Height Offset

Used with the High Resolution Engine (and other units which home away from O, like a CNC), an M660 declares that a particular head, when called upon, should print at the gcode-based Z position MODIFIED by this offset, since on these units, the Z-Zero is often BELOW the print surface. By default, this is ONLY used on the EHR (Engine, High Resolution)

NOTE: You MUST have a G28 Z0 in your header to run this M660 on the EHR.

Usage

 M660 Hn Zn
 (followed by)
 G1 Xn Yn Zn Fn Hn (see #G1_Working_Move for other details

Parameters

 H is the head offset register for which these offsets are being set;
 Z is the offset in the Z axis in mm.

Example 1

 M660 H2 Z28.2       ; (specified before any moves)
 (followed by)
 G1 X50 Y75 F4800 H2   ; (specified on the first G1 move)

This command is decoded and executed by the printer as follows:

  • M660 (apply offset)
    • H2 (store in register 2)
    • Z28.2 (+28.2 to Z position)
  • (there may be more commands before the G1 move invoking the H2)
  • G1 (working speed straight line move from the current location to)
    • X50 (50mm in the X)
    • Y75 (75mm in the Y)
    • (no change in Z)
    • E1 (while extruding)
    • F1800 (moving at 1800mm/min)
    • H2 (invoke offsets stored in register H2)

To be clear, this requires editing two lines of code:

In your gcode, you will enter the M660 just before the first layer code. Example: M660 H2 Z28.2 ; set tool height for tool two (Z offset). On the first move of layer one (usually the Z move), you will add an H value so that this tool height is invoked.

Example 2

Before editing:

 G1 Z0.275 F360      ; move to next layer (0)
 (followed by)
 G1 X50 Y75 F4800

After editing:

 G1 Z0.275 F360 H2   ; move to next layer (0) and invoke head Z offset for this tool</code>
 (followed by)
 G1 X50 Y75 F4800 H2



M703 Cloning Heads

Clone, slave, or parallel printing, is when multiple heads make the exact same print at the same time.

Usage of these commands with version 4 and earlier is explained in detail at https://hyrel3d.com/wiki/index.php/Cloning_and_Mixing.



T Tool Change

T executes a tool change, invoking the parameters specified in the M6 sent from Repetrel to the printer at the job start. Do not confuse a T command with a T variable.

See the first entry on this page for details.



Back to top

Controlling Lasers and UV Pens

Controlling Lasers and UV Pens
Code Supported Brief Description
M620 Yes Enable Device
M621 Yes Set Laser Power
M623 Yes Duration Emit
Laser Examples
UV Pen Examples


The CO2 and Diode Lasers and the UV Pens require the following enabling codes:

M620 Enable Device

M620 enables the device.

Usage

 M620 T# En An

Parameters

 T# is the tool position
 En can be the default 0 (disable) or 1 (enable)
 An is the duration in seconds after shut-off that the cooling remains active; default is 30 (but this will not override temperature safety measures)

Example

 M620 T# E1

This command is decoded and executed by the printer as follows:

  • M620 (enable device)
    • T# (target head - MUST be specified, can NOT be inherited)
    • E1 (enable)



M621 Set Laser Power

M621 sets the power for the LASER (not other heads).

Usage

 M621 Dn Pn

Parameters

 Pn is the power, in a value between 0 (min) and 100 (max).
 Dn is the initial power (similar to a prime) to penetrate material (optional; uses Pn if unspecified)

Note: No tool is specified; this will happen on the laser already enabled with M620.

Example

 M621 P40

This command is decoded and executed by the printer as follows:

  • M621 (activate device)
    • P40 (at 40% during "printing" (E-value) moves)




M623 Duration Emit

M623 sets the power for the laser or UV pen, and takes the following parameters:

Usage

 M623 Dn Pn

Parameters

 Dn is the duration, in miliseconds (only used for static exposures, not during moves)
 Pn is the power, in a value between 0 (min) and 100 (max).

Note: Dn max for UV pens is 60,000 (1 minute); Dn max for other devices 1,000 (1 second);

Here are examples:

 M623 P80 D500

This command is decoded and executed by the printer as follows:

  • M623 (activate tool)
    • P80 (power 80%)
    • D500 (duration 500 miliseconds)
 M623 P80 D10000 

This command is decoded and executed by the printer as follows:

  • M623 (activate tool)
    • P80 (power 80%)
    • D10000 (duration 10 seconds)

Emitting Move Example for the Laser

A sample of code for lasering will look like this:

 G0 X100 Y100 F1000  ; move to start location at 1000 mm/min
 M620 T# E1          ; enable target device 
 M621 P100           ; set light emission in vector mode (slot 3) to full power (100%)
 T#                  ; toolchange to target head
 G1 X120 Y100 E1     ; emitting (printing) move 20mm from origin in X axis
 G1 X120 Y120 E1     ; emitting (printing) move 20mm from origin in Y axis
 G1 X120 Y130        ; non-emitting move 10mm from origin in Y axis
 G1 X140 Y130 E1     ; emitting move 20mm from origin in X axis
 
 ... (the rest of your lasering job)
 
 M620 T# E0          ; disable target device <= should be before M30 command

Emitting Move Example for the UV Pen

A sample of code for UV Curing will look like this:

 G0 X100 Y100 F1000  ; move to start location at 1000 mm/min
 M620 T# E1         ; enable target device
 M621 P100           ; set light emission in vector mode (slot 3) to full power (100%)
 T#                  ; toolchange to target head
 G1 X120 Y100 E1     ; emitting (printing) move 20mm from origin in X axis
 G1 X120 Y120 E1     ; emitting (printing) move 20mm from origin in Y axis
 G1 X120 Y130        ; non-emitting move 10mm from origin in Y axis
 G1 X140 Y130 E1     ; emitting move 20mm from origin in X axis
 
 ... (the rest of your curing job)
 
 M620 T# E0         ; disable target device <= should be before M30 command

For more complex examples, see the UV_and_Clench page.



Back to top

Controlling Spindles and Lathes

Controlling Spindles and Lathes
Code Supported Brief Description
M3 Yes Spindle On CW
M4 Yes Spindle On CCW
M5 Yes Spindle Off
M253 Yes Turn On Lathe (CW)
M254 Yes Turn On Lathe (CCW)
M255 Yes Turn Off Lathe
G81 G81 Peck Drilling

Machining and Spindle Tool commands. Note, we recommend using SimplyCAM.

You can review the 5-axis gcode we used for this video from here.

M3 Turn On Spindle (CW)

M3 tells the printer to activate (start) the spindle motor in the clockwise direction on the current head (if it has one), using the value set on the head for RPM. Note: S0 is the same as turning it off. Note: DO NOT CHANGE DIRECTION while the spindle is in motion.

Usage

 M3 T# Sn Fn

Parameters

 T# - target head
 Sn - power (0-100%)
 Fn - optional; PWM in Hz (defaults on heads should be fine for most uses)

Example

 M3 T# S75

This command is decoded and executed by the printer as follows:

  • M3 (activate spindle clockwise)
    • T# (target head)
    • S75 (at 75% power)
    • (default PWM)



M4 Turn On Spindle (CCW)

Please refer to M3, above, for details. All options are identical, with the exception of direction (counterclockwise).



M5 Turn Off Spindle

M5 tells the printer to deactivate (stop) the spindle motor on the current head (if it has one). M5 has the same effect as M3 S0 or M4 S0.

Usage

 M5 T#

Parameters

 T# - target head

Example

 M5 T# 

This command is decoded and executed by the printer as follows:

  • M3 (deactivate spindle )
    • T# (target head)



M253 Turn On Lathe (CW)

M253 tells the printer to activate (start) the lathe motor in the clockwise direction (if it has one), using the value set with M92 for RPM. Only available on Hydra 16A models.

Note: S0 is the same as turning it off.

Usage

 M253 Sn

Parameters

 Sn - speed in units per minute (default: RPM if set with M92 as steps per revolution)

Example

 M253 S75

This command is decoded and executed by the printer as follows:

  • M253 (activate spindle clockwise)
    • S75 (at 75 RPM)



M254 Turn On Lathe (CCW)

Please refer to M253, above, for details. All options are identical, with the exception of direction (counterclockwise).



M255 Turn Off Lathe

M255 tells the printer to deactivate (stop) the lathe motor (if it has one). M255 has the same effect as G253 S0 or G254 S0.

Usage

 M255 

Parameters

 N/A

Example

 M255 

This command is decoded and executed by the printer as follows:

  • M255 (deactivate lathe)



G81 Peck Drilling

G81 tells the printer to move to a start position in X/Y and then in Z, and to make (if needed) repeated descents and retracts. This is used to make holes, especially deep holes. Note that the spindle tool is turned on with an M3 or M4 before this command, and turned off with an M5 after all work is done.

Usage

 G81 T# Xn Yn In Pn Qn Zn Fn

Parameters

 T# - target head
 Xn - X position
 Yn - Y position
 In - initial Z position
 Pn - peck downward this many mm during each cycle
 Qn - retract upward this many mm after each cycle (to clear debris)
 Zn - maximum pecking depth
 Fn - Z working speed in mm/min

Example

 G81 T# X100 Y75 I3 P3 Q-2 Z-7.5 F200

NOTE that an M660 offset must be set and applied BEFORE THIS COMMAND to allow for tool length.

This command is decoded and executed by the printer as follows:

  • G81 (begin pecking cycle)
    • X100 Y75 (move to X/Y starting position X100 Y75)
    • I3 (move to Z starting position Z3, which will be our greatest retract height)
    • P3 (peck downward an additional 3mm at a time)
    • Q-2 (retract upward 2mm after each peck (to clear debris))
    • Z-7.5 (peck to a maximum depth of 7.5mm)
    • F200 (working (drilling) travel speed of 200 mm/min)
    • after this, the head will retract up to the I position (Z3 in this case) before moving on to the next line



Back to top

Reporting and Diagnostics

Reporting and Diagnostics
Code Supported Brief Description
M701 Yes Set Head Reporting
M718 Yes Stop Logging to File
M719 Yes Start Logging to File
M670 Yes Enable Y-arm Light
M672 Yes Set Y-arm Light
M772 Yes Reset All Metrics
M773 Yes Generate Basic Report

The following commands help with reporting and diagnostics. Most users never need them, but here are the basics. More advanced/detailed reporting is available.

M701 Set Head Reporting

M701 tells heads how often to send head-specific information to the Motion Controller and on to Repetrel (and pass along to a text file if enabled via M719).

Usage

 M701 T# Pn

Parameters

 T# - target head
 Pn - period in seconds between entries (default 1)

Example

 M701 P12

This command is decoded and executed by the printer as follows:

  • M701 (head reporting)
    • (currently active head)
    • P12 (every 12 seconds)



M718 Stop Logging to File

M718 tells Repetrel to stop any logging of data to text file that may have been enabled with M719.

Usage

 M718

Parameters

 N/A

Example

 M718

This command is decoded and executed by the printer as follows:

  • M718 (logging off)



M719 Start Logging to File

M719 tells the Motion Controller what system-wide information to report back to Repetrel, and also tells Repetrel to begin logging these details to a text file.

Usage

 M719 Pn Sn 
 
 M719 Pn Xn Yn Zn An Bn Vn En Ln

Parameters

 Pn - period in seconds between entries
 Sn - can be default 0 (see options below) or 1 (report ALL data) 
 Xn - report X position with each entry
 Yn - report Y position with each entry
 Zn - report Z position with each entry
 An - report A position with each entry
 Bn - report B position with each entry
 Vn - report velocity with each entry
 En - report flow rate with each entry
 Ln - report gcode line number with each entry

Note: these values are persistent, and if previously enabled, will still be enabled unless disabled with a 0 parameter.

Example 1

 M719 P10 S1

This command is decoded and executed by the printer as follows:

  • M719 (logging on)
    • P10 (every 10 seconds)
    • S1 (report everything)

Example 2

 M719 P.1 Xn Yn Zn Ln
  • M719 (logging on)
    • P.1 (every 0.1 seconds)
    • X1 (report X position)
    • Y1 (report Y position)
    • Z1 (report Z position)
    • (don't report A position)
    • (don't report B position)
    • (don't report velocity)
    • (don't report flow rate)
    • L1 (report line number)



M670 Enable Gantry / Y-arm Light

M670 sets the intensity of the Y-arm LEDs.

Usage

 M670 Sn Pn

Parameters

 Sn is the (percent of duty cycle, 0-100) for the LEDs
 Pn is the period (on-off interval - default is 1 second)

Example 1

 M670 S50 P1

This command is decoded and executed by the printer as follows:

  • M670 (enable Y-arm light)
    • S50 (50% duty cycle)
    • P1 (1 second cycle)

This would turn the Y-arm light on for 50% of 1 second, then off for 50% of 1 second - or on for 0.5 seconds, off for 0.5 seconds.

Example 2

 M670 S25 P4

This command is decoded and executed by the printer as follows:

  • M670 (enable Y-arm light)
    • S25 (25% duty cycle)
    • P4 (4 second cycle)

This would turn the Y-arm light on for 25% of 4 second, then off for 75% of 4 seconds - or on for 1 second, off for 3 seconds.



M672 Set Gantry / Y-arm State

M672 can be used to have the Gantry / Y-arm light change states to reflect the state of a sensor. For example, you can have it come on when the X axis is homed, or when the Y axis has a fault.

Usage

 M672 Sn

Parameters

 Sn can be (unlisted numbers are unused at present):
       0  : Normal on/off
       10 : X Home
       11 : X Limit1
       12 : X Limit2
       13 : X Fault
       20 : Y Home
       21 : Y Limit1
       22 : Y Limit2
       23 : Y Fault
       30 : Z Home
       31 : Z Limit1
       32 : Z Limit2
       33 : Z Fault
       40 : A Home
       41 : A Limit1
       42 : A Limit2
       43 : A Fault
       50 : B Home
       11 : B Limit1
       52 : B Limit2
       53 : B Fault
       60 : C Home
       61 : C Limit1
       62 : C Limit2
       63 : C Fault

Example

 M672 S

This command is decoded and executed by the printer as follows:

  • M672 (map Y-arm light to state of sensor)



M772 Reset All Metrics

M772 will reset all internal gathering registers to 0.

Usage

 M772 Sn

Parameters

 Sn 0 is default; S can be...
     0 reset all values only
     1 also generates a basic printing report
     255 also generates all possible reports (helpful for advanced debugging)

Example

 M772 S1

This command is decoded and executed by the printer as follows:

  • M772 (reset all metrics)
    • S1 (and generate basic printing report



M773 Generate Basic Report

M773 generates a basic report of printing statistics (including average speed, number of primes, etc.)

Note: this report will be more meaningful if you use M772 to reset these counters at the start of a job.

Usage

 M773

Parameters

 N/A

Example

 M773

This command is decoded and executed by the printer as follows:

  • M773 (generate basic report)

Sample Output

 >IN:  50: ******************************************************************
 >IN:  50: **  Begin M773 - print job metrics Report
 >IN:  50: ******************************************************************
 >IN:  50: 
 >IN:  50:                       Time (s)    Dist (m)
 >IN:  50:                       --------    --------
 >IN:  50: Totals:                    0.0       0.000
 >IN:  50: 
 >IN:  50: Printing moves:            0.0       0.000
 >IN:  50: Non-printing moves         0.0       0.000
 >IN:  50: 
 >IN:  50: Accelerating:              0.0       0.000
 >IN:  50: Cruising:                  0.0       0.000
 >IN:  50: Decelerating:              0.0       0.000
 >IN:  50: 
 >IN:  50: can e steps issued:       0
 >IN:  50: approx filament (PI*d)    0.000 m
 >IN:  50: approx filament (PIr^2)   0.000 m
 >IN:  50: unprimes issued:          0
 >IN:  50: primes issued:            0
 >IN:  50: unprime-primes avoided:   0
 >IN:  50: 
 >IN:  50: ******************************************************************
 >IN:  50: **  End M773 Report
 >IN:  50: ******************************************************************



Back to top

Controlling Aux Devices

Controlling Aux Devices
Code Supported Brief Description
M7 Yes Aux 1 On (Mist)
M8 Yes Aux 2 On (Flood)
M9 Yes All Aux Off
M620 Yes Enable Device
M670 Yes Enable Y-arm (Gantry) Lights
M671 Yes Activate X-Arm (Danger) Lights
M675 Yes Activate Response LEDs
M676 Yes Activate Recirc. Fan
M677 Yes Activate Buzzer
M678 Yes Activate Laser X-hair
M679 Yes Activate Vacuum
M684 Yes Activate Exhaust
M685 Yes Activate Air
M689 Yes Activate Ext. Head
M783 Yes Tie Aux to Extrusion


Individual port control commands.

M7 Activate Aux 1

12VDC Ports on EHR
12VDC Ports on 30M, ESR

M7 sends 12VDC to the port associated with "Mist Coolant", which we sometimes call Aux1. With no parameters, it is read as M7 S100 (on continuously). See also M783 Tie Aux to Extrusion.

Usage

 M7 Sn Tn

Parameters

 Sn is the percentage (0-100) for Aux 1 to come on (default is 100)
 Tn is the head to which Aux 1 will synchronize, coming on at 100% when that head is extruding; using a T value forces S100

Example 1

 M7 S100

This command is decoded and executed by the printer as follows:

  • M7 (Aux1 value)
    • S100 (set to 100%)

Example 2

 M7 S25

This command is decoded and executed by the printer as follows:

  • M7 (Aux1 value)
    • S25 (set to 25%)

Example 3

 M7 S0

This command is decoded and executed by the printer as follows:

  • M7 (Aux1 value)
    • S0 (set to 0%)

Example 4

 M7 T#

This command is decoded and executed by the printer as follows:

  • M7 (Aux1 value)
    • T# (set to 100% when T# is extruding)



M8 Activate Aux 2

M7 sends 12VDC to the port associated with "Flood Coolant", which we sometimes call Aux2. With no parameters, it is read as M8 S100 (on continuously). See also M783 Tie Aux to Extrusion.

Usage

 M8 Sn Tn

Parameters

 Sn is the percentage (0-100) for Aux 2 to come on (default is 100)
 Tn is the head to which Aux 2 will synchronize, coming on at 100% when that head is extruding; using a T value forces S100

Example 1

 M8 S100

This command is decoded and executed by the printer as follows:

  • M8 (Aux2 value)
    • S100 (set to 100%)

Example 2

 M8 S25

This command is decoded and executed by the printer as follows:

  • M8 (Aux2 value)
    • S25 (set to 25%)

Example 3

 M8 S0

This command is decoded and executed by the printer as follows:

  • M8 (Aux2 value)
    • S (set to 0%)

Example 4

 M8 T#

This command is decoded and executed by the printer as follows:

  • M8 (Aux2 value)
    • T# (set to 100% when T# is extruding)



M9 Deactivate Aux1 & Aux2

M9 cuts power to both Aux1 and Aux2. It is equivalent to running M7 S0 and M8 S0.

Usage

 M9

Parameters

 N/A

Example

 M9

This command is decoded and executed by the printer as follows:

  • M9 (set Aux 1 and Aux 2 to value 0 (off))



M620 Activate Emitter

See #M620_Enable_Device above.



M670 Activate Y-Arm (Gantry) Lights

M670 sends 12VDC to the port associated turning on the Gantry (16A) or Y-arm (30M, ESR) lights.

Usage

 M670 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M670 S100

This command is decoded and executed by the printer as follows:

  • M670 (Gantry / Y-arm value)
    • S100 (set to 100%)

Example 2

 M670 S25

This command is decoded and executed by the printer as follows:

  • M670 (Gantry / Y-arm value)
    • S25 (set to 25%)

Example 3

 M670 S0

This command is decoded and executed by the printer as follows:

  • M670 (Gantry / Y-arm value)
    • S0 (set to 0%)



M671 Activate X-Arm (Danger) Lights

M671 sends 12VDC to the port associated turning on the X-arm / Danger lights (30M/ESR only).

Usage

 M671 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M671 S100

This command is decoded and executed by the printer as follows:

  • M671 (X-arm / Danger value)
    • S100 (set to 100%)

Example 2

 M671 S25

This command is decoded and executed by the printer as follows:

  • M671 (X-arm / Danger value)
    • S25 (set to 25%)

Example 3

 M671 S0

This command is decoded and executed by the printer as follows:

  • M671 (X-arm / Danger value)
    • S0 (set to 0%)



M675 Activate Response LEDs

M675 sends 12VDC to the port associated turning on the Response LEDs (30M/16A only).

Usage

 M675 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M675 S100

This command is decoded and executed by the printer as follows:

  • M675 (Response LEDs value)
    • S100 (set to 100%)

Example 2

 M675 S25

This command is decoded and executed by the printer as follows:

  • M675 (Response LEDs value)
    • S25 (set to 25%)

Example 3

 M675 S0

This command is decoded and executed by the printer as follows:

  • M675 (Response LEDs value)
    • S0 (set to 0%)



M676 Activate Recirc. Fan

M676 sends 12VDC to the port associated turning on the Recirc. Fan (16A only).

Usage

 M676 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M676 S100

This command is decoded and executed by the printer as follows:

  • M676 (Recirc. Fan value)
    • S100 (set to 100%)

Example 2

 M676 S25

This command is decoded and executed by the printer as follows:

  • M676 (Recirc. Fan value)
    • S25 (set to 25%)

Example 3

 M676 S0

This command is decoded and executed by the printer as follows:

  • M676 (Recirc. Fan value)
    • S0 (set to 0%)



M677 Activate Buzzer

M677 sends 12VDC to the port associated turning on the Buzzer (older 30Ms only).

Usage

 M677 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M677 S100

This command is decoded and executed by the printer as follows:

  • M677 (Buzzer value)
    • S100 (set to 100%)

Example 2

 M677 S25

This command is decoded and executed by the printer as follows:

  • M677 (Buzzer value)
    • S25 (set to 25%)

Example 3

 M677 S0

This command is decoded and executed by the printer as follows:

  • M677 (Buzzer value)
    • S0 (set to 0%)



M678 Activate Laser X-hair

M678 sends 12VDC to the port associated turning on the Laser X-hair (16A with CO2 lasers only).

Usage

 M678 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M678 S100

This command is decoded and executed by the printer as follows:

  • M678 (Laser X-hair value)
    • S100 (set to 100%)

Example 2

 M678 S25

This command is decoded and executed by the printer as follows:

  • M678 (Laser X-hair value)
    • S25 (set to 25%)

Example 3

 M678 S0

This command is decoded and executed by the printer as follows:

  • M678 (Laser X-hair value)
    • S0 (set to 0%)





M679 Activate Vacuum

M679 sends 12VDC to the port associated turning on the Vacuum (30M/ESR only).

Usage

 M671 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M679 S100

This command is decoded and executed by the printer as follows:

  • M679 (Vacuum value)
    • S100 (set to 100%)

Example 2

 M679 S25

This command is decoded and executed by the printer as follows:

  • M679 (Vacuum value)
    • S25 (set to 25%)

Example 3

 M679 S0

This command is decoded and executed by the printer as follows:

  • M679 (Vacuum value)
    • S0 (set to 0%)



M684 Activate Exhaust

M671 sends 12VDC to the port associated turning on the Exhaust (16A only).

Usage

 M684 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M684 S100

This command is decoded and executed by the printer as follows:

  • M684 (Exhaust value)
    • S100 (set to 100%)

Example 2

 M684 S25

This command is decoded and executed by the printer as follows:

  • M684 (Exhaust value)
    • S25 (set to 25%)

Example 3

 M684 S0

This command is decoded and executed by the printer as follows:

  • M684 (Exhaust value)
    • S0 (set to 0%)



M685 Set Power on Air

M685 sends 12VDC to the port associated turning on the (positive pressure) Air (16A only).

Usage

 M685 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M685 S100

This command is decoded and executed by the printer as follows:

  • M685 (Air value)
    • S100 (set to 100%)

Example 2

 M685 S25

This command is decoded and executed by the printer as follows:

  • M685 Air value)
    • S25 (set to 25%)

Example 3

 M685 S0

This command is decoded and executed by the printer as follows:

  • M685 (Air value)
    • S0 (set to 0%)



M689 Activate Ext. Head

M689 sends 12VDC to the port associated turning on the Ext. Head.

Usage

 M689 Sn

Parameters

 Sn is the percentage (0-100; no default - if no Sn, no change)

Example 1

 M689 S100

This command is decoded and executed by the printer as follows:

  • M689 (Ext. Head value)
    • S100 (set to 100%)

Example 2

 M689 S25

This command is decoded and executed by the printer as follows:

  • M689 (Ext. Head value)
    • S25 (set to 25%)

Example 3

 M689 S0

This command is decoded and executed by the printer as follows:

  • M689 (Ext. Head value)
    • S0 (set to 0%)



M783 Tie Aux to Extrusion

M783 can tie some auxiliary port (like Aux 1, normally controlled by M7, or Aux 2, normally controlled by M8, etc.) to be powered (at 100%) during a certain head's extrusion. Some users use this so that they can print with Ultimus or Viscotec heads on our equipment. See also M7 and M8.

Note: M619 can be used to map which port M783 ties to - contact us for more information.

Usage

 M783 T# 

Parameters

 T# is the tool to which the designated aux port will be tied

Example

 M783 T#

This command is decoded and executed by the printer as follows:

  • M783 (Tie current Aux port to status of head)
    • T# (target head)




Back to top

Other Commands

Other Commands
Code Supported Brief Description
M17 Yes Engage Motors
M18 Yes Disengage Motors
M30 Yes End of Program
M84 Yes Disable Motors
M790 Yes New Layer Actions
M791 Yes Snap Image
M792 Yes Execute Action

Other commands.

M17 Engage Motors

M17 will apply power to all motors (positioning and extruder motors), locking them at their current postion; this prevents the bed and yoke from being pushed manually in the X and Y.

Note that an M18 or M84 will disengage motors on ESR and 30M models, but 16A and EHR models use different controllers, and these commands do not unlock the motors. On a 16A or a 30M, you may engage the emergency stop for the same effect.

Usage

 M17

Parameters

 N/A

Example

 M17

This command is decoded and executed by the printer as follows:

  • M17 (engage motors)



M18 Disengage Motors

M18 will cut power to all motors (positioning and extruder motors), unlocking them; this allows the motors to cool down (as they normally lock in place while still), as well as allowing one to manually push the bed and yoke in the X and Y. It also notifies the GUI that motors are disabled. All axes with homes must be rehomed after an M18.

Note this is identical to M84 and the opposite of M17.

Note that an M18 or M84 will disengage motors on ESR and 30M models, but 16A and EHR models use different controllers, and these commands do not unlock the motors. On a 16A or a 30M, you may engage the emergency stop for the same effect.

Usage

 M18

Parameters

 N/A

Example

 M18

This command is decoded and executed by the printer as follows:

  • M18 (disengage motors)



M30 End of Program

M30 tells the printer that this job is complete. No gocde after an M30 will be executed as part of the previous job.

Note M30 also dissolves any cloning setups, changes head index to 0, clears fixture offsets (G53), clears any M229 E-value settings, resets M106 persistent range, resets any printing errors, resets M660 head offsets to 0, resets heads to their stored values, and triggers any queued reports.

Usage

 M30

Parameters

 N/A

Example

 M30

This command is decoded and executed by the printer as follows:

  • M30 (end or program)



M84 Disable Motors

M84 invokes an M18. Please see M18 for usage.

Note that an M18 or M84 will disengage motors on ESR and 30M models, but 16A and EHR models use different controllers, and these commands do not unlock the motors. On a 16A or a 30M, you may engage the emergency stop for the same effect.



M790 New Layer Actions

M790 will trigger any associated new layer actions, which can include capturing an image from the designated camera. It takes no parameters.

M791 Snap Image

M791 will cause the camera selected under the Interface > Camera1 tab, if set to live video, to capture an image and save it to C:\Users\hyrel\Pictures\HyrelPrinterPictures\Camera1, named pic#.png

M792 Execute Action

M792 causes Repetrel to perform an action, such as displaying an image or making a warning beep.

Usage

 M792 [ SAY | PIC | VID | SEND | BEEP | SHELL ]

Parameters

 SAY sample message - the computer will use built-in text-to-speech to echo the message over the speaker(s)
 PIC C:\sample.jpg - the computer will display the image at the specified location
 VID C:\sample.mp4 - the computer will play the video at the specified location
 SEND sample message - the computer will send the message to the Aux port if connected
 BEEP - the computer will sound a beep
 SHELL C:\program.exe - the computer will execute the file at the specified location

Note that multiple options can be combined.

Example

 M792 ; SAY Hello Wilbur ; PIC C:\mr_ed.png

This command is decoded and executed by the printer as follows:

  • M792 (execute action)
    • SAY Hello Wilbur (Announce Text: Hello Wilbur)
    • PIC C:\mr_ed.png (Display Image: C:\mr_ed.png)



Back to top

Gcode Header

Here are some sample headers for Gcode on our equipment:

16A, T1, Heated

Below is our standard header for using a heated head in the second slot with a heated bed on a 16A:

 ; ///////////////   BEGIN HYREL HEADER for a 16A with a Heated Head in T1/T12 - 2021.02.24   \\\\\\\\\\\\\\\
 
 ; GENERAL :
 
 N14                ; set line numbers for error logging - Slic3r version
 M772 S1            ; reset metrics and arm automatic reporting 
 M627 X0 Y0 Z0 J-500 K5                 ; setup abort action 
 
  
 M107               ; fans/UV           ; off
 M106 C255          ; fans/UV           ; set to 0-255 range
 
 G53                ; clear offsets
 G21                ; units             : mm
 G91                ; coordinatess      : relative
 G0 Z10 	           ; drop bed 
 G90                ; coordinates       : absolute
 
 M229 E1 D1         ; enable E-values (volumetric)
 
 ; TEMP CONTROL :
 
 M190 S100          ; bed preheat  : set and wait
 M140 S[bed_temperature]          ; bed temp     : set, no wait
 M104 T12 S[temperature]      ; head temp    : set, no wait
 
 G28 X0 Y0          ; home, goto   : X and Y
  
 M190 S[bed_temperature]          ; bed temp     : set and wait
 M109 T12 S[temperature]      ; head temp    : set and wait
 
 T1                 ; use SECOND tool position from the left    
 
 ; \\\\\\\\\\\\\\\   END HYREL HEADER for a 16A with a Heated Head in T1/T12 - 2021.02.24   ///////////////</code>

30M and ESR, T1, Heated

Below is our standard header for using a heated head in the second slot with a heated bed on a 16A:

 ; ///////////////   BEGIN HYREL HEADER for a 30M/ESR with an Unheated Head in T0/T11 - 2021.02.24   \\\\\\\\\\\\\\\
 
 ; GENERAL :
 
 N14                ; set line numbers for error logging - Slic3r version
 M772 S1            ; reset metrics and arm automatic reporting 
 M627 X0 Y0 Z0 J-500 K5                 ; setup abort action 
 
 
 M107               ; fans/UV           ; off
 M106 C255          ; fans/UV           ; set to 0-255 range
 
 G53                ; clear offsets
 G21                ; units             : mm
 G91                ; coordinatess      : relative
 G0 Z10 	           ; drop bed 
 G90                ; coordinates       : absolute
 
 G28 Z0             ; home, goto        : Z (ignored if no Z home)
 G28 X0 Y0          ; home, goto        : X and Y
 
 M229 E1 D1         ; enable E-values (volumetric)
 
 ; TEMP CONTROL :
 
 ;M190 S[bed_temperature]          ; bed temp     : set and wait    <= COMMENTED OUT
 ;M109 T11 S[temperature]        ; head temp    : set and wait    <= COMMENTED OUT
 
 T0                 ; use FIRST tool position from the left    
 
 ; \\\\\\\\\\\\\\\   END HYREL HEADER for a 30M/ESR with an Unheated Head in T0/T11 - 2021.02.24   ///////////////

Gcode Footer

Standard, All Models

Below is our standard Gcode footer, which should be at the end of all your gcode files:

 ; ///////////////   BEGIN HYREL STANDARD FOOTER - 2021.02.12   \\\\\\\\\\\\\\\
 
 ; temp control:
 
 
 M107 T100       ; fans, diodes  : off
 M620 T100 E0    ; CO2 lasers    ; off
 M104 T100 S0    ; head temps    : off
 M140 T90 S0     ; bed temps     : off
 M5              ; spindles      : off
 
 ; housekeeping
 
 G91             ; coordinates   : relative
 G0 Z10          ; drop bed 
 G90             ; coordinates   : absolute
 G0 Y0           ; home, goto    : Y axis
 G0 X0           ; home, goto    : X axis
 M84             ; motors        : disable
 G53             ; clear offsets
 M30             ; program       : end
 			
 ; \\\\\\\\\\\\\\\   END HYREL STANDARD FOOTER - 2021.02.12   ///////////////