Spotty
Posts: 1
Joined: Wed Jan 22, 2025 7:55 pm

Start Gcode Query - Creatbot F430

I am curious to see if anyone can explain why Creatbot put both "M83 - absolute positioning" and "M82 - Relative positioning" in their start-up g-code.

This is causing S3D not to register any flow rate in the print preview.

here is the start g-code that is preset with their slicer (creatware):

G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops

G21 ;set units to millimeters
G90 ;use absolute coordinates

;Begin Clear Nozzle
G92 E0 ;zero the extruded length
M83 ;set E value is relative
G0 F4200 X0 Y0
{if is_extruder_used[0]}
T0 F400 ;activate extruder NO.0
G0 X10 Y0 Z0.4 ;move a bit while down the Z
M221 T0 S200 ;set flow is 200%
G1 F200 X30 E+8 ;extrude amont filament to clean the hotend
M221 T0 S100 ;reset flow is 100%
{if initial_extruder != 0}G1 F1000 Z1 E-2{endif}{endif}
{if is_extruder_used[1]}
T1 F400 ;activate extruder NO.1
G0 X40 Y0 Z0.4 ;move a bit while down the Z
M221 T1 S200 ;set flow is 200%
G1 F200 X60 E+8 ;extrude amont filament to clean the hotend
M221 T1 S100 ;reset flow is 100%
{if initial_extruder != 1}G1 F1000 Z1 E-2{endif}{endif}
{if is_extruder_used[2]}
T2 F400 ;activate extruder NO.2
G0 X70 Y0 Z0.4 ;move a bit while down the Z
M221 T2 S200 ;set flow is 200%
G1 F200 X90 E+8 ;extrude amont filament to clean the hotend
M221 T2 S100 ;reset flow is 100%
{if initial_extruder != 2}G1 F1000 Z1 E-2{endif}{endif}
M82 ;set E value is absolute
G92 E0 ;zero the extruded length again
;End Clear Nozzle

G0 Z15.0 F4200 ;move the platform down 15mm

;Put printing message on LCD screen
M117 Printing...

This works fine with their slicer but it causes a bit of havic with S3D.
I am not super versed in g-code.

Which parts of this code should I remove or change to work better with S3D?
S3D-Jason
Posts: 1555
Joined: Sun May 31, 2015 6:01 am

Re: Start Gcode Query - Creatbot F430

If you're new to gcode, there's a useful tutorial here that explains most of the common commands:
https://www.simplify3d.com/resources/ar ... -tutorial/

The script that you posted looks like it was written for a different slicer, so there are several commands you would need to change. For example, many of the { } commands need to be converted to different syntax. You can search the forum for other examples of how to do a S3D {IF} statement or check if the tool is being used.

You can use both M82 or M83 in the same file, so that's more a matter of preference. Sometimes it's easier to say "increase the X position by 5mm" than to do "move to [old_x] + 5mm".

Return to “General Discussion and Tips”