Notifications
Clear all

[Solved] 2.4.0 end gcode wierdness  

  RSS
Fatmann Makes
(@fatmann-makes)
Active Member
2.4.0 end gcode wierdness

running Version 2.4.0+win64  prusa mini profile

since the update  printer head  now stops  at the top left of the bed at Z0.  

previous  gcode from older version of the software. the print head would park and then raise  on the top right of the bed. 

I compared the end gcode from an old file and the current settings in  the printer profile  they are almost the same. the "end if" is moved slightly within the line.  

I copied  out the old  end gcode from the old file and  used this  as my end gcode. when sliced in 2.4.0 it does the same. ends at the top left a Z0. 

It looks to be how it process the variables in the IF statement.  if I comment out the last line (if.... z +30) and add a G91 then a G1 z30 

it basically does what it should  parks and then raises 30 staying at the top right (park position)

none of this really makes any sense.  reading the file  Gcode  it clearly shows: G1 Z30.4 F720 ; Move print head further up

that is the last G1 command so I have no idea how it moves  to the other side of the bed  at z0

see snippet of the end of the file. 

G1 Z30.4 F720 ; Move print head further up
G4 ; wait
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
M221 S100 ; reset flow
M900 K0 ; reset LA
M84 ; disable motors
M73 P100 R0

I would say it's the machine, but the older files act as then should. and have the basic same end moves.  

I'm at a loss as to what's causing it.  if anyone has suggestions or wants to see the 2 files or a vid of it actually doing it let me know. 

Best Answer by Neophyl:

Can I ask what version firmware you guys are runing on your mini's ?  There was as issue where long gcode comments were causing the printer to do non standard things at the end.  Was supposed to be fixed in 4.3.2 - rc1.

https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/864
or https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/733  

Wondering if it could be the same thing.  If the comment produced by 2.4 are longer then that would trigger the issue while 2.3 would be ok.

Posted : 06/02/2022 10:08 pm
Neophyl
(@neophyl)
Illustrious Member
RE: 2.4.0 end gcode wierdness

Please save a project file from Prusa slicer that generates this issue and then zip it up and attach it to a post here. Must be zipped or the forum won’t allow it. With a 3mf project we get a snapshot of all your settings, so we can check out everything. 

Posted : 06/02/2022 10:45 pm
Fatmann Makes
(@fatmann-makes)
Active Member
Topic starter answered:
RE: 2.4.0 end gcode wierdness

Shape-Cylinder

see attached zip file

Posted : 07/02/2022 3:51 am
Fatmann Makes
(@fatmann-makes)
Active Member
Topic starter answered:
RE: 2.4.0 end gcode wierdness

is it just me then?

Posted : 12/02/2022 8:51 pm
Neophyl
(@neophyl)
Illustrious Member
RE: 2.4.0 end gcode wierdness

Sorry, missed your reply, the forum didn't send me a notification.

The gcode output from the project looks ok.  Same with the preview of what is output.  Moves up 2mm, then Extruder moving to the back right corner, presenting the bed forwards for easier print removal and then moving up another 30mm.  That looks like what is in your end gcode.  Any time I use any viewer thats what the thing shows.

If you do a compare of the old gcode and new gcode that you have what exactly are the line differences i the gcode ?  For the end section I mean once its finished printing.
Are you printing direct to the printer or using something like octoprint ?

Just trying to think of any possible things that could influence printing. 

Also while those endif statements being after comments doesnt seem to be effecting the gcode generated, personally that doesnt sit right with me so I'd move them to before the line comment.  Just the ocd part of me.

 

Posted : 14/02/2022 1:48 pm
bobstro
(@bobstro)
Illustrious Member
RE: 2.4.0 end gcode wierdness
Posted by: @fatmann-makes

[...] I copied  out the old  end gcode from the old file and  used this  as my end gcode. when sliced in 2.4.0 it does the same. ends at the top left a Z0. 

This will be a problem. The gcode generated and inserted into a gcode file for printing has been pre-processed. Any slicer variables have been replaced with absolute values. In your example, the following line:

G1 Z30.4 F720 ; Move print head further up

Will either move the nozzle up 30.4mm from the current position, or to the absolute position of 30.4mm above the bed, which means it might crash into your print. The actual end g-code line used in PrusaSlicer for the Mini is:

{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720 ; Move print head up{endif}

Which will be interpreted as "move up from top-most print position" (the lower of twice layer height or max print height) and those values inserted in the generated gcode file. In other words, don't copy gcode directly from a print file if you want to make moves at the end of a print.

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

Posted : 14/02/2022 3:38 pm
Fatmann Makes
(@fatmann-makes)
Active Member
Topic starter answered:
RE: 2.4.0 end gcode wierdness

 

Posted by: @bobstro

Which will be interpreted as "move up from top-most print position" (the lower of twice layer height or max print height) and those values inserted in the generated gcode file. In other words, don't copy gcode directly from a print file if you want to make moves at the end of a print.

To further clarify  I pulled the end gcode  settings out of the comments of the old .gcode file.   I didn't pull the actual gcode G1... moves out and dump them in the end of  a new file that would be illogical. 

Posted : 14/02/2022 8:41 pm
bobstro liked
Fatmann Makes
(@fatmann-makes)
Active Member
Topic starter answered:
RE: 2.4.0 end gcode wierdness

@neophyl.  yeah I did move those statements back it didn't make any difference.  both the old and new are printing off the usb drive. so No to octoprint etc.  I'll pull a snippets of both gcodes out and post once I'm off work.  But  when I compared them  I couldn't see that additional move in the code.  hopefully you will see what I missed.

 

thanks

Posted : 14/02/2022 8:57 pm
bobstro
(@bobstro)
Illustrious Member
RE: 2.4.0 end gcode wierdness
Posted by: @fatmann-makes

 [...] To further clarify  I pulled the end gcode  settings out of the comments of the old .gcode file.   I didn't pull the actual gcode G1... moves out and dump them in the end of  a new file that would be illogical. 

Ah, makes sense. There was someone long ago who insisted on adding a Z move that would drive the nozzle down into the completed print when done. I thought this might be something like that. 

The gcode generated from your 3MF looks fine. I'd expect the nozzle to wind up at X178 Y178 Z30.2.

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

Posted : 14/02/2022 10:44 pm
Fatmann Makes
(@fatmann-makes)
Active Member
Topic starter answered:
RE:

sample files

I don't see any real difference in the code.  

here is the circle code (one with the issue)

; stop printing object Shape-Cylinder id:0 copy 0
G1 E-2.24 F4200
;WIPE_START
G1 F7200;_WIPE
M73 P87 R0
G1 X89.223 Y89.725 E-.51521
G1 F7200;_WIPE
G1 X89.105 Y89.579 E-.10383
G1 F7200;_WIPE
G1 X88.953 Y89.289 E-.18171
G1 F7200;_WIPE
G1 X88.896 Y89.096 E-.11126
;WIPE_END
G1 E-.048 F4200
G1 Z.4 F720
M107
;TYPE:Custom
; Filament-specific end gcode
G1 E-1 F2100 ; retract
G1 Z2.2 F720 ; Move print head up
G1 X178 Y178 F4200 ; park print head
M73 P88 R0
G1 Z30.2 F720 ; Move print head further up
G4 ; wait
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
M221 S100 ; reset flow
M900 K0 ; reset LA
M84 ; disable motors
M73 P100 R0

and here is the old cross code that works fine

;WIPE_START
G1 F7200.000;_WIPE
G1 X92.096 Y89.511 E-0.91200
;WIPE_END
M73 P95 R0
G1 E-0.04800 F4200.000
G1 Z1.800 F9000.000
M107
;TYPE:Custom
; Filament-specific end gcode
G1 E-1 F2100 ; retract
G1 Z3.8 F720 ; Move print head up
G1 X178 Y178 F4200 ; park print head
M73 P97 R0
G1 Z31.8 F720 ; Move print head further up
G4 ; wait
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
M221 S100 ; reset flow
M900 K0 ; reset LA
M84 ; disable motors
M73 P100 R0

attached is a zip of both 

I also shot a video of both prints so you can see what I mean 

Posted : 15/02/2022 1:09 am
Honza
(@honza-2)
Active Member
RE: 2.4.0 end gcode wierdness

I have the same problem as @fatmann-makes. I'm sending a G-code.
Version 2.4.0+win64 prusa mini profile

slicer_problem

Posted : 16/02/2022 10:33 am
Siraph
(@siraph)
New Member
RE: 2.4.0 end gcode wierdness

 

Posted by: @honza-5

I have the same problem as @fatmann-makes. I'm sending a G-code.
Version 2.4.0+win64 prusa mini profile

slicer_problem

I, too, am having the exact same problem. I had to go find an old install of PrusaSlicer for 2.3.1 to have my print head to stop crashing into some of my prints. Unfortunately, on a gcode viewer, the tool head looks like it's supposed to go to the correct spot. Simply... well... doesn't on 2.4.0.

Posted : 17/02/2022 10:12 am
DroneOn
(@droneon)
New Member
RE: 2.4.0 end gcode wierdness

Same issue here PrusaSlicer 2.4.0+Win64. 17 hour print ruined when the heater block buried itself in the print at the left rear.

Posted : 21/02/2022 3:23 am
Neophyl
(@neophyl)
Illustrious Member
RE: 2.4.0 end gcode wierdness

Can I ask what version firmware you guys are runing on your mini's ?  There was as issue where long gcode comments were causing the printer to do non standard things at the end.  Was supposed to be fixed in 4.3.2 - rc1.

https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/864
or https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/733  

Wondering if it could be the same thing.  If the comment produced by 2.4 are longer then that would trigger the issue while 2.3 would be ok.

Posted : 21/02/2022 8:40 am
Fatmann Makes
(@fatmann-makes)
Active Member
Topic starter answered:
RE: 2.4.0 end gcode wierdness

4.2.1-final+2072

Confirmed: If I delete all the comments at the end of the gcode file, then print completes normally. 

Posted : 22/02/2022 2:21 am
Siraph
(@siraph)
New Member
RE: 2.4.0 end gcode wierdness

Ah, I'm on 4.3.1. I'll try a print on updated and newer version of the slicer. Thanks for that!

Posted : 22/02/2022 5:23 am
Neophyl
(@neophyl)
Illustrious Member
RE: 2.4.0 end gcode wierdness

Its good to know why 🙂  See this is why I skim over the various Prusa githubs.  While I dont have a mini it can often pay off to occassionally skim the issue titles for all their projects and theres always search when looking for something specific.

Posted : 22/02/2022 7:40 am
Share: