Help with M810-M819 macros - several questions
I'm trying to write a macro to continuously display the current X/Y/Z endstop states for debugging my hardware setup.
I thought I'd used one of the M810-M819 macros, but the official docs are pretty sparse on them.
M810 M119|G4 P250|M810
Which should recursively call these commands when issuing M810
:
M119 ;Show enstop states
G4 P250 ;Wait 250ms
M119 ;again
G4 P250
M119 ;again
G4 P250
M119 ;again
G4 P250
...
However: When I tried to view the current macros (M820) I get an error:
Send: M820
Recv: echo:Unknown command: "M820"
Send: M810 M119|G4 P250|M810
Recv: echo:Unknown command: "M810 M119|G4 P250|M810"
So my questions are:
- Is there some way I have to enable the M810-19 gcodes in FW before I can use them?
- Is recursion allowed in the macros, and/or can I enable a break condition to stop the macro when user clicks the LCD/screen button?
- Is there a max length for the macro steps (either a hard limit or recommended limit)?
Here's my Marlin build info:
FIRMWARE_NAME:Marlin bugfix-2.1.x (Feb 21 2025 18:08:33) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:xxxxxx KINEMATICS:Cartesian EXTRUDER_COUNT:1