X1C Specific G-Code
Bambu Labs has partially implemented Marlin G-Code commands and have added their own custom G-Code commands to perform functions that are not implemented in Marlin. It is also important to note that the X1C runs their own G-Code engine and does not use the open-source Marlin Firmware on their MC Board.
Hardware Control
Printer
| Code | Description | Example |
|---|---|---|
| M960 S0 P0 | Calibration lasers, and calibration head white LEDs off |
Toolhead Light Off (micro-lidar)
Toohead Light On
Toolhead Logo Light Off
Toolhead Logo Light On
|
| M960 S0 P1 | Calibration lasers, and calibration head white LEDs on | |
| M960 S1 P0 | Calibration Y axis 808nm (IR, visible only thru a/the camera) laser (vertical) off | |
| M960 S1 P1 | Calibration Y axis 808nm (IR, visible only thru a/the camera) laser (vertical) on | |
| M960 S2 P0 | Calibration X axis 405nm (purple) laser (horizontal) off | |
| M960 S2 P1 | Calibration X axis 405nm (purple) laser (horizontal) on | |
| M960 S3 P0/1 | Appears to be nothing at all, or I haven’t found what it is | |
| M17 X/Y/Z#.# |
Set X/Y/Z Stepper Motor Current |
set Z stepper current to 0.4 Amps
Be EXTREMELY careful using this command as it is VERY EASY to cause hardware damage with it should you set it too high!!! |
| M106 P1 S0-255 | Part cooling fan off-full*** |
Sets the part fan on at 70%
|
| M106 P2 S0-255 | Aux fan off-full*** |
Sets the Aux fan on at 100%
|
| M106 P3 S0-255 | Chamber fan off-full*** |
Sets the chamber fan on at 0%
|
| M710 A1 S0-255 | Motor Control (MC) Board fan off-full*** |
Sets the part fan on at 70%
|
| M220 S# |
Set feed rate to percent of normal. Default Speed is 100 |
Set print rate to Ludicrous Speed.
|
| M221 S# | Set glow rate |
disable the X endstop and enable them on Y and Z)
|
| M221 X0/1 Y0/1 Z0/1 |
Disable endstop If you are not chainging an endstop you do not need to explicity list it |
disable the X endstop and enable them on Y and Z)
|
| M970.3 |
|
|
| M971 | Commands the built-in camera 299 | |
| M972 | Calibrate Micro-Lidar |
Move Lidar to calibration sticker
|
| M973 |
Lidar Camera
|
Enable Micro-Lidar Auto Exposure
Micro-Lidar Camera Off
Micro-Lidar Camera On
Set Auto Exposure for Horizontal :Laser
Set Auto Exposure for Vertical Laser
Turn off Micro-Lidar
|
| M974 | Set Mech Mode Suppression Values |
|
| M975 | Mech Mode Supression |
turn off mech mode supression
turn on mech mode supression
|
| M976 |
Scan Heatbead before printing
First Layer Scan
|
|
| M977 | first layer scanning |
Enable first layer scanning
|
| M981 | Spaghetti detector |
Spaghetti detector off
Spagetti detector on
|
| M991 | Layer Change |
Notify Printer of Layer Change
Move toolhead to safe position for smooth timelapse
|
| M620 C# | calibrate AMS by AMS index | |
| M620 R# | refresh AMS by tray index | |
| M620 P# | select AMS tray by tray index | |
| M620 S# | select AMS by tray index |
Pull Filament back into AMS
|
| M621 S# | load filament in AMS by tray index | |
| M1003 | Power loss recovery |
Disable power loss recovery
Enable power loss recovery
|
| M1005 | set skew correction |
Set skew correction
Add the above Gcode to the last line of the “Machine start Gcode” and only run it once as the compensation will compound each time it is run.
Set skew correction in radians
Unlike the first example this is not iterative, and will overwrite any skew value set
Reset skew correction
|
| M1006 | Play Sound Through Speaker |
Enable Speaker?
Set note to play
Play supplied notes
|
| T1000 | Set toolhead to extruder |
|
| T1100 | Set toolhead to Micro-Lidar |
|
| T255 | Set toolhead to empty tool |
|
Software Control
| Code | Description | Example |
|---|---|---|
| G29.2 | Bed leveling compensation (ABL) |
Disable ABL
Enable ABL
|
| M205 |
Sets the jerk limits in mm/sec for the X Y Z and E motions
If you are not chainging an jerk limit axis you do not need to explicity list it |
|
| G29.1 |
Set Z-trim value to # Use 0 to clear Z-trim |
Squish for Textured PEI
|
| M900 | Set Pressure Advance, also known as Bambu Labs call this the K-value. |
|
| M1002 | Select flag for conditional commands |
Check to see if extrusion calibration was set in the slicer
|
| M622 |
Conditional code block and execute if selected flag is True, otherwise skip to the end of the code block Used with M1002 |
Execute if false
Execute if true
|
| M623 |
End of the conditional code block
|
|
| M400 | Pause |
Pause until all movement completes
Pause for 10 seconds
Pause for User Interaction
Pause for 500 miliseconds
|