machines/systems/flexibot/docs/marlin/_gcode/M486.md
2025-03-11 23:32:39 +01:00

2.4 KiB

tag title brief author requires group codes notes parameters examples
m0486 Cancel Objects Identify and cancel objects thinkyhead CANCEL_OBJECTS sdcard
M486
This G-code may not be widely supported by slicers for a while, but they do include helpful comments in the G-code output that includes the current object. So for now you can use a post-processing script to convert these comments into [`M486`](/docs/gcode/M486.html) commands. #### Slicer post-processing scripts: - [M486 for Průša Slicer](//github.com/paukstelis/PrusaSlicer-M486) by [Paul Paukstelis](//github.com/paukstelis). - [M486 for Cura](//github.com/shinmai/cura-M486) by [Aapo Saaristo](//twitter.com/shinmai).
tag optional description values
C true Cancel the current object.
tag type
flag bool
tag optional description values
P true Cancel the object with the given index.
tag type
index int
tag optional description values
S true Set the index of the current object. If the object with the given index has been canceled, this will cause the firmware to skip to the next object. The value -1 is used to indicate something that isn't an object and shouldn't be skipped.
tag type
index int
tag optional description values
T true Reset the state and set the number of objects.
tag type
count int
tag optional description values
U true Un-cancel the object with the given index. This command will be ignored if the object has already been skipped.
tag type
index int
pre code
Typical usage in a G-code file
M486 T12 ; Total of 12 objects (otherwise the firmware must count)
M486 S3 ; Indicate that the 4th object is starting now
M486 S-1 ; Indicate a non-object, purge tower, or other global feature
M486 P10 ; Cancel object with index 10 (the 11th object)
M486 U2 ; Un-cancel object with index 2 (the 3rd object)
M486 C ; Cancel the current object (use with care!)

Use M486 to identify and cancel objects during a multi-object print job.

This command was originally developed for SD card printing but it works fine when host printing too. Of course, since hosts can skip objects more efficiently, host plugins are the better choice in that scenario.