Skip to content
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

Cancel Individual Objects #15590

Merged

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Oct 17, 2019

This PR adds an M486 G-code as a technique to both identify and cancel objects during a multi-object print job.

  • M486 Tn resets the state and sets the number of objects.
    (Basic reset occurs automatically upon "starting a new print job.")
  • M486 Sn is used to set the index of the current object.
    (The object count may increase in response to this.)
  • M486 S-1 is used to indicate a non-print object such as a brim or purge tower.
  • M486 Pn is used to cancel an object by index.
  • M486 C is used to cancel the current object.
  • M486 Un is used to un-cancel an object by index.
    (Only useful before the layer gets skipped)

Based on work by @paukstelis and previewed at ERRF2019.

@Roxy-3D
Copy link
Member

Roxy-3D commented Oct 17, 2019

M86? That is both funny and an easy to remember number!

@thinkyhead thinkyhead force-pushed the bf2_cancel_objects_PR branch 2 times, most recently from 0518b37 to ecd234a Compare October 17, 2019 23:19
@LinFor
Copy link
Contributor

LinFor commented Oct 18, 2019

LinFor pushed a commit to LinFor/Cura that referenced this pull request Oct 18, 2019
@LinFor
Copy link
Contributor

LinFor commented Oct 18, 2019

Made simple Cura post-processing script to mark objects with these rules: https://github.com/LinFor/Cura/blob/e-bot/plugins/PostProcessingPlugin/scripts/MarlinObjectsMarking.py

@Roxy-3D
Copy link
Member

Roxy-3D commented Oct 18, 2019

Seems that M86 already used for other purposes in Prusa-Firmware fork:

It would appear it is already documented as being in use by Marlin:

https://reprap.org/wiki/G-code#M86:_Cancel_Object

A big effort is expended to make sure we don't step on already established GCodes and MCodes. But other developers need to make some effort too. They need to document their usage of anything new because it is impossible to try to hunt down every version of firmware and do a check.

@thinkyhead thinkyhead force-pushed the bf2_cancel_objects_PR branch from ecd234a to 3349b01 Compare October 18, 2019 18:22
@thinkyhead
Copy link
Member Author

To avoid collision this can be changed to M486….

@thinkyhead thinkyhead force-pushed the bf2_cancel_objects_PR branch 2 times, most recently from 991dd85 to 04985cc Compare October 18, 2019 18:32
@thinkyhead
Copy link
Member Author

I have added Prusa to the list of firmwares that shows up on the RepRap G-code wiki page…
image

@paukstelis
Copy link

paukstelis commented Oct 18, 2019

Minor point for the Wiki: M486 S4 ; Indicate that the 4th object is starting now should probably be 5th object. Or maybe just object at index 4.

@thinkyhead thinkyhead force-pushed the bf2_cancel_objects_PR branch 4 times, most recently from 305f07c to 6f74d72 Compare October 19, 2019 17:29
@thinkyhead
Copy link
Member Author

After #15593 I'll have a tweak for the menu so it can show itemized items without the extra customization lines. I have not yet given this a proper test, so I will do some of that this afternoon.

@thinkyhead thinkyhead force-pushed the bf2_cancel_objects_PR branch from d925e8a to 2c9e741 Compare October 24, 2019 20:35
@thinkyhead thinkyhead merged commit 93f0012 into MarlinFirmware:bugfix-2.0.x Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants