Selaa lähdekoodia

Add GCodes from Marlin 1.0.3 dev, format as pre

Scott Lahteine 10 vuotta sitten
vanhempi
commit
907e8e98e5
1 muutettua tiedostoa jossa 128 lisäystä ja 99 poistoa
  1. 128
    99
      Documentation/GCodes.md

+ 128
- 99
Documentation/GCodes.md Näytä tiedosto

@@ -2,105 +2,134 @@
2 2
 
3 3
 ## G Codes
4 4
 
5
-*  G0  -> G1
6
-*  G1  - Coordinated Movement X Y Z E
7
-*  G2  - CW ARC
8
-*  G3  - CCW ARC
9
-*  G4  - Dwell S[seconds] or P[milliseconds]
10
-*  G10 - retract filament according to settings of M207
11
-*  G11 - retract recover filament according to settings of M208
12
-*  G28 - Home all Axis
13
-*  G29 - Detailed Z-Probe, probes the bed at 3 points.  You must be at the home position for this to work correctly.
14
-*  G30 - Single Z Probe, probes bed at current XY location.
15
-*  G31 - Dock Z Probe sled (if enabled)
16
-*  G32 - Undock Z Probe sled (if enabled)
17
-*  G90 - Use Absolute Coordinates
18
-*  G91 - Use Relative Coordinates
19
-*  G92 - Set current position to cordinates given
20
-
5
+```
6
+G0  -> G1
7
+G1  - Coordinated Movement X Y Z E
8
+G2  - CW ARC
9
+G3  - CCW ARC
10
+G4  - Dwell S[seconds] or P[milliseconds]
11
+G10 - retract filament according to settings of M207
12
+G11 - retract recover filament according to settings of M208
13
+G28 - Home all Axis
14
+G29 - Detailed Z-Probe, probes the bed at 3 points.  You must be at the home position for this to work correctly.
15
+G30 - Single Z Probe, probes bed at current XY location.
16
+G31 - Dock Z Probe sled (if enabled)
17
+G32 - Undock Z Probe sled (if enabled)
18
+G90 - Use Absolute Coordinates
19
+G91 - Use Relative Coordinates
20
+G92 - Set current position to cordinates given
21
+```
21 22
 ## M Codes
22
-*  M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
23
-*  M1   - Same as M0
24
-*  M17  - Enable/Power all stepper motors
25
-*  M18  - Disable all stepper motors; same as M84
26
-*  M20  - List SD card
27
-*  M21  - Init SD card
28
-*  M22  - Release SD card
29
-*  M23  - Select SD file (M23 filename.g)
30
-*  M24  - Start/resume SD print
31
-*  M25  - Pause SD print
32
-*  M26  - Set SD position in bytes (M26 S12345)
33
-*  M27  - Report SD print status
34
-*  M28  - Start SD write (M28 filename.g)
35
-*  M29  - Stop SD write
36
-*  M30  - Delete file from SD (M30 filename.g)
37
-*  M31  - Output time since last M109 or SD card start to serial
38
-*  M32  - Select file and start SD print (Can be used when printing from SD card)
39
-*  M42  - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
40
-*  M80  - Turn on Power Supply
41
-*  M81  - Turn off Power Supply
42
-*  M82  - Set E codes absolute (default)
43
-*  M83  - Set E codes relative while in Absolute Coordinates (G90) mode
44
-*  M84  - Disable steppers until next move, or use S[seconds] to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
45
-*  M85  - Set inactivity shutdown timer with parameter S[seconds]. To disable set zero (default)
46
-*  M92  - Set axis_steps_per_unit - same syntax as G92
47
-*  M104 - Set extruder target temp
48
-*  M105 - Read current temp
49
-*  M106 - Fan on
50
-*  M107 - Fan off
51
-*  M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
52
-*         Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
53
-*  M112 - Emergency stop
54
-*  M114 - Output current position to serial port
55
-*  M115 - Capabilities string
56
-*  M117 - display message
57
-*  M119 - Output Endstop status to serial port
58
-*  M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
59
-*  M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
60
-*  M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
61
-*  M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
62
-*  M140 - Set bed target temp
63
-*  M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
64
-*         Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
65
-*  M200 - D[millimeters]- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
66
-*  M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
67
-*  M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
68
-*  M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
69
-*  M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2
70
-*  M205 - advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
71
-*  M206 - set additional homing offset
72
-*  M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
73
-*  M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
74
-*  M209 - S[1=true/0=false] enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
75
-*  M218 - set hotend offset (in mm): T[extruder_number] X[offset_on_X] Y[offset_on_Y]
76
-*  M220 - S[factor in percent] - set speed factor override percentage
77
-*  M221 - S[factor in percent] - set extrude factor override percentage
78
-*  M240 - Trigger a camera to take a photograph
79
-*  M280 - Position an RC Servo P[index] S[angle/microseconds], ommit S to report back current angle
80
-*  M300 - Play beep sound S[frequency Hz] P[duration ms]
81
-*  M301 - Set PID parameters P I and D
82
-*  M302 - Allow cold extrudes
83
-*  M303 - PID relay autotune S[temperature] sets the target temperature. (default target temperature = 150C)
84
-*  M304 - Set bed PID parameters P I and D
85
-*  M350 - Set microstepping mode.
86
-*  M351 - Toggle MS1 MS2 pins directly.
87
-*  M400 - Finish all moves
88
-*  M401 - Lower z-probe if present
89
-*  M402 - Raise z-probe if present
90
-*  M404 - N[dia in mm] Enter the nominal filament width (3mm, 1.75mm) or will display nominal filament width without parameters
91
-*  M405 - Turn on Filament Sensor extrusion control.  Optional D[delay in cm] to set delay in centimeters between sensor and extruder
92
-*  M406 - Turn off Filament Sensor extrusion control
93
-*  M407 - Displays measured filament diameter
94
-*  M500 - stores paramters in EEPROM
95
-*  M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
96
-*  M502 - reverts to the default "factory settings".  You still need to store them in EEPROM afterwards if you want to.
97
-*  M503 - print the current settings (from memory not from EEPROM)
98
-*  M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
99
-*  M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
100
-*  M907 - Set digital trimpot motor current using axis codes.
101
-*  M908 - Control digital trimpot directly.
102
-*  M928 - Start SD logging (M928 filename.g) - ended by M29
103
-*  M999 - Restart after being stopped by error
23
+```
24
+M0   - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
25
+M1   - Same as M0
26
+M17  - Enable/Power all stepper motors
27
+M18  - Disable all stepper motors; same as M84
28
+M20  - List SD card
29
+M21  - Init SD card
30
+M22  - Release SD card
31
+M23  - Select SD file (M23 filename.g)
32
+M24  - Start/resume SD print
33
+M25  - Pause SD print
34
+M26  - Set SD position in bytes (M26 S12345)
35
+M27  - Report SD print status
36
+M28  - Start SD write (M28 filename.g)
37
+M29  - Stop SD write
38
+M30  - Delete file from SD (M30 filename.g)
39
+M31  - Output time since last M109 or SD card start to serial
40
+M32  - Select file and start SD print (Can be used _while_ printing from SD card files):
41
+       syntax "M32 /path/filename#", or "M32 S<startpos bytes> !filename#"
42
+       Call gcode file : "M32 P !filename#" and return to caller file after finishing (similar to #include).
43
+       The '#' is necessary when calling from within sd files, as it stops buffer prereading
44
+M42  - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
45
+M48  - Measure Z_Probe repeatability. M48 [n # of points] [X position] [Y position] [V_erboseness #] [E_ngage Probe] [L # of legs of travel]
46
+M80  - Turn on Power Supply
47
+M81  - Turn off Power Supply
48
+M82  - Set E codes absolute (default)
49
+M83  - Set E codes relative while in Absolute Coordinates (G90) mode
50
+M84  - Disable steppers until next move,
51
+       or use S<seconds> to specify an inactivity timeout, after which the steppers will be disabled.  S0 to disable the timeout.
52
+M85  - Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
53
+M92  - Set axis_steps_per_unit - same syntax as G92
54
+M104 - Set extruder target temp
55
+M105 - Read current temp
56
+M106 - Fan on
57
+M107 - Fan off
58
+M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating
59
+       Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling
60
+       IF AUTOTEMP is enabled, S<mintemp> B<maxtemp> F<factor>. Exit autotemp by any M109 without F
61
+M112 - Emergency stop
62
+M114 - Output current position to serial port
63
+M115 - Capabilities string
64
+M117 - display message
65
+M119 - Output Endstop status to serial port
66
+M120 - Enable endstop detection
67
+M121 - Disable endstop detection
68
+M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
69
+M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
70
+M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
71
+M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
72
+M140 - Set bed target temp
73
+M150 - Set BlinkM Color Output R: Red<0-255> U(!): Green<0-255> B: Blue<0-255> over i2c, G for green does not work.
74
+M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating
75
+       Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling
76
+M200 D<millimeters>- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).
77
+M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
78
+M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
79
+M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
80
+M204 - Set default acceleration: P for Printing moves, R for Retract only (no X, Y, Z) moves and T for Travel (non printing) moves (ex. M204 P800 T3000 R9000) in mm/sec^2
81
+M205 -  advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
82
+M206 - Set additional homing offset
83
+M207 - Set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
84
+M208 - Set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
85
+M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
86
+M218 - Set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
87
+M220 S<factor in percent>- set speed factor override percentage
88
+M221 S<factor in percent>- set extrude factor override percentage
89
+M226 P<pin number> S<pin state>- Wait until the specified pin reaches the state required
90
+M240 - Trigger a camera to take a photograph
91
+M250 - Set LCD contrast C<contrast value> (value 0..63)
92
+M280 - Set servo position absolute. P: servo index, S: angle or microseconds
93
+M300 - Play beep sound S<frequency Hz> P<duration ms>
94
+M301 - Set PID parameters P I and D
95
+M302 - Allow cold extrudes, or set the minimum extrude S<temperature>.
96
+M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
97
+M304 - Set bed PID parameters P I and D
98
+M380 - Activate solenoid on active extruder
99
+M381 - Disable all solenoids
100
+M400 - Finish all moves
101
+M401 - Lower z-probe if present
102
+M402 - Raise z-probe if present
103
+M404 - N<dia in mm> Enter the nominal filament width (3mm, 1.75mm ) or will display nominal filament width without parameters
104
+M405 - Turn on Filament Sensor extrusion control.  Optional D<delay in cm> to set delay in centimeters between sensor and extruder
105
+M406 - Turn off Filament Sensor extrusion control
106
+M407 - Display measured filament diameter
107
+M500 - Store parameters in EEPROM
108
+M501 - Read parameters from EEPROM (if you need reset them after you changed them temporarily).
109
+M502 - Revert to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
110
+M503 - Print the current settings (from memory not from EEPROM). Use S0 to leave off headings.
111
+M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
112
+M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
113
+M665 - Set delta configurations
114
+M666 - Set delta endstop adjustment
115
+M605 - Set dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ]
116
+M907 - Set digital trimpot motor current using axis codes.
117
+M908 - Control digital trimpot directly.
118
+M350 - Set microstepping mode.
119
+M351 - Toggle MS1 MS2 pins directly.
120
+
121
+M928 - Start SD logging (M928 filename.g) - ended by M29
122
+M999 - Restart after being stopped by error
123
+```
124
+## SCARA-specific M-Codes - May change to suit future G-code standards
125
+```
126
+M360 - SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
127
+M361 - SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
128
+M362 - SCARA calibration: Move to cal-position PsiA (0 deg calibration)
129
+M363 - SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
130
+M364 - SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
131
+M365 - SCARA calibration: Scaling factor, X, Y, Z axis
132
+```
104 133
 
105 134
 # Comments
106 135
 
@@ -122,4 +151,4 @@ If you need to use a literal `;` somewhere (for example within `M117`), you can
122 151
 
123 152
     M117 backslash: \\;and a comment
124 153
 
125
-Please note that hosts should strip any comments before sending GCODE to the printer in order to save bandwidth.
154
+Please note that hosts should strip any comments before sending GCODE to the printer in order to save bandwidth.

Loading…
Peruuta
Tallenna