Code Monkey home page Code Monkey logo

Comments (3)

ScottWell1 avatar ScottWell1 commented on June 3, 2024

Custom Gcodes are problematic since different printers implement their own sets of custom Gcodes.

The way I handle this issue.... The "end script" attached to the sliced file, coming from the slicer, ends by moving the bed to center the camera view. As far as Octoprint is considered, the job is complete at that point -- so the plugin fires, takes the picture, and sends the pushover notification. After that, the Octoprint "After print job completes" script runs, and that's where the bed is moved to the print removal position. So it's just a matter of removing the final "move bed to removal position" Gcode from the slicer script, and adding it to Octoprint's "Settings, Gcode Scripts, After print job completes" section.

from octoprint-pushover.

Wim-N avatar Wim-N commented on June 3, 2024

Thanks for the tip, I'll give it a try. But I might run into trouble when I take a gcode file prepared with this tip and put it on a SD-card for direct printing. In that case it will not have the full end commands in that file like diabling the stepper motors.
Another idea might be that when it 'sees' the 'M104 S0 ;Turn-off hotend' command it will take the picture. Then I only have the make sure that this command comes before the final movement of the bed. And that will not give any problems when printing from an SD-card.
Another thing is that all the comments in the gcode file is available for OctoPrint to read. So you might put the phrase '##take final picture##' in the comment of the end gcode and OctoPrint might capture a picture to be used.

from octoprint-pushover.

ScottWell1 avatar ScottWell1 commented on June 3, 2024

Good point, I print exclusively via Octoprint and never use SD. I'm certainly not against some other way to trigger the photo/pushover, as long as it doesn't conflict with any printer's implementation of Gcode.

But in the meantime, I think the only thing that needs to be removed from the slicer code is the final bed move to removal position. Here's all I have in the "After print job completes" script of Octoprint:
G90 ;absolute
G1 Y180 F3000 ;move bed to object removal position
M84 ;steppers off

For most printers, leaving the M84 in the ending Gcode from the slicer (executed just before the Octoprint "After print job completes" script) won't hurt anything. The motors would automatically turn on again for the G1, then get turned off again. Printing direct from SD would work, the only thing "missing" would be the final move to removal position.

from octoprint-pushover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.