Jump to content

Using variables in Cura 2.7 start script


Recommended Posts

Posted · Using variables in Cura 2.7 start script

Hi to all

I'm new on this forum being very soon owner of a UM3 Extended.

I currently print on an highly modified Mankati XT Plus with a Duet3D board using S3D for more than a year an half.

I'm trying to setup Cura for my Mankati, but facing some issues in the start script.

The Reprap Firmware manages temperature settings using G10 command for both active and standby temperature. M104/M109 command only sets the active temp.

Changing tool will set the initial one to standby, therefore temperature will drop down to the ambiant.

Cura is managing the temp for both active and standby extruder using M104/M109, which maybe work while printing. Additional issue, the extruder is heated on place, so oozes on the part except of parking somewhere of the the part before building the prime tower.

For the start script I need to heat both extruders at the same time for purging/priming, so the Cura way of managing temps is not working.

In S3D I use the following start script to do that :

G10 P0 S[extruder0_temperature] R[extruder0_temperature] ; set T0 temperatures with standby = active


G10 P1 S[extruder1_temperature] R[extruder1_temperature] ; set T1 temperatures with standby = active


M116 P0

M116 P1

G28 ; Home all axes

G29 ; Autobed Leveling

G1 X20 Y15 F3000 ; Bring extruder to the front

T0 ; Switch to left extruder

G92 E0 ; Zero the extruder

G1 Z0.7 ; Lower buildplate

G1 X35 E30 F225 ; Purge left nozzle

G1 X45 Y15 F2100 ; Wipe nozzle

G92 E0 ; Zero the extruder again

G10 P1 S[extruder1_temperature] R170 ; set T1 temperatures

T1 ; Switch to right extruder

G92 E0 ; Zero the extruder

G1 X25 Y25 F3000 ; Position for next purge

G1 X40 E30 F225 ; Purge right nozzle

G1 Y50 Y25 F2100 ; Wipe nozzle

G92 E0 ; Zero the extruder again

G10 P0 S[extruder0_temperature] R200 ; set T0 temperatures


The issue I have is the variables like [extruder1_temperature] are not recognized by Cura, so the Gcode generated is not valid.

Does anyone have the list of variables used by Cura, so I can implement the right ones in my script ? At least active and standby temps for each extruder.

Thanks in advance


  • Link to post
    Share on other sites

    Posted · Using variables in Cura 2.7 start script

    Yea Cura can't do that, it doesn't have a easy script system inside like S3D. But afaik it should be possible to set standy / heat temps.

    The problem it's that Cura atm, like Thinkprint Tony said on Duet3D forum

    "This would be helpful but it does require the firmware to look ahead, potential rather far in the gcode to anticipate a tool change and then act appropriately. I think the right answer is actually for the Slicer to do it as Lars says. The issue is that Cura should be using G10 properly rather than just using M106."


    To do the same on Cura it would need a few changes. Maybe someone can do a pull request, and if a Cura developer can do the job for it, it could be done.

    That's also, one of the advantages and disadvantages of S3D. It can do easy scripts, but Cura has a intelligent heat/cold timing to plan the heat/cold based on how fast C your hotend heats per second.

    Short answer, you might want to do a Script Batch outside Cura to change the heat/cold/wait system so it works better with Duet3D and parse the gcodes before sending them, at least for now...

  • Link to post
    Share on other sites

    Posted · Using variables in Cura 2.7 start script

    Hi Neotko,

    I've missed the post in duet3D forum.

    Indeed it would be good for Cura to manage properly with G10 commands the temperature when in RepRap Firmware mode.

    Doing a parser is an option, but I have no time for that. It is pretty straight forward to replace any M104/ M109 by G10 Sx Rx and M116, so to keep the advantages of Cura temperature management.

    So I believe that I'll stay with S3D for my Mankati and use Cura for the new UM3.

    It seems that there are some cool features in Cura specially for dual extrusion, but the multi processes as in S3D are not implemented, not cool at all.

    So for single extrusion, I bet I'll have a try with S3D on my UM3.

    • Like 1
    Link to post
    Share on other sites

    • 1 year 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.4 stable released
        The full stable release of UltiMaker Cura 5.4 is here and it makes it easier than ever to remove brims and supports from your finished prints. UltiMaker S series users can also look forward to print profiles for our newest UltiMaker PET CF composite material!
          • Like
        • 58 replies
    • Create New...