Start_print macro not extruding on primer lines

Hi Guys… I found this macro for start_print on the web.

I am still a beginner on these matters, and I am trying to figure out how things work…
To “prime” the extruder, it is supposed to make a line in the front of the printbed. The hotend moves there, and makes the movement of the line, but without extruding any filament…
Could someone throw an eye on it and help me out to see what’s missing there?

Thanks!

#   Define in CURA as Start G-code: 
#	START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}


[gcode_macro START_PRINT]
gcode:
      #Get Printer built volume dimensions
      {% set X_MAX = printer.toolhead.axis_maximum.x|default(100)|float %}
      {% set Y_MAX = printer.toolhead.axis_maximum.y|default(100)|float %}
      {% set Z_MAX = printer.toolhead.axis_maximum.z|default(100)|float %}

      #Get Nozzle diameter and filament width for conditioning
      {% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %}
      {% set FILADIA = printer.extruder.filament_diameter|default(1.75)|float %}

      #Set Start coordinates of priming lines
      {% set X_START = 10.0|default(10.0)|float %}
      {% set Y_START = 20.0|default(20.0)|float %}

      #Calculate Primer line extrusion volume and filament length
      {% set PRIMER_WIDTH = 0.75 * NOZZLE %}                    
      {% set PRIMER_HEIGHT = 0.70 * NOZZLE %}           
      {% set PRIMER_SECT = PRIMER_WIDTH * PRIMER_HEIGHT %}    
      {% set PRIMER_VOL = PRIMER_SECT * (X_MAX - 3 * X_START) %}    
      {% set FILA_SECT = 3.1415 * ( FILADIA / 2.0)**2 %}          
      {% set FILA_LENGTH = 1.55 * PRIMER_VOL / FILA_SECT %}      

      #Get Bed and Extruder temperature from Slicer GCode
      {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
      {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
      #Preheat nozzle and bed
      M104 S{EXTRUDER_TEMP} T0                        
      M140 S{BED_TEMP}                                

      #Home
      G28

      #Move up to clean bed
      G1 Y{Y_MAX - 20} Z{Z_MAX/4.0} F6000                

      #Heat nozzle and bed
      M190 S{BED_TEMP}                               
      M109 S{EXTRUDER_TEMP} T0                       

      #Precondition extruder
      G92 E0     
      G1 X{X_START} Y{Y_START} Z{PRIMER_HEIGHT} F6000.0     
      G1 X{X_MAX - 2 * X_START} Y{Y_START} Z{PRIMER_HEIGHT} F2000.0 
      G1 X{X_MAX - 2 * X_START} Y{Y_START + PRIMER_WIDTH} Z{PRIMER_HEIGHT} 
      G1 X{X_START} Y{Y_START + PRIMER_WIDTH} Z{PRIMER_HEIGHT} F2000.0 
      G92 E0            
      G1 Z2.0 F600        
      G1 Z0.2 F600        
      G1 Z2.0 F600

In the prime section, there is no value for extrusion. Evalue with value the amount to extrude.

https://reprap.org/wiki/G-code#G0_.26_G1:_Move

1 Like

ok, so that would be something like:

      G1 X{X_START} Y{Y_START} Z{PRIMER_HEIGHT} F6000.0     
      G1 X{X_MAX - 2 * X_START} Y{Y_START} Z{PRIMER_HEIGHT} F2000.0 
      G1 X{X_MAX - 2 * X_START} Y{Y_START + PRIMER_WIDTH} Z{PRIMER_HEIGHT} E{FILA_LENGTH}
      G1 X{X_START} Y{Y_START + PRIMER_WIDTH} Z{PRIMER_HEIGHT} E{FILA_LENGTH} F2000.0 

Also already in the second line:

Note, that the length in the third line is way less than in the other two lines.

1 Like

That worked!

Thank you for the help!!

1 Like