Skip to content

Use built-in prompts

Ctrl includes prompts for common manual machine operations. Configure one of these before writing a custom prompt when its operator interaction and HAL contract match the machine. The shipped built-in prompt definitions contain their full content and HAL contracts.

Save the selected catalog as prompts.yaml beside the machine’s HAL configuration, then load it from that configuration:

loadusr -W ctrl_prompt --schema=prompts.yaml

The broker creates the listed pins before becoming ready. Restart LinuxCNC after changing the catalog.

The builtin.manual-tc prompt provides the standard manual tool-change handshake:

The built-in manual tool-change prompt asking for tool T3

version: 1
hal:
component: ctrl_prompt
prompts:
manual-tc:
template: builtin.manual-tc

It creates:

Pin Direction Purpose
ctrl_prompt.manual-tc.change Input Rising-edge tool-change request.
ctrl_prompt.manual-tc.number Input Requested s32 tool number captured with the request.
ctrl_prompt.manual-tc.changed Output Becomes true after Continue.

Set number, raise change, wait for changed, and lower change to release the request and reset changed.

The supplied wording handles tool 0 as removal, includes tool-table comments when present, and shows a non-zero diameter for non-lathe configurations. It includes English and Polish translations.

The builtin.manual-gear-change prompt provides the same lifecycle for a manually selected spindle gearbox:

The built-in manual gearbox prompt asking for gear 2

version: 1
hal:
component: ctrl_prompt
prompts:
spindle-gearbox:
template: builtin.manual-gear-change

It creates:

Pin Direction Purpose
ctrl_prompt.spindle-gearbox.change Input Rising-edge gear-change request.
ctrl_prompt.spindle-gearbox.gear Input Requested s32 gear captured with the request.
ctrl_prompt.spindle-gearbox.changed Output Becomes true after Continue.

Set gear, raise change, wait for changed, and then lower change.

To change the wording or extend a built-in contract, continue with Reuse and specialize templates.