Welcome to mirror list, hosted at ThFree Co, Russian Federation.

M486.md « _gcode - github.com/MarlinFirmware/MarlinDocumentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1eb8f1d63431bb2040cb158a3d08f612e58ec672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
tag: m0486
title: Cancel Objects
brief: Identify and cancel objects
author: thinkyhead

requires: CANCEL_OBJECTS
group: sdcard

codes: [ M486 ]

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`](/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).

parameters:
  -
    tag: C
    optional: true
    description: Cancel the current object.
    values:
      -
        tag: flag
        type: bool
  -
    tag: P
    optional: true
    description: Cancel the object with the given index.
    values:
      -
        tag: index
        type: int
  -
    tag: S
    optional: true
    description: 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.
    values:
      -
        tag: index
        type: int
  -
    tag: T
    optional: true
    description: Reset the state and set the number of objects.
    values:
      -
        tag: count
        type: int
  -
    tag: U
    optional: true
    description: Un-cancel the object with the given index. This command will be ignored if the object has already been skipped.
    values:
      -
        tag: index
        type: int

examples:
  -
    pre: Typical usage in a G-code file
    code:
      - 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`](/docs/gcode/M486.html) 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.