Jump to content

StartUp and Ending Gcode possibilities


Recommended Posts

Posted · StartUp and Ending Gcode possibilities

This is a Public Service announcement to illustrate some things that will be available for the StartUp and Ending gcodes in the Machine Settings.  The same syntax will be available for the Extruder StartUp and Ending boxes.  That should make configuring some of those "other" multi-extruder and IDEX printers easier and with greater flexibility.

 

Starting with 5.8 the Cura team introduced some logic capability to the StartUp and Ending Gcodes.  I like to have the printer configured for the material and temperatures I would be using.

This is from my StartUp in 5.8

{'M92 E119' if 'TPU' in material_type else ';M92 E119'} ; Steps/mm if TPU

{'M92 E102' if 'PETG' in material_type else ';M92 E102'} ; Steps/mm if PETG

{'M92 E97' if not 'PETG' in material_type and not 'TPU' in material_type else ';M92 E97'} ; Steps/mm if PLA
{'M206 X-116 Y-121 Z0' if machine_center_is_zero else 'M206 X-1 Y-6 Z0'}  ; Home offsets {'(Origin at center)' if machine_center_is_zero else '(Origin LF corner)'}
{'M104 S175 ; Standby while bed heats' if material_bed_temperature_layer_0 > 65 else ';M104 ; No standby'}
{'M190 S' if material_bed_temperature_layer_0 > 65 else 'M140 S'}{material_bed_temperature_layer_0}  ; Bed wait if over 65
M109 S{material_print_temperature_layer_0} ; Hot End Temperature

 

The above syntax had a weakness in that you couldn't use curly brackets within a pair of curly brackets and 'elif' didn't work.  For 5.9 the team will be going further and although the 5.9 syntax will require more lines, it will be easier to read since it won't require immensely long single lines.

This sets the E-steps depending on the material I'm using:
{if 'TPU' in material_type}
M92 E119 ; Steps/mm for TPU
{elif 'PETG' in material_type}
M92 E102 ; Steps/mm for PETG
{else}
M92 E97 ; Steps/mm for PLA
{endif}

I check a lot of gcodes over on Github and this allows me to slice and print for my Ender as an "Origin at Center" printer:

{if machine_center_is_zero}
M206 X-116 Y-121 Z0 ; Home offsets Origin at Center
{else}
M206 X-1 Y-6 Z0 ; Origin LF Corner
{endif}

Once my bed hits about 60, it really slows down when heating so for PETG at 83° I need to wait for the bed.  I use the bed temperature to check, but it could be the material.

M140 S{material_bed_temperature_layer_0} ; Start heating the bed
{if material_bed_temperature_layer_0 > 65} ; This could also be {if 'PETG' in material_type} but temperature works for me.
M104 S175 ; Standby while bed heats
M190 S{material_bed_temperature_layer_0} ; wait for bed
{endif}
M109 S{int(material_print_temperature_layer_0)} ; Hot End Temperature

 

Although machines like the Sovol SV04 IDEX will probably still require a plugin, the StartUp gcodes could be common.

{if 'Copy Mode' in machine_name}

M605 S2 ;Set printer to Copy Mode

{elif 'Mirror' in machine_name}

M605 S3 ;Set printer to Mirror Mode

{elif 'Dual' in machine_name}

M605 S0 ;Set printer to Dual Mode

{endif}

 

From what I understand - an extensive subset of the Keywords from AHoeben's List will be available for use.

The team has started to update the Wiki Info Page.  This is still a work-in-process.  It's certainly a nice touch.

 

If any of that is in error I would appreciate them being pointed out.  @rburema and Erwan Mathieu are doing a lot of the work.  The PR is #19619 over on GitHub.

  • Like 2
Link to post
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • UltiMaker Cura 5.8 Stable released 🎉
      In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
      • 5 replies
    • Introducing the UltiMaker Factor 4
      We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
        • Thanks
        • Like
      • 3 replies
×
×
  • Create New...