thinkyhead

M486 - Cancel Objects

sdcard Identify and cancel objects CANCEL_OBJECTS

Description

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.

Notes

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 commands.

Slicer post-processing scripts:

Usage

M486 [C<flag>] [P<index>] [S<index>] [T<count>] [U<index>]

Parameters

[C<flag>]

Cancel the current object.

[P<index>]

Cancel the object with the given index.

[S<index>]

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.

[T<count>]

Reset the state and set the number of objects.

[U<index>]

Un-cancel the object with the given index. This command will be ignored if the object has already been skipped.