How to have the Bed not move down so far at end of print
 
Notifications
Clear all

How to have the Bed not move down so far at end of print  

  RSS
Shawn
(@shawn-2)
New Member
How to have the Bed not move down so far at end of print

Just a quick question, when my print is done using Prusa it moves the Bed of my Ender 5 pro almost to the very bottom. usually I don't print anything the full 300 mm of space so just about crushed some things lol when it did that. I know in Prusa there is an area to set Gcode for the end of the print, problem is its using some formula that I don't know about. so I am not able to figure out what to change.

I know I need to change something in the highlighted blue area here. instead of it moving the bed almost to the floor I would rather that

it only go down like half way maybe. which I guess would be 150MM. but all I see here is the # 2 which I am not sure what that is. If its CM that would still only be 20MM correct. which it seems to go farther then that. Any help would be appreciated.

{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600{endif} ; Move print bed down
G1 X50 Y50 F{travel_speed*60} ; present print
{if max_layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10} F600{endif} ; Move print bed down further down
M140 S0 ; turn off heatbed
M104 S0 ; turn off temperature
M107 ; turn off fan
M84 X Y E ; disable motors

Publié : 14/04/2021 3:11 pm
bobstro
(@bobstro)
Illustrious Member
RE: How to have the Bed not move down so far at end of print

You've got 2 move commands highlighted in blue, which can cause problems if both aren't correct. The 1st will be executed, then the 2nd. Both are using complicated PrusaSlicer/Slic3r conditional gcode syntax. It helps to parse what each of these is doing. First the placeholders (variables in regular programming):

  • max_layer_z: The maximum height of your sliced print. Note that this is only evaluated a SLICE time, not at PRINT time. This is a value in the slicer that is set to the maximum height of your print in mm.
  • max_print_height: The maximum Z height of your printer in mm.
  • z_offset: A value set in your printer profile (Printer Settings->General->Size and coordinates) to adjust the Z offset. Set to 0 for Prusas and likely other printers. An adjustment for endstops. 

Those blue lines are written in PrusaSlicer's gcode syntax. The bits between curly brackets ({}) are conditional code. Any placeholder names inside those brackets will be replaced with the actual values at slice time and any math evaluated. This line:

{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F600{endif} ; Move print bed down

Is evaluated as:

If the maximum Z height for this sliced print (max_layer_z) is less than the maximum Z height for your printer (max_print_height) then

Insert a gcode command consisting of "G1 Z" followed by z_offset (usually 0) plus the lesser (min) of the  maximum Z height for this print + 2 OR the maximum Z height for your printer, followed by a speed settings (F600) of 600 mm/m or 10mm/s. 

Otherwise do nothing.

This line should move the bed 2mm above the top of your print. So far so good. This moves the nozzle away from the print a bit. This next line is the likely culprit:

{if max_layer_z < max_print_height-10}G1 Z{z_offset+max_print_height-10} F600{endif} ; Move print bed down further down

This line is evaluated as:

If the maximum Z height for this sliced print (max_layer_z) is less than the maximum Z height for your printer (max_print_height) MINUS 10 then

Insert a gcode command consisting of "G1 Z" followed by z_offset (usually 0) plus the maximum Z height for your printer -10, followed by a speed settings (F600) of 600 mm/m or 10mm/s. 

Otherwise do nothing.

So what is happening is that the 1st line moves the nozzle away from the print 2mm, which sounds like what you want. The 2nd line then moves the nozzle to a distance 10mm short of your maximum Z height. I'd remove the 2nd line and just edit the 1st to move the nozzle to a comfortable distance with something like:

 {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+20, max_print_height)} F600{endif} ; Move print bed down

Notice that I just edited the amount added to max_layer_z. Adjust this to be whatever distance you want. The conditional gcode will move to this distance or your maximum Z position without any worry about causing grinding caused by trying to move beyond your maximum Z position.

If you wanted to spend some time crafting the gcode, you could probably position it so the top of the print always winds up at the 150mm mark, but that will only apply to shorter prints and doesn't really gain you anything.

 

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Publié : 14/04/2021 3:50 pm
Vous et ont aimé
Shawn
(@shawn-2)
New Member
Topic starter answered:
RE: How to have the Bed not move down so far at end of print

Thank you very much. I knew that it was Code more or less just wasnt real sure what the 2 stood for. Now i do. its just raising it above the print.

and yes 20MM above the print will work for me. or at least now i know that i can make it a little farther with just that number to be easier to remove the print with out it going all the way down 300MM :).

 

thanks again for the explination.

Publié : 14/04/2021 4:47 pm
Vous a aimé
languer
(@languer)
Trusted Member
RE: How to have the Bed not move down so far at end of print

@bobstro

Thank you for the succinct explanation. It helped me a lot, specially to understand the difference between "max_layer_z" and "max_print_height".

Publié : 06/12/2021 7:29 am
Jonathan Decker
(@jonathan-decker)
New Member
RE: How to have the Bed not move down so far at end of print

you could use a  g91 then g0 z20 at the end of the print  

just make sure you turn g90 back on 

 

Publié : 09/07/2022 10:56 pm
Partager :