Jump to content

Cura pre and post Script help for Ender 3 v2 with BLtouch


Go to solution Solved by Slashee_the_Cow,

Recommended Posts

Posted · Cura pre and post Script help for Ender 3 v2 with BLtouch

New user, Ender 3 v2 with BL Touch bed leveling, Marlin FW.  Have had printer for a few months now and using Cura 5.5 (and now 5.6) for my slicer.  Reading on the web, I get all sorts of opinions as to what the pre and post machine g-code scripts should be.  I will past my pre script below but will also attach a text file with both pre and post scripts as well as an actual gcode file from a recent project.  Currently, every time I print a job, the printer does the Bed Leveling - which I don't really mind that much, however; on another post I see where there is a way to start the bed leveling as soon as the bed is up to temperature.  My current setup does not start leveling until after the bed is at temp, and then waits more time until the nozzle is at temp.  Looking at the actual gcode from a project, I see where there are several lines of gcode "before" the pre print script.  Some are redundant.

 

Not to take up too much of your time, but request someone with more knowledge take a peek at my pre start script and the first few lines of my project gcode and offer opinion as to how to streamline my bed leveling so it starts as soon as the bed is at temp allowing the nozzle to heat up while the leveling process is taking place.

 

; Script based on an original created by tjjfvi (https://github.com/tjjfvi)
; An up-to-date version of the tjjfvi's original script can be found
; here: https://csi.t6.fyi/
; Note - This script will only work in Cura V4.2 and above!
; --- Global Settings
; layer_height = {layer_height}
; smooth_spiralized_contours = {smooth_spiralized_contours}
; magic_mesh_surface_mode = {magic_mesh_surface_mode}
; machine_extruder_count = {machine_extruder_count}
; --- Single Extruder Settings
; speed_z_hop = {speed_z_hop}
; retraction_amount = {retraction_amount}
; retraction_hop = {retraction_hop}
; retraction_hop_enabled = {retraction_hop_enabled}
; retraction_enable = {retraction_enable}
; retraction_speed = {retraction_speed}
; retraction_retract_speed = {retraction_retract_speed}
; retraction_prime_speed = {retraction_prime_speed}
; speed_travel = {speed_travel}

; Ender 3 Custom Start G-code
G92 E0 ; Reset Extruder
G28    ; Home all axes
G29 P1 ; run auto bed leveling routine
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

 

pre and post scripts.pdf CE3E3V2_Massey Ferguson Steering Wheel Center Cover.gcode

  • Link to post
    Share on other sites

    • Solution
    Posted · Cura pre and post Script help for Ender 3 v2 with BLtouch

    There isn't actually any code in the startup sequence to heat up anything. But it's easy:

    G92 E0 ; Reset Extruder
    M104 S{material_print_temperature_layer_0} ; start heating up the hot end
    M190 S{material_bed_temperature_layer_0} ; wait for bed to heat up
    G28    ; Home all axes
    G29 P1 ; run auto bed leveling routine
    G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
    G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
    M109 S{material_print_temperature_layer_0} ; wait for hot end to be hot before we start
    G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
    G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
    G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
    G92 E0 ; Reset Extruder
    G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
    G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish

     

  • Link to post
    Share on other sites

    Posted · Cura pre and post Script help for Ender 3 v2 with BLtouch

    When I look at my gcode files after slicing, it looks like Cura is adding a few lines "before" the startup script as follows:

     

    ;FLAVOR:Marlin
    ;TIME:7272
    ;Filament used: 4.89266m
    ;Layer height: 0.2
    ;MINX:85.576
    ;MINY:81.578
    ;MINZ:0.2
    ;MAXX:145.167
    ;MAXY:141.168
    ;MAXZ:16.2
    ;TARGET_MACHINE.NAME:Creality Ender-3
    ;POSTPROCESSED
    ;Generated with Cura_SteamEngine 5.5.0
    M140 S60
    M105
    M190 S60
    M104 S210
    M105
    M109 S210
    M82 ;absolute extrusion mode
    ; Script based on an original created by tjjfvi (https://github.com/tjjfvi)       (first line of startup script)

     

    The heating sequence that I am dealing with is in these lines of code.  I will change my startup script as you suggest and see how it affects how Cura slices.

     

    Thanks!

     

  • Link to post
    Share on other sites

    Posted · Cura pre and post Script help for Ender 3 v2 with BLtouch

    @Slashee_the_Cow

    Your instructions worked great.  With the temperature preheat instructions placed in my startup scripts as you suggest, Cura no longer places any such instructions in my gcode prior to the startup script.

     

    Many Thanks !!

  • Link to post
    Share on other sites

    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.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...