-
Notifications
You must be signed in to change notification settings - Fork 101
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
[Request] Ability to read GCode for Printer Profile #142
Comments
First, this is a great request! I have thought about this very same thing and am glad that I know it's something people want. However, there are some problems that need to be worked out. Currently OctoPrint completely strips out all comments, so they never reach Octolapse. What is needed is a pre-processor that can store meta-data about each gcode file as it's uploaded, or something similar. OR, if I could find a way to pause the printing process before any gcodes are sent to the printer I could digest the whole file then. That would add to the start-up time somewhat, but would work for gcode files that have already been uploaded, and wouldn't require a database... Alternatively, what if you could tell Octolapse to extract print settings from a gcode file as a one-time thing, and it would copy what it learns to your printer profile? That would be somewhat easier, but will still require some kind of parser to read out the settings from the comments. I wonder if something like this has been made before (not looking forward to writing yet another parser, lol!) |
I'm glad my idea/request wasn't too out there. I'm kind of lazy when it comes to having to manually set values. |
Print time. Currently Octolapse uses built in OctoPrint hooks to 'listen' for gcode before it's sent to the printer. It never has a chance to read through the actual file prior to receiving the first gcode queued by OctoPrint. In fact, the built in events for detecting print-start are not useful for Octolapse at all, because all of these events are generated asynchronously, which creates race conditions that can't be overcome. When the gcode arrives, it is stripped and pre-processed. I've asked Gina about this, and she says it's for performance reasons, and I tend to believe her :) However, I am investigating some ideas that are looking quite promising. Pre-processing capability will be a game changer for Octolapse. The possibilities for new forms of smart-stabilization and pre-flight error detection alone are going to be worth the effort! |
Godspeed! |
Parser for Gcode settings now seems to exist! And it does parse speeds, from the brief check I did.
|
Oh my gosh, and I just finished creating this for simplify and slic3r! Going to have to test this code for speed now. If it's faster than my method, I'll be happy. It's certainly simpler. |
So, settings extraction directly from gcode has been fully implemented for Cura, Simplify3d and Slic3r variants, including multi-extruder support. I'm not 100% confident with the multi-extruder stuff yet since nobody had run it on a real printer yet, but it's worked in the debugger and for my MMU (shared nozzle though, so offsets have only been tested in the debugger). I'm going to mark this closed, and any issues that arise can be handled in new threads. Thanks for your contributions! |
If this is a feature request describe it here
I use Cura to slice and there are numerous variables that I can output in either the start or end GCode based on the settings I'm using for the print. It would be nice if Octolapse could use these values for at least some of printer profile settings.
A full list Cura variables are available here: https://github.com/Ultimaker/Cura/blob/master/resources/definitions/fdmprinter.def.json
Example of added values to Start GCode in Cura 3.2.1:
;Retraction Length: {retraction_amount}
;Z-Hop Height: {retraction_hop}
;Movement Speed: {speed_travel}
;Retraction Speed: {retraction_speed}
;Detraction Speed: {retraction_speed}
;Z Movement Speed: {speed_travel}
Example of output in GCode:
;Retraction Length: 1
;Z-Hop Height: 0.15
;Movement Speed: 120
;Retraction Speed: 60
;Detraction Speed: 60
;Z Movement Speed: 120
Version of Octolapse
Octolapse Version: v0.3.1
Version of OctoPrint
OctoPrint Version: 1.3.8
When you ran into the problem, did you have diagnostic logging enabled?
Diagnostic Logging was Enabled: YES_OR_NO
What were you doing when the problem occurred
What should have happened?
PUT_YOUR_DESCRIPTION_HERE
What happened instead?
PUT_YOUR_DESCRIPTION_HERE
Operating System running OctoPrint and Octolapse
OS Name: OS_NAME_GOES_HERE
Os Version: OS_VERSION_GOES_HERE
Printer model & used firmware incl. version
Printer Model: PRINTER_MODEL_GOES_HERE
Printer Firmware Version: PRINTER_FIRMWARE_VERSION_GOES_HERE
Browser and version of browser, operating system running browser
Browser: BROWSER_VERSION_GOES_HERE
Browser OS: BROWSER_OS_GOES_HERE
Link to the gcode file you were printing when the problem occurred
Link to Gcode File: GCODE_FILE_LINK_GOES_HERE
Link to settings.json
Link to settings.json with all passwords removed: SETTINGS_JSON_LINK_GOES_HERE
Link to plugin_octolapse.log
Link to plugin_octolapse.log: LINK_GOES_HERE
Link to octoprint.log
Link to octoprint.log: LINK_GOES_HERE
Link to contents of Javascript console in the browser
Link to javascript console output: LINK_GOES_HERE
Screenshots and/or videos of the problem:
Screenshot/Video Links: LINKs_GO_HERE
Please consider becoming a patron
If you like this project, please support my work by becoming a patron, and consider adding a 'star' to the repository. It takes a lot of time and effort to maintain the project and respond to issues. The cost of test prints, software, cameras, printer parts, etc. can quickly add up, so every bit helps. I'm currently saving for some additional test cameras in preparation for develiping multi-camera support.
The text was updated successfully, but these errors were encountered: