Skip to content

Commit c0193d9

Browse files
committed
📝 M110 Get or Set
MarlinFirmware/Marlin#27090
1 parent 70416ff commit c0193d9

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

_gcode/M110.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
tag: m0110
3-
title: Set Line Number
4-
brief: Set the current line number.
3+
title: Set / Get Line Number
4+
brief: Set or get the current (last-used) host command line number.
55
author: thinkyhead
66

77
group: hosts
88

99
codes: [ M110 ]
10+
related: [ M999 ]
1011

11-
notes: "All these are valid: `N100 M110`, `M110 N100`, `N101 M110 N100`."
12+
notes: "All these are valid host command lines: `N100 M110`, `M110 N100`, `N101 M110 N100`."
1213

1314
parameters:
1415

@@ -19,6 +20,19 @@ parameters:
1920
- tag: line
2021
type: int
2122

23+
examples:
24+
25+
- pre: Set the last line to 56
26+
code: M110 N56
27+
28+
- since: 2.1.3
29+
pre: Report the last-set or last-processed line number
30+
code: |
31+
> M110
32+
Line: 1297
33+
2234
---
2335

24-
Hosts can use `M110` to set the current line number in a print job. Each line number sent by a host must be one higher than the previous line number, or the firmware will ignore the line and send an error requesting a resend of the missing line. This is one technique Marlin uses to keep in sync with hosts.
36+
Hosts shuld use `M110` to set the current line number as-needed during a host-controlled print job. The last `N` value found in the line will be applied. Each line number sent by the host must be one higher than the previous line number, or the firmware will ignore the line and send an error requesting a resend of the missing line. This is one technique Marlin uses to keep in sync with hosts.
37+
38+
Since Marlin 2.1.3 this command without parameters reports the last line number processed out of the host command queue.

_gcode/M999.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ author: thinkyhead
77
group: control
88

99
codes: [ M999 ]
10+
related: [ M110 ]
1011

1112
parameters:
1213

_includes/gcode-info.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ <h3>Related Media</h3>
219219
<div class="col-lg-12 row examples">
220220
<h3>Example{% if ex[1] %}s{% endif %}</h3>
221221
{%- for item in ex -%}
222+
{% if item.since %}
223+
<span class="label label-success"><span data-toggle="tooltip" data-placement="bottom" title="{% if item.until %}Availability{% else %}Available since{% endif %}"><i class="fa fa-code" aria-hidden="true"></i> {{ item.since }}</span></span>
224+
{% endif %}
222225
{%- if item.pre -%}
223226
{%- for line in item.pre -%}{{ line | markdownify }}{%- endfor -%}
224227
{%- endif -%}

0 commit comments

Comments
 (0)