---
tag: m0810
title: G-code macros
brief: Set/execute one of ten G-code macros
author: Speaka

codes: [ M810, M811, M812, M813, M814, M815, M816, M817, M818, M819 ]
related: [ M820 ]

requires: GCODE_MACROS

parameters:
- tag: string
  optional: true
  description: Set Macro to the given commands, separated by the pipe character.

example:
- pre: Define Macro 5 to do some moves and make a beep
  code: M815 G0 X0 Y0|G0 Z10|M300 S440 P50

- pre: Run Macro 5
  code: M815

---

Use the `M810`-`M819` commands to set and execute 10 distinct G-code "macros." Put anything after the command to define its macro. To run the macro just send `M810`-`M819` by itself. Multiple commands in one macro are separated by the pipe character ('`|`').
