M291
Back to the Gcode Dictionary
M291: Display message and optionally wait for response
Supported in firmware version 1.19 and later.
Parameters
- P"message" The message to display, which must be enclosed in double quotation marks. If the message itself contains a double quotation mark, use two double quotation marks to represent it.
- R"message" Optional title for the message box. Must be enclosed in double quotation marks too.
- Sn Message box mode (see below), default 1
- Tn Timeout in seconds, ignored if S=2 or S=3. The message will be cancelled after this amount of time, if the user does not cancel it before then. A zero or negative value means that the message does not time out (it may still be cancelled by the user if it has a Close button). The default value is 10 seconds (this applies to modes 0 and 1 only).
- X, Y, Zn 0 = no special action (default), 1 = display jog buttons alongside the message to allow the user to adjust the head position on the specified axis. Only valid in conjunction with S3 or S3.
This command provides a more flexible alternative to M117, in particular messages that time out, messages that suspend execution until the user acknowledges them, and messages that allow the user to adjust the height of the print head before acknowledging them.
Allowed message box modes are:
0. No buttons are displayed (non-blocking) 1. Only "Close" is displayed (non-blocking) 2. Only "OK" is displayed (blocking, send M292 to resume the execution) 3. "OK" and "Cancel" are displayed (blocking, send M292 to resume the execution or M292 P1 to cancel the operation in progress)
The combination S0 T0 is not permitted, because that would generate a message box with no close button and that never times out, which would lock up the user interface.
Duet Web Control 2.03 and later support HTML messages but that may not be displayed correctly on an attached PanelDue.
Note the limit in RRF2 is 160 characters in the entire GCode command. In RRF3 it's 200 characters.
0 Comments