What makes gcode file printable on Prusa?
 
Notifications
Clear all

What makes gcode file printable on Prusa?  

Page 1 / 2
  RSS
Michael Lew
(@michael-lew)
Trusted Member
What makes gcode file printable on Prusa?

Hi, I print fountain pen parts using custom-written gcode files and I've ordered a Prusa MK4 kit to be a production machine. The gcode does not come from a slicer, but it works perfectly on my Voron printer that runs RepRap firmware.

I have tried and failed to have one of my gcode files printed on a buddy's Prusa Mini and am now concerned that I will not be able to print my existing gcode. Can anyone tell me where to find what is needed in a file in order for a Prusa printer to accept it? 

Best Answer by jseyfert3:

I found an error in the end gcode that I added, fixed it, and let my mini print the whole thing. I’ll post the gcode shortly.

Posted : 06/06/2023 9:43 pm
You liked
JC
 JC
(@jc-4)
Active Member
RE: What makes gcode file printable on Prusa?

I think you'll need to learn gcode and examine the first few dozen lines in one of the files and add/remove/modify the gcode instructions to those supported by PRUSA printers.  Start here.

BTW, does the gcode open up in the Prusa Slicer Gcode reader app?

Posted : 07/06/2023 6:42 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: What makes gcode file printable on Prusa?

To the person who sent me a private message: Sorry, the forum won't let me post a private message, perhaps because I only registered this morning... I am in Melbourne, Australia.

Posted : 07/06/2023 6:49 am
jsw
 jsw
(@jsw)
Famed Member
RE: What makes gcode file printable on Prusa?

Prusa printers, at least all of those I've seen, use the Marlin flavor of .gcode for their basic operation, which is very common on the Reprap type printers.

If you have a working hand-coded .gcode file, and want to run it on a Prusa, you might want to look at the various .gcode boilerplates that PrusaSlicer uses, particularly for start-up, but also for ending, layer change, etc.

If your .gcode is failing on a Prusa type printer, chances are that it does not include the proper start-up sequence, which will do such things as set heatbed and nozzle temperatures, wait for those temperatures, do the bed leveling, then the purge line, and then get all things ready for the actual printing.

Posted : 07/06/2023 10:36 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: What makes gcode file printable on Prusa?

Thanks JSW. Yes, it makes sense to examine the startup and ending codes. Do you know if there something special at layer changes beyond a G1 command to a new z value? I noticed that the Prusa gcode has separate lines of G1 commands for layer changes, whereas I typically include Z values along with the X and Y and E in every G1 command. Presumaby that does not cause any trouble.

In fact I inserted my gcode between the startup and end codes of a Prusa Slicer file that prints OK, but the printer failed to print the result. I was not able to supply any preview information for my code and so I omitted the whole preview section (which looks like it might be some sort of binary; is that right?).

This might be hard for me to work through until I have my hands on a Prusa printer, as the person who attempted to print my file is half of the world away. My worry is that I won't find out if it is going to work until after I have recieved and constructed my MK4 kit...

Posted : 07/06/2023 8:48 pm
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE:

Thanks for that resource, JC, it should help. (I think that I used the wrong button for this reply and so it is in the wrong place. I'll have to get used to the forum controls...)

No, I cannot get my gcode to display in the Prusa viewer app. I have assumed that to be a problem of my files including mostly G2 and G3 arc commands that Prusa Slicer never uses. I use the gcode viewer https://ncviewer.com/, but it is not as nice as the Prusa one might be.

I'll play around with adding start and end codes from Prusa Slicer output to get my files to display in the Prusa viewer, and I can pretty easily make a test file without G2 and G3.

Posted : 07/06/2023 8:52 pm
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: What makes gcode file printable on Prusa?

OK, I've fiddled with the PrusaSlicer gcode viewer and have found that it displays my files partially. All of the G1 mov es are displayed and none of the G2 or G3 arcs. Now I am worried that Prusa printers might not do the arcs that make up most of my gcode. I'm going to ask a separate question about G2 and G3.

Posted : 07/06/2023 11:22 pm
jseyfert3
(@jseyfert3)
Reputable Member
RE: What makes gcode file printable on Prusa?
Posted by: @michael-lew

Thanks JSW. Yes, it makes sense to examine the startup and ending codes. Do you know if there something special at layer changes beyond a G1 command to a new z value? I noticed that the Prusa gcode has separate lines of G1 commands for layer changes, whereas I typically include Z values along with the X and Y and E in every G1 command. Presumaby that does not cause any trouble.

In fact I inserted my gcode between the startup and end codes of a Prusa Slicer file that prints OK, but the printer failed to print the result. I was not able to supply any preview information for my code and so I omitted the whole preview section (which looks like it might be some sort of binary; is that right?).

This might be hard for me to work through until I have my hands on a Prusa printer, as the person who attempted to print my file is half of the world away. My worry is that I won't find out if it is going to work until after I have recieved and constructed my MK4 kit...

I am NOT a gcode expert, or even very good at it, but having Z commands every command along with X & Y & E isn't an issue. When PrusaSlicer slices a part in Spiral Vase mode, the Spiral Vase gcode has Z, X, Y, & E commands every step. If you click on the following picture to make it full-size you can see the G code off to the left. There is some other code in there that appears to be related to layer changes, even though Spiral Vase doesn't really have layer changes (it continually rises Z then entire time and never stops moving or extruding)

Posted : 09/06/2023 2:46 pm
jsw
 jsw
(@jsw)
Famed Member
RE: What makes gcode file printable on Prusa?

In my version of PS, all I'm showing in the added gcode at layer change is a G92 E0.0

I would think that if you're hand-coding a .gcode file and have a working file on other printers that speak Marlin, adding the start-up (and shut-down) code should get you very close to what you need.

I would check to be sure that you don't leave in any machine-specific code which might cause a 'fight' between what's needed on one printer and what's needed on the other.

Posted by: @michael-lew

Thanks JSW. Yes, it makes sense to examine the startup and ending codes. Do you know if there something special at layer changes beyond a G1 command to a new z value? I noticed that the Prusa gcode has separate lines of G1 commands for layer changes, whereas I typically include Z values along with the X and Y and E in every G1 command. Presumaby that does not cause any trouble.

In fact I inserted my gcode between the startup and end codes of a Prusa Slicer file that prints OK, but the printer failed to print the result. I was not able to supply any preview information for my code and so I omitted the whole preview section (which looks like it might be some sort of binary; is that right?).

This might be hard for me to work through until I have my hands on a Prusa printer, as the person who attempted to print my file is half of the world away. My worry is that I won't find out if it is going to work until after I have recieved and constructed my MK4 kit...

 

Posted : 11/06/2023 1:28 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: What makes gcode file printable on Prusa?

Thanks for your help, JSW, I appreciate it very much.

It seems that the new beta version of Prusa Slicer will display G2 and G3 arcs so I can now debug my problems much more easily. What's more, @walter-layher has confirmed for me that his MK4 prints arcs properly ( https://forum.prusa3d.com/forum/general-software-discussion/g2-and-g3-arcs-in-prusa/#post-659710) and so I am quite confident that I will be able to get my stuff to print once I have my MK4 (I ordered a kit, so it is still a while off being shipped).

My current printers both use RepRap firmware (they both have Duet boards) and so I cannot easily play with Marlin. However, I thinks I'll get it to work.

Posted : 11/06/2023 1:45 am
jsw
 jsw
(@jsw)
Famed Member
RE: What makes gcode file printable on Prusa?

I do hope I've been somewhat helpful.

In general, I've had poor experiences using anyone else's .gcode files, and I very much prefer to slice my own if at all possible.

Once I tried using a .gcode which was sliced for a MK2 series printer and, for the lack of a better term, it made a butt-ugly print on my machine.

I do admire anyone who can write a hand-coded .gcode file.  The only one I've ever done was a quick and dirty one to raise the extruder and push out the build plate, and I quit using that well over a year ago.

Posted : 11/06/2023 2:03 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: What makes gcode file printable on Prusa?

Writing gcode is not hard as long as you are prepared for a lot of trial and error, with the number of trials and errors being almost identical! My code is certainly not machine-independent, so I'm looking forward to struggling with the MK4...

Posted : 11/06/2023 2:08 am
Hello
(@hello)
Noble Member
RE: What makes gcode file printable on Prusa?

If you uploaded the gcode here some of us could help you 

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 11/06/2023 7:06 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE:

Hello, @hello. Sure. The gcode attached is for the inner portion of the section of my Model 10 pens. I typically print it by homing my Voron V0 manually and pre-heating it before clicking print. Be careful if you try to print the code as is because it does not have any machine settings and does no pre-print stuff. The code did not work when sent to a Prusa Mini.

You can see my finished fountain pens on my website, if you are interested. platypuspens.com

(Interesting. The code has standard Mac line endings (return) that did not work in this field when I pasted the code in. I wonder if I should include line feeds...)

 

Posted : 11/06/2023 7:15 am
Hello
(@hello)
Noble Member
RE: What makes gcode file printable on Prusa?

No gcode was attached please put it in a zip file then upload It those pens look fancy 

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 11/06/2023 7:39 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE:

Zipped and chosen with the Attach file thingie that is below the text entry field.

 
If files have to be zipped then the system should say that.
Posted : 11/06/2023 7:41 am
Hello
(@hello)
Noble Member
RE: What makes gcode file printable on Prusa?

Yeah there has been a big thing on that

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 11/06/2023 7:48 am
Hello
(@hello)
Noble Member
RE: What makes gcode file printable on Prusa?

I'll try editing tomorrow do you have a prusa already or is it just the one you're waiting for 

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 11/06/2023 8:37 am
Hello
(@hello)
Noble Member
RE: What makes gcode file printable on Prusa?

And you said it didn't work on the mini could you tell me what the behavior of it was

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 11/06/2023 8:41 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: What makes gcode file printable on Prusa?

When my buddy tried to print the file on his Mini he said that it "raced thru the % completion, showed 7 seconds duration and didn’t move". 

I'm waiting on my first Prusa, an MK4 kit.

Posted : 11/06/2023 9:26 pm
Page 1 / 2
Share: