Notifications
Clear all

Issue with custom inkscape gcode causing restarts and timeouts  

  RSS
Reven
(@reven)
New Member
Issue with custom inkscape gcode causing restarts and timeouts

Hi,

I've printed some models to attach pens to the printhead and have plotted some vector art with the MK3S+. For Gcode generation I've used Incscape's gcodetools extension. Some of the results have been really nice, but I have some minor issues with the generated gcode and the way the Prusa handles it:

  • If printing from the SD card, the printer always complains that the file is incomplete. What gcode commands is the firmware expecting at the end of the file? Is there something I can add to prevent this? A Prusa specific comment?
  • On some files I get inactivity timeouts and the printer locks down. I've tried to add an M85 command to the gcode header, but this doesn't always work. Octoprint is even worse, because a timeout will cause octoprint to halt the printer and disconnect.
  • When the print succeeds, it doesn't do it cleanly. It's only as if the error happens the same, only when (thankfully) the drawing is complete; the printer restarts. This may be related to the issue with seeing the files as incomplete.

As an example, below is a file I've generated. I've changed the header and footer and I've also removed all of gcodetools CNC style comments in brackets, in case the Prusa firmware was tripping on those.

Hope someone can help. Thanks!

;
; custom header
;
M85 0 ; disable timeout
G21 ; set units to millimeters
G90 ; Set all axes to absolute
G1 Z15 F8000 ; raise head just in case we're homed on z
G1 X0 Y0 ; home x and y
;G92 X-43 Y-35 ; set coordinates. Displaces 0,0 reference if gcode is generated without offset
G00 Z15.000000
G00 X180.216609 Y81.148754
G01 Z10.000000 F8000.0
G01 X183.897144 Y84.336196 Z10.000000 F8000.000000
G00 Z15.000000
G00 Z15.000000
G00 X179.848543 Y80.830010
...
G01 X179.756537 Y102.132750 Z10.000000 F8000.000000
G01 X178.836407 Y103.195231 Z10.000000
G01 X179.296465 Y104.523332 Z10.000000
G01 X180.676667 Y104.788952 Z10.000000
G01 X185.277347 Y101.707757 Z10.000000
G00 Z15.000000
G00 Z15.000000
G00 X184.817274 Y101.867130
G01 Z10.000000 F8000.0
G01 X180.216609 Y103.460851 Z10.000000 F8000.000000
G00 Z15.000000
;
; custom footer
;
G1 X0.000 Y180.000
Posted : 26/03/2021 12:54 am
bobstro
(@bobstro)
Illustrious Member
RE: Issue with custom inkscape gcode causing restarts and timeouts
Posted by: @reven
  • [...] If printing from the SD card, the printer always complains that the file is incomplete. What gcode commands is the firmware expecting at the end of the file? Is there something I can add to prevent this? A Prusa specific comment?

Sounds like an interesting project. It's probably looking for the gcode command to shut down the motors:

M84 ; disable motors
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 : 26/03/2021 5:04 am
Reven
(@reven)
New Member
Topic starter answered:
RE: Issue with custom inkscape gcode causing restarts and timeouts
Posted by: @bobstro

It's probably looking for the gcode command to shut down the motors:

M84 ; disable motors

That's it! It worked flawlessly, thank you so much! As soon as I have everything working I'll post my files to my profile.

 

Posted : 26/03/2021 5:36 am
Share: