// 看这里的G代码描述: http://linuxcnc.org/handbook/gcode/g-code.html // http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes
//已被实施的代码 //------------------- // G0 -> G1
// G1 - 协调运动 X Y Z E // G2 - 顺时针旋转 ARC // G3 - 逆时针旋转 ARC
// G4 - 暂停 S
// G11 - retract recover filament according to settings of M208 // G28 - 所有轴归零
// G29 - 带着z轴的探针,进行复杂的归零。(按照在Auto bed leveling中的配置)要在G28之后执行才有效
// G30 - Single Z Probe, probes bed at current XY location. // G90 - 使用绝对坐标系 // G91 - 使用相对坐标系
// G92 - 将当前位置设为给定值(例如:G92 X0 Y0 Z0,即可把当前位置强制设置为零点)
// M 代码
// M0 - 无条件停止 - 等待用户按LCD面板上的按钮(只有当ULTRA_LCD被使能的时候)
// M1 - 和M0相同
// M17 - 使能(锁死)所有的步进电机
// M18 - 取消使能(释放)所有的步进电机;与M84相同 // M20 - 列出SD卡的内容,通过串口发回 // M21 - 初始化SD卡 // M22 - 弹出SD卡
// M23 - 选择SD卡文件(M23 filename.g) // M24 - 启动/恢复SD卡打印 // M25 - 暂停SD卡打印
// M26 - Set SD position in bytes (M26 S12345) // M27 - 报告SD卡打印状态
// M28 - Start SD write (M28 filename.g) // M29 - Stop SD write
// M30 - 删除SD卡文件 (M30 filename.g)
// M31 - Output time since last M109 or SD card start to serial
// M32 - Select file and start SD print (Can be used _while_ printing from SD card files): // syntax \
// Call gcode file : \#include).
// The '#' is necessary when calling from within sd files, as it stops buffer prereading // M42 - 通过指令M42 Px Sy来设置引脚x的值(0或1),省略参数Px的话,会默认为
配置led引脚。
// M80 - 开启电源供电 // M81 - 关闭电源供电
// M82 - 设定 E轴(挤丝量) 为绝对模式 (默认) // M83 - 设定 E轴(挤丝量) 为相对模式 (G90) // M84 - Disable steppers until next move,
// or use S
// M85 - Set inactivity shutdown timer with parameter S
// M104 - 设置挤出头目标温度(开始加热到目标温度,但是不会等待,区别M109) // M105 - 读取当前温度 // M106 - 开启风扇 // M107 - 关闭风扇
// M109 - Sxxx 等待挤出头加热到目标温度. 只有在加热的时候才会等待 // Rxxx 等待挤出头加热到目标温度. 加热和冷却时都会等待 // M114 - 串口输出当前位置坐标 // M115 - 串口输出功能性字符串(该数据位于language.h 宏MSG_M115_REPORT下定义) // M117 - 显示信息到LCD面板 // M119 - 串口输出限位开关状态
// M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
// M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil) // M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil) // M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil) // M140 - 设置热床到默认温度
// 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.
// M190 - Sxxx 等待挤出头加热到目标温度. 只有在加热的时候才会等待 // Rxxx 等待挤出头加热到目标温度. 加热和冷却时都会等待
// M200 D
// M201 - 设定最大打印加速度,单位units/s^2 (M201 X1000 Y1000)
// M202 - 设定最大空载加速度,单位units/s^2 (M202 X1000 Y1000) Marlin中没用!!
// M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
// M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) in mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
// M205 - 高级设置: 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 // M206 - 设定额外的归零偏移量
// M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop], stays in mm regardless of M200 setting
// M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
// 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.
// M218 - set hotend offset (in mm): T
// M221 S
// M226 P
// M250 - 设置LCD对比度 C
// M280 - 设置舵机绝对位置. P: 舵机序号, S: 角度 或 占空比毫秒数 // M300 - 播放蜂鸣器 S
// M302 - 允许制冷挤出头, or 设置最小挤出温度 S
// M303 - PID relay autotune S
// M304 - 设置热床 PID 参数 P I 与 D // M400 - Finish all moves
// M401 - 放下Z轴探针(若存在) // M402 - 升起z轴探针(若存在) // M500 - 存储参数到EEPROM
// M501 - 从EEPROM读取参数 (if you need reset them after you changed them temporarily). // M502 - 恢复出厂设置. You still need to store them in EEPROM afterwards if you want to. // M503 - 串口输出当前配置 (内存中的,而不是EEPROM)
// M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
// M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
// M665 - 配置 delta 参数
// M666 - set delta endstop adjustment
// M605 - Set dual x-carriage movement mode: S
// M907 - Set digital trimpot motor current using axis codes. // M908 - 直接控制数字变阻器. // M350 - 设定微步进模式.
// M351 - 翻转 MS1 MS2 引脚的方向.
// M928 - Start SD logging (M928 filename.g) - ended by M29 // M999 - 异常停止后的重启