G-code 学习

G-code 最好的学习资料应该是, https://reprap.org/wiki/G-code

下面是从Cura导出来的Gcode,画了几条线

A example of G-code Genarated by software CURA
;分号后面均为注释
;START_OF_HEADER
;HEADER_VERSION:0.1
;FLAVOR:Griffin
;GENERATOR.NAME:Cura_SteamEngine
;GENERATOR.VERSION:4.3.0
;GENERATOR.BUILD_DATE:2019-09-24
;TARGET_MACHINE.NAME:Ultimaker 3 Extended
;EXTRUDER_TRAIN.0.INITIAL_TEMPERATURE:245
;EXTRUDER_TRAIN.0.MATERIAL.VOLUME_USED:0
;EXTRUDER_TRAIN.0.MATERIAL.GUID:60636bb4-518f-42e7-8237-fe77b194ebe0
;EXTRUDER_TRAIN.0.NOZZLE.DIAMETER:0.4
;EXTRUDER_TRAIN.0.NOZZLE.NAME:AA 0.4
;BUILD_PLATE.TYPE:glass
;BUILD_PLATE.INITIAL_TEMPERATURE:80
;PRINT.TIME:0
;PRINT.GROUPS:1
;PRINT.SIZE.MIN.X:0
;PRINT.SIZE.MIN.Y:0
;PRINT.SIZE.MIN.Z:0
;PRINT.SIZE.MAX.X:0.01
;PRINT.SIZE.MAX.Y:0.01
;PRINT.SIZE.MAX.Z:0.01
;END_OF_HEADER
;Generated with Cura_SteamEngine 4.3.0

M104 S20 ; extrude temperature
M105 Get Extruder Temperature
M109 S20 Set Extruder Temperature and Wait

Snnn minimum target temperature waits until the heating

Rnnn maximum target temperature waits until cooling (Sprinter)

Rnnn accurate target temperature waits until heating and cooling (Marlin and MK4duo)

M82 ;absolute extrusion mode
G92 E1

G280 S1
G0 Z20.001

G0 : Rapid Move
G0 Xnnn Ynnn Znnn Ennn Fnnn Snnn
Xnnn The position to move to on the X axis
Ynnn The position to move to on the Y axis
Znnn The position to move to on the Z axis
Ennn The amount to extrude between the starting point and ending point, negtive means retraction
Fnnn The feedrate per minute of the move between the starting point and ending point (if supplied)
Hnnn (RepRapFirmware) Flag to check if an endstop was hit (S1 to check, S0 to ignore, S2 see note, default is S0)1
Snnn Laser cutter/engraver power. In RepRapFirmware, when not in laser mode S in interpreted the same as H.
Ref:https://reprap.org/wiki/G-code#M107:_Fan_Off
G1 F1500 E-6.5

G1 : Linear Move
Xnnn The position to move to on the X axis
Ynnn The position to move to on the Y axis
Znnn The position to move to on the Z axis
Ennn The amount to extrude between the starting point and ending point, negtive means retraction
Fnnn The feedrate per minute of the move between the starting point and ending point (if supplied)
Hnnn (RepRapFirmware) Flag to check if an endstop was hit (S1 to check, S0 to ignore, S2 see note, default is S0)1
Snnn Laser cutter/engraver power. In RepRapFirmware, when not in laser mode S in interpreted the same as H.
Ref:https://reprap.org/wiki/G-code#M107:_Fan_Off

E is related to the extruded length of the material, and F is the moving speed of the printer head. The flow rate is equal to extruded length divided by traveling time

;LAYER_COUNT:0
M140 S0

M140: Set Bed Temperature (Fast)
Parameters
Pnnn Bed heater index1
Hnnn Heater number1
Tnnn Tool number2
Snnn Active/Target temperature
Rnnn Standby temperature1 2
M204 S3000;

Set default acceleration

M205 X20 Y20 %

Set X/Y Jerk to 20mm/s, Z jerk to 5mm/s

M107%;

fan off
G91 ;

Relative movement

G0 F15000 X8.0 Z0.5 E-4.5 ;

Wiping+material retraction
G0 F10000 Z1.5 E4.5 ;Compensation for the retraction
G90 ;Disable relative movement
M82 ;absolute extrusion mode
M104 S0
M104 T1 S0
;分号后面均为注释
;SETTING_3 tion = ultimaker3_extended\\n\\n[metadata]\\nquality_type = draft\\nt
;SETTING_3 ype = quality_changes\\nsetting_version = 9\\n\\n[values]\\nadhesion_
;SETTING_3 type = skirt\\n\\n”, “extruder_quality”: [“[general]\\nversion = 4\\n
;SETTING_3 name = Fast #2\\ndefinition = ultimaker3_extended\\n\\n[metadata]\\np
;SETTING_3 osition = 0\\nquality_type = draft\\ntype = quality_changes\\nsetting
;SETTING_3 _version = 9\\n\\n[values]\\ninfill_sparse_density = 100\\nprime_blob
;SETTING_3 _enable = False\\ntop_bottom_thickness = 0.2\\nwall_thickness = 0.2\\
;SETTING_3 n\\n”, “[general]\\nversion = 4\\nname = Fast #2\\ndefinition = ultim
;SETTING_3 aker3_extended\\n\\n[metadata]\\nposition = 1\\nquality_type = draft\
;SETTING_3 \ntype = quality_changes\\nsetting_version = 9\\n\\n[values]\\ninfill
;SETTING_3 _sparse_density = 100\\n\\n”]}

除此之外,还可能有M205

M205 X20 Y20, 设置了 X Y的travel speed 各为20 mm/s

使用notepad++可以采用Gcode style  下载链接G-CODE_N 原版链接

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注




Enter Captcha Here :

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据