Notifications
Clear all

G2 and G3 arcs don't work properly on MK4  

Strona 1 / 2
  RSS
Michael Lew
(@michael-lew)
Trusted Member
G2 and G3 arcs don't work properly on MK4

I have recently completed my MK4 printer kit. It is my first Prusa printer and it prints really nicely indeed. I'm happy in that regard. However, it seems that the MK4 firmware does not properly handle G2 and G3 arc commands and that makes my new machine close to useless for me.

I print mostly gcode files that you might call 'hand-coded' because there is no slicer used to make them. As the objects are mostly circular I make extensive use of G2 and G3 controlled arc commands, and my gcode files work perfectly on my two older printers, both of which run RepRap firmware.

My problem is that my new MK4 ignores the Z parameter of G2 and G3 commands. That means that my files fail to print correctly from the first arc command that changes the Z height. It is not possible to use an arc in, for example, a vase-style print.

This is a follow-on from a previous thread that I started before my MK4 was ready to ship. In that thread user jseyfert3 was able to confirm that the Prusa Mini is capable of printing my gcode correctly, but my MK4 will not. It seems to me to be an MK4-specific issue.

Michael Lew

Platypus Pens  https://platypuspens.com/

Opublikowany : 04/08/2023 12:53 am
jseyfert3
(@jseyfert3)
Reputable Member
RE: G2 and G3 arcs don't work properly on MK4

I saw the title and your name and I was like "oh no!"

Seems really odd that it would process the G2 and G3 commands for X, Y, and E but not Z.

In addition to the MINI, I now have my MK4 and I'm happy to help try this again on mine, to help rule out some odd or glitch, but I'll be away from my printer until Sunday evening.

Opublikowany : 04/08/2023 5:01 pm
ssmith
(@ssmith)
Eminent Member
RE: G2 and G3 arcs don't work properly on MK4

Using a MK4 with firmware 4.7.2, it looks to me like G2 and G3 do handle the Z axis correctly. For a test I saved the gcode for a minimal shape-cylinder MK4 project and pasted 'M10 Jowo inner.gcode' in place of the gcode for the shape-cylinder. I got a part that looks much like then one @jseyfert3 printed on then Mini.

Opublikowany : 04/08/2023 9:56 pm
jseyfert3 polubić
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: G2 and G3 arcs don't work properly on MK4

My MK4 has firmware 4.7.1, so maybe they've fixed my problem before I asked about it.

I did install the most current firmware after I first set up the printer, so it looks like I just missed 4.7.2. I'll install the update and give it a burl in a couple of hours. I have my fingers crossed that it works for me because I'm really liking the printer other than that fatal flaw!

Opublikowany : 04/08/2023 10:04 pm
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: G2 and G3 arcs don't work properly on MK4

@jseyfert3, thank you for your continued assistance! Here is a file for a more interesting test object. It looks particularly good with a silk PLA. I have used the header and footer sections for MK4 from a PrusaSlicer file for a different object, so the thumbnail looks different. If you watch it closely while printing you will see that I've made the inner and outer perimeters interlock.

Opublikowany : 04/08/2023 10:12 pm
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
Preliminary trial of 4.7.2

I have now installed 4.7.2 firmware and tried printing. Unfortunately the results seem the same as before, with the single walled portions with G2 or G3 commands being all printed at the same z height. I'll do some more testing, but I don't think that the update has fixed the issue, particularly given that the update notes do not mention anything about arc commands.

@ssmith, did you print the entire object? The failure happens about half way up where the single wall portion starts because that is where the Z parameters of the arc commands start to matter. If your were able to print the object successfully on an MK4 then there must be something strange going on.

Opublikowany : 04/08/2023 10:41 pm
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE:

OK, I've now done more tests and it is clear that my MK4 with firmware 4.7.2 behaves just the same as with 4.7.1: G2 or G3 arcs do not pay any attention to their Z parameter.

Here is a simpler test object. It should be a 10mm tall single walled cylinder. The first 5mm is made with G3 arcs arranged in standard layers with a G1 layer change after each full circle. In that portion of the model the Z parameters are not needed and so that portion of the model prints fine. The second 5mm of the cylinder is done as a helix (like a vase-mode print) where each G3 arc should end at a slightly higher Z level than it starts. In that portion of the model the Z parameters are essential. The header and footer stuff is from Prusa Slicer and the model gcode is written by my software.

On my machine the first 5mm prints properly properly (it has a nice zipper-style seam that you might find interesting) but the last 5mm prints without any further Z axis movement.

@jseyfert3, I would be grateful if you gave this file a go on your Mini. You would probably have to replace the header and footer portions with the appropriate stuff for the Mini.

 

Opublikowany : 05/08/2023 12:05 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
Bug report submitted

I've decided that this is likely a bug and have submitted a report here: https://github.com/prusa3d/Prusa-Firmware/issues/4317

Opublikowany : 05/08/2023 12:29 am
ssmith
(@ssmith)
Eminent Member
RE: G2 and G3 arcs don't work properly on MK4

I didn't print the full file, didn't realize the issue was in the upper portion. Sorry for the miscue.

Opublikowany : 05/08/2023 1:15 am
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: G2 and G3 arcs don't work properly on MK4

No worries @ssmith, that file was not a particularly good choice for demonstrating the problem. I originally uploaded the object for a slightly different purpose. The Arc-test-cylinder gives a much quicker example.

Opublikowany : 05/08/2023 1:52 am
jseyfert3
(@jseyfert3)
Reputable Member
RE: G2 and G3 arcs don't work properly on MK4

I can do that, but I temporarily had taken my mini to work so it’ll be at least Monday before I can do that.

Posted by: @michael-lew

OK, I've now done more tests and it is clear that my MK4 with firmware 4.7.2 behaves just the same as with 4.7.1: G2 or G3 arcs do not pay any attention to their Z parameter.

Here is a simpler test object. It should be a 10mm tall single walled cylinder. The first 5mm is made with G3 arcs arranged in standard layers with a G1 layer change after each full circle. In that portion of the model the Z parameters are not needed and so that portion of the model prints fine. The second 5mm of the cylinder is done as a helix (like a vase-mode print) where each G3 arc should end at a slightly higher Z level than it starts. In that portion of the model the Z parameters are essential. The header and footer stuff is from Prusa Slicer and the model gcode is written by my software.

On my machine the first 5mm prints properly properly (it has a nice zipper-style seam that you might find interesting) but the last 5mm prints without any further Z axis movement.

@jseyfert3, I would be grateful if you gave this file a go on your Mini. You would probably have to replace the header and footer portions with the appropriate stuff for the Mini.

 

 

Opublikowany : 05/08/2023 2:07 am
ssmith
(@ssmith)
Eminent Member
RE: G2 and G3 arcs don't work properly on MK4

Yes, the arc-test-cylinder file is a good simple example. I printed it on my Mini, and got the full 10mm object as intended.  On the MK4 the upper half has no Z travel as you point out.

Opublikowany : 05/08/2023 2:54 am
jseyfert3 polubić
Hunterprime
(@hunterprime)
Member
RE: G2 and G3 arcs don't work properly on MK4

I can do a test on the latest IS shaping firmware 5.0.0-alpha4+11702 for the MK4. Honestly expecting the same results but figured I can help out since I already have it loaded. 

Opublikowany : 05/08/2023 3:01 am
jseyfert3 polubić
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: G2 and G3 arcs don't work properly on MK4

Thanks for that test. I'll look at adding it to the bug report.

Opublikowany : 05/08/2023 3:54 am
Diem
 Diem
(@diem)
Illustrious Member
RE: G2 and G3 arcs don't work properly on MK4

Not truly a bug, all this is documented:

https://help.prusa3d.com/article/prusa-specific-g-codes_112173#g-codes

https://reprap.org/wiki/G-code#G2_.26_G3:_Controlled_Arc_Move

Cheerio,

Opublikowany : 05/08/2023 7:44 pm
Michael Lew
(@michael-lew)
Trusted Member
Topic starter answered:
RE: G2 and G3 arcs don't work properly on MK4

Well, in both the 8-bit firmware for i3 and 32 bit for the Mini both support arcs in X,Y, and Z, so that documentation is not entirely correct.

Seems I bought a Prusa MK4 for a purpose for which it is unsuited.

Opublikowany : 05/08/2023 9:23 pm
ssmith
(@ssmith)
Eminent Member
RE: G2 and G3 arcs don't work properly on MK4

Have you tried the IJK mode helix?

Opublikowany : 06/08/2023 3:24 pm
jseyfert3
(@jseyfert3)
Reputable Member
RE: G2 and G3 arcs don't work properly on MK4

So what's interesting to me is that the link to RepRap gcodes implies that RepRap does not support Z-axis movement during a G2/G3 command, as Z is not listed in the command as an option you can enter, unlike G0/G1. Prusa g-code confirms this, as they too do not list the Z portion of a G2/G3 command. Additionally, they say they the commands do not work properly with mesh bed leveling enabled, as the compensation happens only at the end of a move, so avoid long arcs.

That doesn't explain why G2/G3 supports Z-axis on the Mini though. The firmware on the Mini is from the same repository as the firmware for the MK4/XL. That said, the Mini is largely ignored, last firmware update was January, and I've read people say the current firmware compiles to a size that won't even fit on the Mini. So it's unclear if the reason it works on the Mini is because something is different in the default configs between the Mini and MK4, or because Z-axis movement was disabled/broke in later firmware revisions.

For the sake of completeness, I printed the arc test cylinder on my MK4 and yes, it failed. I had to stop it because it was just extruding in a circle without raising Z at all. I still don't have my Mini, but someone in this thread already tried it on their Mini and said it worked. And the commands look no different in that file vs the file I previously printed on my Mini.

Opublikowany : 07/08/2023 12:32 pm
jseyfert3
(@jseyfert3)
Reputable Member
RE: G2 and G3 arcs don't work properly on MK4

I looked at the source code, and the G2_G3.cpp, which is the portion of the code that actually converts the G2/G3 commands into printer movement, says it's for arcs in two dimensions. The arc can be on the XY, YZ, or ZX plane (only the XY plane seems useful for 3-axis FDM printers), but it appears it's only on the plane, you can't tilt the plane. This code is part of the Marlin Firmware. Again, that begs the question...why does it work on the Mini then?

Finally, I know it would make your gcode files really large, but is there any reason you can't either change your code to generate G1 commands, or even easier, use ArcWelder in reverse (technically ArcStraightener) to convert your existing files to G1 commands?

On a related note, the ArcWelder readme says this about 3D arcs:

Allow 3D Arcs

This option allows G2/G3 commands to be generated when using vase mode. This is an experimental option, and it's possible that there are some unknown firmware issues when adding Z coordinates to arc commands. That being said, I've gotten pretty good results from this option. At some point, this will be enabled by default.

Opublikowany : 07/08/2023 12:48 pm
jseyfert3
(@jseyfert3)
Reputable Member
RE: G2 and G3 arcs don't work properly on MK4

Nevermind, it appears ArcStraightener, umm, “needs work”. 

Opublikowany : 07/08/2023 1:17 pm
Strona 1 / 2
Share: