-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gcode fails on Craftbot flow without prepending a 0. prior to moves or extrudes #6996
Comments
I am not sure I understand. We are not emitting such commands as far as I know. g-code generated from your project file: |
I've attached my current print settings along just in case but pretty sure it has nothing to do with the issue. Line 3003: G1 E.52542 F1800 |
Hmm. What language do you have set in the PrusaSlicer? Also in what language is your OS? |
Both are in English |
I just checked the Windows 64 bit released version of 2.3.3, and the problem did not exist there. So it was somewhere after that, that there was a change made. Hope this helps a little |
@lunatic1972 Thanks, reproduced. The fix is on the way. |
Just fixed my regex yesterday, because of missing leading zeros. My postprocessor skipped through that part. |
Wait a minute: https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374 Based on the G-code norm, the leading or trailing zeros do not need to be emitted. Which products could not consume such a valid G-code? |
Ok! I found the issue! The issue was with my post processing, because I expected "0.2" (as in first layer height) and then it failed because it has never found "0.2" -> "Z.2" is not equal to "Z0.2". |
I would agree that it really is a strange thing to fail on since numerically they are identical however the Predator processor for Craftbot apparently doesn't see it that way since it gets processed as text obviously. Hopefully this fix will help others and I'm definitely grateful the PrusaSlicer team is so very responsive. Keep up the great work! |
Frankly if the only software that cannot process such a G-code is some
"Predator processor for Craftbot", then we would ask the "Predator
processor for Craftbot" to be fixed.
čt 23. 9. 2021 v 12:35 odesílatel lunatic1972 ***@***.***>
napsal:
… Wait a minute:
https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374
page 17, 3.3.2.1 Number.
Based on the G-code norm, the leading or trailing zeros do not need to be
emitted.
Which products could not consume such a valid G-code?
I would agree that it really is a strange thing to fail on since
numerically they are identical however the Predator processor for Craftbot
apparently doesn't see it that way since it gets processed as text
obviously. Hopefully this fix will help others and I'm definitely grateful
the PrusaSlicer team is so very responsive. Keep up the great work!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6996 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMPSI6FFTZNZE5B7W5O6J3UDL7FXANCNFSM5EROTT6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I agree and disagree but here's why. In the version that was released on GitHub for 2.3.3 the g-code generated by PrusaSlicer and prior did have the 0. prepended to numbers whereas somewhere after that it changed so I personally think it should stay consistent. G-code generation should be consistent throughout. But I will also reach out to CraftBot on the issue since it really is out of spec per the document |
I have a mixed feeling about the topic as well. Let's wait for wider response. |
@lukasmatena In 2.40-beta1, I am observing extrusion lengths in the emitted G-code without a leading zero. Did your fix not make it to that version? |
@mroek we did not change that. Why are missing leading zeros a problem for you? The G-code is perfectly valid according to the G-code specification. |
@bubnikv When I saw this issue, I thought it could be an issue for me, since I am using a Craftbot. However, my Craftbot is not the Flow model, and it appears that my model is not affected by this (so not really an issue for me). However, even if the specification allows for dropping the leading zero, previous Prusaslicer versions did include that zero, so removing it could cause issues for some printers (like the Craftbot Flow, apparently), and for no good reason. I think it makes sense to keep it for consistency, even if I agree that printers definitely should handle distances that lacks the leading zero. So in short, I think Prusaslicer should include the zero (and it also makes the G-code more readable for humans), and I think that Craftbot should fix their firmware as well. |
@mroek The alphas / betas are there to collect feedback. If Craftbot Flow
is the only reason to roll back, I would not do it.
út 26. 10. 2021 v 12:25 odesílatel mroek ***@***.***> napsal:
… @mroek <https://github.com/mroek> we did not change that. Why are missing
leading zeros a problem for you? The G-code is perfectly valid according to
the G-code specification.
@bubnikv <https://github.com/bubnikv> When I saw this issue, I thought it
could be an issue for me, since I am using a Craftbot. However, my Craftbot
is not the Flow model, and it appears that my model is not affected by this
(so not really an issue for me).
However, even if the specification allows for dropping the leading zero,
previous Prusaslicer versions did include that zero, so removing it could
cause issues for some printers (like the Craftbot Flow, apparently), and
for no good reason. I think it makes sense to keep it for consistency, even
if I agree that printers definitely should handle distances that lacks the
leading zero.
So in short, I think Prusaslicer should include the zero (and it also
makes the G-code more readable for humans), and I think that Craftbot
should fix their firmware as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6996 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMPSI3BJUNHU47XL5QFDL3UI2F2DANCNFSM5EROTT6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@bubnikv But why was it changed in the first place? It doesn't harm anything (other than a slightly large file size) to have that zero in front of the decimal point, does it? And arguably, it looks better when inspecting the file manually. Other than that, as I've already said, I think Craftbot should also fix their parser. |
Just make a short (Python) post processing script to change all F-numbers. Then PS can focus on something else and you get valid gcode for your machine. |
That's besides the point, really. And as I said, my machine does handle it correctly, so I'm not advocating for myself here. I'm just wondering why it was changed in the first place, because whenever possible I think it makes sense to try to stay consistent. Previous versions of PS did print those zeros (and I think most other slicers do too). Also the change to fix it has already been done, and it's just a few lines of code. |
Sure, I agree. Since I run every file through post processing, it was easy to undo their "fix". |
I just want to comment that the programmers have really done a great job on this software so far however using a script to change the gcode to accommodate running is really not the best solution in my opinion. Could I? Sure I could but when it ran fine in 2.3 series and something changed in 2.4 for gcode readability I believe that would be a regress in the software that could easily be remedied since it's merely a formatting issue. It's been a few years out of programming for me otherwise I would gladly help however I don't know the code base to look for it |
The only software that cannot process such a G-code seems to be some "Predator processor for Craftbot", we are asking the "Predator processor for Craftbot" to be fixed. Closing |
So instead of changing a few lines of code in a software that was in Alpha and Beta back to how it was before in older versions (and we are not talking about changing a new function, but changing presumably only a format string), the competitor Craftbot has to change the firmware of it's printers (that worked with older versions of PS). Not sure if JP would say that this is a great customer oriented solution. |
I use a Craftbot Flow and have used PS since v2.2 on my work and I was impressed with the features and speed that the developers come with upgrades. (I have used Simplify 3d before on my home printer) but I got a little frustrated after 3 hours of troubleshooting when I discovered that there was a zero missing in the g-code when I upgraded to 2.4. so please fix this little problem🙏 |
So, just in case anyone still needs to "fix" this, I could not let it be and wrote this little post processing script: (NOTE: this script will reformat ALL numbers found in .gcode! No exceptions. Error catching is held to a minimum 😁 )
Copy the code above, save it as .py (i.e. numberformater.py) and add that script to the post processing section of PrusaSlicer.
Script also found here, in case of issues: |
Super great👍I will try this script next week when i get back to work, thank you so much for your efforts/Happy new year |
Just tried it in 2.4RC and I used notepad++ to check for padded numbers and it looked good. Next week I'll check it on craftbot. Thanks for the awesome script! Too bad there wasn't a programmatic way in the program ;) |
Can confirm this is an issue after upgrading to PS2.4.0 on my Craftbot FLOW. I'll email them and see if they would release an update to their firmware. However, their support has generally be less than stellar. |
Another Craftbot user here. Now that that 2.4 is official, I made the switch. As per Andreas his note, it would be great to stick to the commonly used RepRap GCode (ie, with the leading zero). I've been using Prusa on my Craftbot with great success and would like to stay with it |
@basrijn What is the response of our Hungarian friends at Craftbot? |
@basrijn Frankly why should we support Craftbot's customers? Shouldn't Craftbot support their customers? Shouldn't you bug them? |
Because it would show that you are above fighting petty wars with your competition where the customers are the ones loosing. If I were to decide between different brands of printers, I would lean towards the company with better customer service, and clearly Prusa can stand out here. There are multiple users not satisfied with Craftbot, and with the XL in the pipeline, a lot of them will look forward to it. It's not a good signal if you start a blame game because of a fix that would take minutes to implement, and it would push you down to the CB level. |
You are very wrong. All 3D printing firmware in the known universe with the exception of CraftBot seems to follow the rules of formatting CNC G-codes. If we reverted our changes, G-codes for all 3D printers in the known universe would grow slightly because a single 3D printer manufacturer in the known universe does not follow the rules and this particular 3D printer manufacturer is keeping his ecosystem closed anyways. |
Another reliable definition of G-code language: |
And frankly you paid them for your printer. You paid us nothing. If it is such a tiny change you require us to do, shouldn't it be a tiny change for your 3D printer vendor as well? And they will become conformant to the standard. So all in all, it is the firmware that shall change to make the world better. |
As an aside, how many other slicers for 3D-printers emit G-code without leading zeroes? I'm guessing that the normal thing is to include them. File size is of course smaller without, but does it really matter with a few percent (at most)? Older Craftbots works fine also with the current version of Prusaslicer, it is just the newer Flow series that chokes on it. And they should fix it, no doubt. However, adding back the zeroes in PS (making it a selectable option) is also a simple thing to do, and would show support for the users of PS that needs this. It isn't about supporting Craftbot, per se. |
That's where you are wrong. Well, I did pay for your slicer through buying 5 of your printers. |
I am sorry, I did not know. Thank you for supporting the development of PrusaSlicer. We are considering to implement a generic text substitution tool for the planned PrusaSlicer 3.4.1 patch release, thus the following substitution will then be available at the print profiles. |
Why not make it an option (zero or not) and everybody is happy again?! |
Thank you. I hope it's 2.4.1 and not 3.4.1 😁 |
Perfectionist in me would suffer. Why making the product worse just to patch an error in Craftbot firmware? |
I agree that Craftbot should be the ones to perform the fix in this case. It comes with a 5 year warranty, they're on the hook for a fairly pricey printer to make sure it works. In the meantime, we have a post script that provides a temporary fix so I don't see the reason to pressure PS into fixing something that isn't technically incorrect. We need to encourage Craftbot users to contact their support and ask for a firmware update. |
As expected: Too bad their Craftware slicer is junk compared to PS. I'll push em a little harder. |
That is excellent, @bubnikv ! Although I am not affected (my Craftbot is older, and does handle the missing zeroes), this is a completely acceptable solution for those that need it. It can be stored in printer profile, and thereby can be set once and then forgotten. |
A bit off-topic, but it amazes me that instead of just adding that leading 0, a lot more time was spent in this discussion making argument that it is not mandatory or how much it costs in efficiency... In the end, slicer "fix" is more likely to be distributed to users than printer firmware fix (often 0% chance). Post-processor without additional software is a good thing also e.g. for printers that do not support M73. |
This is great. A small addendum to the regex above I had to escape the "." ( [XYZEF]-?)\.([0-9]+) Note the \. I am sure @bubnikv also did it, but the github markdown swallowed it. |
This also affects the Qidi Tech X-One (I believe they use a modified Sailfish version as firmware). To add to the discussion: Competing slicers like Simplify3D and Cura also include the leading zeros. I very much doubt these are the only two machines that rely on how every slicer put out coordinates for years. |
I don't have this problem, but if there is no good reason to change something (correct me if I'm missing something please) and it does cause problems somewhere (if more examples haven't been reported yet, it doesn't mean there are none), why change? Yes, GCODE file size is reduced (a bit). Are there any other benefits? Is it worth the fact that the slicer indeed got less universal because of this? Also, I would argue that leading zeroes would make the GCODE more easy to read by humans. (Edit: g-code substitution does work, I just missed comment by svengl) Why not just adding a switch in the slicer, instead of using post processing or Gcode substitutions (if not simply having the leading zero as the only option)? Despite the fact that this slicer is developed for Prusa machines and that it isn't obliged to be compatible with anything else, attitude "it should be fixed in the firmware" is just wrong in this case (because it's an easy fix for the slicer, and it was arguably a useless change in the first place). |
I found that this now closed issue also affects some Qidi printers, at least the X-one 2 (which I still have from 2017). Slicing in Fusion or Simplify3D results in working gcode for the machine, but Prusaslicer 2.8.0 (my current version on Solus) omits some leading zeros, and that makes the code "not work" on this printer (prints in mid-air, fails to layer switch, fails to extrude, etc, wherever it outputs something like I suspect there are other older machines out there that won't be getting firmware updates, that will have this issue. However, many normal users will not be able to figure out what the problem with the gcode is; it's quite subtle when you're looking at files side by side. If I hadn't spent the better part of a week experimenting, I would have just assumed the printer "doesn't work" with PrusaSlicer. For now I'll use gcode substitutions or a post processing script, since I use PrusaSlicer for the Prusa printers, and don't want to switch slicers. Maybe the late comment will be of use to someone experiencing printing issues on older or less known printers. |
Version: 2.4.0-alpha1 Windows 10
The title is a little vague however an example:
G1 Z.21 F6000 (Would fail)
G1 Z0.21 F6000 (Would work just fine)
This also includes X, Y, Z and E moves where the number is less than 1. Is there a way to prepend the 0. to numbers smaller than 1 rather than using an editor and replacing all of them. It would be greatly appreciated
I have also tried using different "g-code flavors' but the problem persists.
I've attached the project file however in this instance I don't believe it's necessary but for the sake of completeness
3_INCoreEjectPlate_REV2.zip
.
The text was updated successfully, but these errors were encountered: