kantlivelong / OctoPrint-GCodeSystemCommands

Define G-Code commands that execute local system commands.
GNU Affero General Public License v3.0
37 stars 20 forks source link

What is the OCTO prefix, I'm confused? #7

Closed aplocher closed 6 years ago

aplocher commented 6 years ago

Hi sorry for the stupid question, but what is the OCTO prefix? How would I make this run a command, for example, when a print job starts, or pauses, or stops, or gets an error, or (ideally) each 10% of completion (to display progress across 10 LEDs)?

Are those scenarios possible with your plugin?

Thanks!

kantlivelong commented 6 years ago

OCTO would be similar to G or M.

Example OCTO123

They certainly are but it's up to you to determine how to implement it.

aplocher commented 6 years ago

Oh so the .gcode file would have those lines in there (either somehow by the slicer, or manually injecting those lines myself into the file)? And I would just define what each OCTO# code represents?

Thanks again

kantlivelong commented 6 years ago

Correct. Keep in mind this does not work with SD printing.

aplocher commented 6 years ago

Ok very cool. I think I can figure something out. I'm using Simplify 3D with a custom script that uploads it to octoprint via curl so it should be processed by Octoprint properly... Now I just need to read up on how to inject a custom progress % (assuming it's possible). Looks like there's some custom scripting that can be done upon layer change. Thanks again!

aplocher commented 6 years ago

Sorry one last question: can I pass arguments to the shell script? So could I have a command: "OCTO123 10 100" then call "indicatepercent.sh 10 100" - 10 being the current layer, 100 being the total # of layers, so my shell script does the math and determines %?

kantlivelong commented 6 years ago

Should work.