Macros
A macro is a few lines of G-code saved under a name, so a routine you repeat is one tap: probe down to a surface, park the machine, warm the spindle up. Macros lists them by category; tap Run and the lines are sent to the controller.
Macros waits until the machine is ready to work; see the homing gate. The position readout stays at the top so you can watch what a macro does.

The list
Macros are grouped under Setup & Probing, Machine Management, Programming & Geometry, Safety & Logic and Custom. Each row shows the macro's name, a Lua badge for a script, how many parameters it takes (such as 2 params) and its description. G-code macros have Run; scripts have Test; see Scripts.
A row's ⋮ offers Edit and Delete for your own macros, and Hide or Show for every macro. Hidden in the header shows hidden macros, dimmed, so you can bring them back.
The built-in macros
| Category | Macro | Sends |
|---|---|---|
| Setup & Probing | Probe Z Down | One probing move down (G38.2 Z-), up to the probe distance |
| Probe X+, Probe X-, Probe Y+, Probe Y- | One probing move in that direction | |
| Probe Corner (XYZ) | Z down, then X, then Y, each followed by a short retract | |
| Machine Management | Home All Axes | $H |
| Unlock Alarm | $X | |
| Check Mode Toggle | $C — the controller reads lines without moving, or stops doing so | |
| Programming & Geometry | Set Work Zero (All Axes) | Sets G54's zero at the current position |
| Set Work Zero X, … Y, … Z | Sets one axis of G54's zero | |
| Go to Work Zero | G0 X0 Y0, then G0 Z0 | |
| Safety & Logic | Soft Reset, Feed Hold, Cycle Resume | The controller's reset, hold and resume |
The probing macros ask for a Probe distance and a Feed rate (25 mm and 100 mm/min by default).
Four more G-code samples are included: Spindle warm-up ramp, Park and cool down, Blow chips before a tool change and Stop everything on an alarm. Read each one's lines before running it on your machine.
Running a macro
Tap Run. A macro with no parameters, whose every line is decided in advance, runs at once. Otherwise a Run name drawer asks for Values, shows the pre-flight check, and waits for Run.

While it runs, Running: name shows the line it is on and a Cancel button, which stops the macro. It ends with Macro Completed (and the time it took), Macro Failed with the line that failed, or Macro cancelled.
A macro is refused while a program is streaming, and a line that would move or power an unhomed machine is refused with the reason.
The pre-flight check
Before anything is sent, Prime Motion reads every line of the macro and says what it will do:
| Pre-flight says | Meaning |
|---|---|
| Fixed N lines | Every byte of those lines is decided now |
| Deferred none | Nothing waits on the machine; the whole macro is decided before the first line goes |
| Deferred N lines | Those lines depend on a value read from the machine at the moment they are sent, and say which |
| Needs a value | A parameter has no value yet |
| Refused N lines | Those lines would be refused; nothing will be sent, and each refused line says why |
Run waits until the pre-flight check is ready.
Writing your own
New opens New Macro:
- Name, Category (Setup, Machine, Program, Safety, Custom) and an optional Description.
- Body — the G-code, one command per line.
- Parameters — Add a parameter for each value you want to be asked for: a name and a default. In the body,
#1is the first parameter,#2the second, and so on.
The pre-flight check updates as you type. Create saves the macro once it has a name and a body.
G21 G91
G0 Z#1
G90
A macro that raises Z by the first parameter, in millimetres, relative to where it is.
Import brings in .nc and .lua files from a folder on the tablet; see Scripts.