最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Marlin G-M代码

IT圈 admin 59浏览 0评论

2024年4月11日发(作者:乌孙盼雁)

//看这里的G代码描述:/handbook/gcode/

///wiki/Mendel_User_Manual:_RepRapGCodes

//已被实施的代码

//-------------------

//G0->G1

//G1-协调运动XYZE

//G2-顺时针旋转ARC

//G3-逆时针旋转ARC

//G4-暂停SorP

//G10-按照M207的设置退丝

//G11-retractrecoverfilamentaccordingtosettingsofM208

//G28-所有轴归零

//G29-带着z轴的探针,进行复杂的归零。(按照在Autobedleveling中的配置)要在G28

之后执行才有效

//G30-SingleZProbe,probesbedatcurrentXYlocation.

//G90-使用绝对坐标系

//G91-

使用相对坐标系

//G92-将当前位置设为给定值(例如:G92X0Y0Z0,即可把当前位置强制设置为零点)

//M代码

//M0-无条件停止-等待用户按LCD面板上的按钮(只有当ULTRA_LCD被使能的时候)

//M1-和M0相同

//M17-使能(锁死)所有的步进电机

//M18-取消使能(释放)所有的步进电机;与M84相同

//M20-列出SD卡的内容,通过串口发回

//M21-初始化SD卡

//M22-弹出SD卡

//M23-选择SD卡文件(M23filename.g)

//M24-启动/恢复SD卡打印

//M25-暂停SD卡打印

//M26-SetSDpositioninbytes(M26S12345)

//M27-报告SD卡打印状态

//M28-StartSDwrite(M28filename.g)

//M29-StopSDwrite

//M30-删除SD卡文件(M30filename.g)

//M31-OutputtimesincelastM109orSDcardstarttoserial

//M32-SelectfileandstartSDprint(Canbeused_while_printingfromSDcardfiles):

//syntax"M32/path/filename#",or"M32S!filename#"

//Callgcodefile:"M32P!filename#"andreturntocallerfileafterfinishing(similarto#include).

//The'#'isnecessarywhencallingfromwithinsdfiles,asitstopsbufferprereading

//M42-通过指令M42PxSy来设置引脚x的值(0或1),省略参数Px的话,会默认为配

置led引脚。

//M80-开启电源供电

//M81-关闭电源供电

//M82-设定E轴(挤丝量)为绝对模式(默认)

//M83-设定E轴(挤丝量)为相对模式(G90)

//M84-Disablesteppersuntilnextmove,

//oruseStospecifyaninactivitytimeout,afterwhichthestepperswillbedisabled.S0

todisablethetimeout.

//M85-SetinactivityshutdowntimerwithparameterS.Todisablesetzero(default)

//M92-Setaxis_steps_per_unit-samesyntaxasG92

//M104-设置挤出头目标温度(开始加热到目标温度,但是不会等待,区别M109)

//M105-读取当前温度

//M106-开启风扇

//M107-关闭风扇

//M109-Sxxx等待挤出头加热到目标温度.只有在加热的时候才会等待

//Rxxx等待挤出头加热到目标温度.加热和冷却时都会等待

//M114-串口输出当前位置坐标

//M115-串口输出功能性字符串(该数据位于language.h宏MSG_M115_REPORT下定义)

//M117-显示信息到LCD面板

//M119-串口输出限位开关状态

//M126-SolenoidAirValveOpen(BariCUDAsupportbyjmil)

//M127-SolenoidAirValveClosed(BariCUDAventtoatmosphericpressurebyjmil)

//M128-EtoPOpen(BariCUDAEtoP=electricitytoairpressuretransducerbyjmil)

//M129-EtoPClosed(BariCUDAEtoP=electricitytoairpressuretransducerbyjmil)

//M140-设置热床到默认温度

//M150-SetBlinkMColorOutputR:Red<0-255>U(!):Green<0-255>B:Blue<0-255>overi2c,

Gforgreendoesnotwork.

//M190-Sxxx等待挤出头加热到目标温度.只有在加热的时候才会等待

//Rxxx等待挤出头加热到目标温度.加热和冷却时都会等待

//M200D-setfilamentdiameterandsetEaxisunitstocubicmillimeters(useS0to

setbacktomillimeters).

//M201-设定最大打印加速度,单位units/s^2(M201X1000Y1000)

//M202-设定最大空载加速度,单位units/s^2(M202X1000Y1000)Marlin中没用!!

//M203-Setmaximumfeedratethatyourmachinecansustain(M203X200Y200Z300E10000)

inmm/sec

//M204-Setdefaultacceleration:SnormalmovesTfilamentonlymoves(M204S3000T7000)

inmm/sec^2alsosetsminimumsegmenttimeinms(B20000)topreventbufferunder-runsand

M20minimumfeedrate

//M205-高级设置:minimumtravelspeedS=whileprintingT=travelonly,B=minimum

segmenttimeX=maximumxyjerk,Z=maximumZjerk,E=maximumEjerk

//M206-设定额外的归零偏移量

//M207-setretractlengthS[positivemm]F[feedratemm/min]Z[additionalzlift/hop],staysin

mmregardlessofM200setting

//M208-setrecover=unretractlengthS[positivemmsurplustotheM207S*]F[feedratemm/sec]

//M209-S<1=true/0=false>enableautomaticretractdetectiftheslicerdidnotsupportG10/11:

everynormalextrude-onlymovewillbeclassifiedasretractdependingonthedirection.

//M218-sethotendoffset(inmm):TXY

//M220S-设定当前三轴移动速度的百分比数值(例如:M220S50,则打

印速度会降低一半。与M221类似,改指令即刻生效,但是要等到缓冲区内的动作执行完才

会看到效果)

//M221S-设定当前挤丝速度的百分数比值

//M226PS-Waituntilthespecifiedpinreachesthestaterequired

//M240-触发相机拍照

//M250-设置LCD对比度C(value0..63)

//M280-设置舵机绝对位置.P:舵机序号,S:角度或占空比毫秒数

//M300-播放蜂鸣器SP//M301-设定PID的三个参数PI与D

//M302-允许制冷挤出头,or设置最小挤出温度S.

//M303-PIDrelayautotuneSsetsthetargettemperature.(defaulttargettemper

ature=150C)

//M304-设置热床PID参数PI与D

//M400-Finishallmoves

//M401-放下Z轴探针(若存在)

//M402-升起z轴探针(若存在)

//M500-存储参数到EEPROM

//M501-从EEPROM读取参数(ifyouneedresetthemafteryouchangedthemtemporarily).

//M502-恢复出厂设置.YoustillneedtostoretheminEEPROMafterwardsifyouwantto.

//M503-串口输出当前配置(内存中的,而不是EEPROM)

//M540-UseS[0|1]toenableordisablethestopSDcardprintonendstophit(requiresABORT_

ON_ENDSTOP_HIT_FEATURE_ENABLED)

//M600-PauseforfilamentchangeX[pos]Y[pos]Z[relativelift]E[initialretract]L[laterretractdi

stanceforremoval]

//M665-配置delta参数

//M666-setdeltaendstopadjustment

//M605-Setdualx-carriagemovementmode:S[XR

tempoffset>]

//M907-Setdigitaltrimpotmotorcurrentusingaxiscodes.

//M908-直接控制数字变阻器.

//M350-设定微步进模式.

//M351-翻转MS1MS2引脚的方向.

//M928-StartSDlogging(M928filename.g)-endedbyM29

//M999-异常停止后的重启

2024年4月11日发(作者:乌孙盼雁)

//看这里的G代码描述:/handbook/gcode/

///wiki/Mendel_User_Manual:_RepRapGCodes

//已被实施的代码

//-------------------

//G0->G1

//G1-协调运动XYZE

//G2-顺时针旋转ARC

//G3-逆时针旋转ARC

//G4-暂停SorP

//G10-按照M207的设置退丝

//G11-retractrecoverfilamentaccordingtosettingsofM208

//G28-所有轴归零

//G29-带着z轴的探针,进行复杂的归零。(按照在Autobedleveling中的配置)要在G28

之后执行才有效

//G30-SingleZProbe,probesbedatcurrentXYlocation.

//G90-使用绝对坐标系

//G91-

使用相对坐标系

//G92-将当前位置设为给定值(例如:G92X0Y0Z0,即可把当前位置强制设置为零点)

//M代码

//M0-无条件停止-等待用户按LCD面板上的按钮(只有当ULTRA_LCD被使能的时候)

//M1-和M0相同

//M17-使能(锁死)所有的步进电机

//M18-取消使能(释放)所有的步进电机;与M84相同

//M20-列出SD卡的内容,通过串口发回

//M21-初始化SD卡

//M22-弹出SD卡

//M23-选择SD卡文件(M23filename.g)

//M24-启动/恢复SD卡打印

//M25-暂停SD卡打印

//M26-SetSDpositioninbytes(M26S12345)

//M27-报告SD卡打印状态

//M28-StartSDwrite(M28filename.g)

//M29-StopSDwrite

//M30-删除SD卡文件(M30filename.g)

//M31-OutputtimesincelastM109orSDcardstarttoserial

//M32-SelectfileandstartSDprint(Canbeused_while_printingfromSDcardfiles):

//syntax"M32/path/filename#",or"M32S!filename#"

//Callgcodefile:"M32P!filename#"andreturntocallerfileafterfinishing(similarto#include).

//The'#'isnecessarywhencallingfromwithinsdfiles,asitstopsbufferprereading

//M42-通过指令M42PxSy来设置引脚x的值(0或1),省略参数Px的话,会默认为配

置led引脚。

//M80-开启电源供电

//M81-关闭电源供电

//M82-设定E轴(挤丝量)为绝对模式(默认)

//M83-设定E轴(挤丝量)为相对模式(G90)

//M84-Disablesteppersuntilnextmove,

//oruseStospecifyaninactivitytimeout,afterwhichthestepperswillbedisabled.S0

todisablethetimeout.

//M85-SetinactivityshutdowntimerwithparameterS.Todisablesetzero(default)

//M92-Setaxis_steps_per_unit-samesyntaxasG92

//M104-设置挤出头目标温度(开始加热到目标温度,但是不会等待,区别M109)

//M105-读取当前温度

//M106-开启风扇

//M107-关闭风扇

//M109-Sxxx等待挤出头加热到目标温度.只有在加热的时候才会等待

//Rxxx等待挤出头加热到目标温度.加热和冷却时都会等待

//M114-串口输出当前位置坐标

//M115-串口输出功能性字符串(该数据位于language.h宏MSG_M115_REPORT下定义)

//M117-显示信息到LCD面板

//M119-串口输出限位开关状态

//M126-SolenoidAirValveOpen(BariCUDAsupportbyjmil)

//M127-SolenoidAirValveClosed(BariCUDAventtoatmosphericpressurebyjmil)

//M128-EtoPOpen(BariCUDAEtoP=electricitytoairpressuretransducerbyjmil)

//M129-EtoPClosed(BariCUDAEtoP=electricitytoairpressuretransducerbyjmil)

//M140-设置热床到默认温度

//M150-SetBlinkMColorOutputR:Red<0-255>U(!):Green<0-255>B:Blue<0-255>overi2c,

Gforgreendoesnotwork.

//M190-Sxxx等待挤出头加热到目标温度.只有在加热的时候才会等待

//Rxxx等待挤出头加热到目标温度.加热和冷却时都会等待

//M200D-setfilamentdiameterandsetEaxisunitstocubicmillimeters(useS0to

setbacktomillimeters).

//M201-设定最大打印加速度,单位units/s^2(M201X1000Y1000)

//M202-设定最大空载加速度,单位units/s^2(M202X1000Y1000)Marlin中没用!!

//M203-Setmaximumfeedratethatyourmachinecansustain(M203X200Y200Z300E10000)

inmm/sec

//M204-Setdefaultacceleration:SnormalmovesTfilamentonlymoves(M204S3000T7000)

inmm/sec^2alsosetsminimumsegmenttimeinms(B20000)topreventbufferunder-runsand

M20minimumfeedrate

//M205-高级设置:minimumtravelspeedS=whileprintingT=travelonly,B=minimum

segmenttimeX=maximumxyjerk,Z=maximumZjerk,E=maximumEjerk

//M206-设定额外的归零偏移量

//M207-setretractlengthS[positivemm]F[feedratemm/min]Z[additionalzlift/hop],staysin

mmregardlessofM200setting

//M208-setrecover=unretractlengthS[positivemmsurplustotheM207S*]F[feedratemm/sec]

//M209-S<1=true/0=false>enableautomaticretractdetectiftheslicerdidnotsupportG10/11:

everynormalextrude-onlymovewillbeclassifiedasretractdependingonthedirection.

//M218-sethotendoffset(inmm):TXY

//M220S-设定当前三轴移动速度的百分比数值(例如:M220S50,则打

印速度会降低一半。与M221类似,改指令即刻生效,但是要等到缓冲区内的动作执行完才

会看到效果)

//M221S-设定当前挤丝速度的百分数比值

//M226PS-Waituntilthespecifiedpinreachesthestaterequired

//M240-触发相机拍照

//M250-设置LCD对比度C(value0..63)

//M280-设置舵机绝对位置.P:舵机序号,S:角度或占空比毫秒数

//M300-播放蜂鸣器SP//M301-设定PID的三个参数PI与D

//M302-允许制冷挤出头,or设置最小挤出温度S.

//M303-PIDrelayautotuneSsetsthetargettemperature.(defaulttargettemper

ature=150C)

//M304-设置热床PID参数PI与D

//M400-Finishallmoves

//M401-放下Z轴探针(若存在)

//M402-升起z轴探针(若存在)

//M500-存储参数到EEPROM

//M501-从EEPROM读取参数(ifyouneedresetthemafteryouchangedthemtemporarily).

//M502-恢复出厂设置.YoustillneedtostoretheminEEPROMafterwardsifyouwantto.

//M503-串口输出当前配置(内存中的,而不是EEPROM)

//M540-UseS[0|1]toenableordisablethestopSDcardprintonendstophit(requiresABORT_

ON_ENDSTOP_HIT_FEATURE_ENABLED)

//M600-PauseforfilamentchangeX[pos]Y[pos]Z[relativelift]E[initialretract]L[laterretractdi

stanceforremoval]

//M665-配置delta参数

//M666-setdeltaendstopadjustment

//M605-Setdualx-carriagemovementmode:S[XR

tempoffset>]

//M907-Setdigitaltrimpotmotorcurrentusingaxiscodes.

//M908-直接控制数字变阻器.

//M350-设定微步进模式.

//M351-翻转MS1MS2引脚的方向.

//M928-StartSDlogging(M928filename.g)-endedbyM29

//M999-异常停止后的重启

发布评论

评论列表 (0)

  1. 暂无评论