Physical operator controls
Physical controls are part of the machine. Connect them through HAL, keep machine-specific behavior in the machine configuration, and let Ctrl reflect the resulting state to the operator.
Choose the control you are connecting
Section titled “Choose the control you are connecting”Each control family has its own page because the electrical behavior and HAL contract are different:
| Control | Read this page | Main HAL path |
|---|---|---|
| Direction buttons or handwheels | Jogging | Hardware input → sjog → LinuxCNC jog pins |
| Feed, rapid, or spindle override | Overrides | Hardware control → LinuxCNC override pins, with Ctrl ownership flags |
| Cycle and machine buttons | Program and coolant buttons | Hardware input → Ctrl or LinuxCNC HAL pins |
Use sjog only for manual axis motion. Do not route cycle start, stop, coolant, spindle, or unrelated panel functions through it.
Before wiring the panel
Section titled “Before wiring the panel”Decide these points before writing HAL:
- Is the control momentary, maintained, incremental, or absolute?
- Which layer debounces and validates the signal?
- What should happen at startup if a maintained switch is already active?
- Does the touchscreen remain allowed to change the same value?
- What machine conditions should block the request?
Give every function one clear owner. Two controls continually writing different values to the same override or mode will confuse the operator.
Functional and safety interlocks
Section titled “Functional and safety interlocks”The machine must provide sjog.machine-permit from its functional jog-interlock logic. This can prevent normal jogging because of machine state, but it is not a safety-rated input.
Emergency stop, safe torque off, guard monitoring, enabling devices, and other safety functions must be implemented outside Ctrl in the machine’s safety-rated system.
Axis naming
Section titled “Axis naming”Logical channels always follow LinuxCNC’s canonical order:
00 X 01 Y 02 Z 03 A 04 B 05 C 06 U 07 V 08 WAfter homing in coordinated mode, sjog drives logical axis jog interfaces. Before homing, it drives the mapped joint interfaces. A lathe can therefore keep Z on logical channel 02 while mapping it to joint 1.