Start G-Code

From MatterControl Manual
Revision as of 12:41, 13 January 2016 by MatterHackers (Talk | contribs) (MatterHackers moved page Start GCode to Start G-Code)

Jump to: navigation, search

Automatic G-Code Added Before/After Start G-Code

MatterSlice adds certain automatically generated code before and after your custom start G-Code. This normally where your temperature settings would be applied. MatterSlice will wait for the bed to warm up first. Then begin warming the extruder, run your custom start G-Code, then wait for the extruder to finish heating.

If MatterSlice detects that you have any extruder heating commands (M104, M109) in your custom start G-Code, it will remove these from the automatic G-Code. Likewise for bed heating commands (M140, M190).

Here are some examples of the automatic G-Code:

Before:

   ; automatic settings before start_gcode  
   G21 ; set units to millimeters  
   M107 ; fan off  
   M190 S95 ; wait for bed temperature to be reached  
   M104 T0 S210 ; start heating extruder 1  
   T0 ; set the active extruder to 0

After:

   ; automatic settings after start_gcode
   M109 T0 S210 ; wait for extruder 1 to reach temperature
   T0 ; set the active extruder to 0
   G90 ; use absolute coordinates
   G92 E0 ; reset the expected extruder position
   M82 ; use absolute distance for extrusion

Variables

MatterSlice allows you to place certain tokens in your custom GCode that will automatically be replaced with the appropriate values. Here is an example:

M109 S[temperature]

In this line, [temperature] will be replaced with the extruder temperature defined in your slice settings. These tokens can be enclosed in either square brackets [] or curly brackets {}, but for compatibility with other slicers we recommend square brackets.

Here is the list of currently available tokens:

temperature
bed_temperature
bed_remove_part_temperature
extruder_wipe_temperature
z_offset
retract_length
filament_diameter
first_layer_speed
infill_speed
max_fan_speed
min_fan_speed
min_print_speed
perimeter_speed
retract_speed
support_material_speed
travel_speed
bridge_fan_speed
bridge_speed
raft_print_speed
external_perimeter_speed