Program Reference: Motion and Modal Commands
Motion Packets
Status:
Implementedfor the motion subset
Rules:
- packetization consumes AIL and emits packets for
G0/G1/G2/G3/G4 packet_idis 1-based and deterministic per result order- non-motion AIL instructions are skipped with warning diagnostics where appropriate
G0andG1both use packet typelinear_move; distinguish intent throughpacket.modal.code
Output fields:
packet_idtypesourcemodalpayload
Packet types:
linear_movearc_movedwell
G1
Syntax examples:
G1 X10 Y20 Z30 F100G1 AP=90 RP=10 F40
Rules:
- case-insensitive words are accepted
- mixing Cartesian and polar words in one
G1line is rejected
Output fields:
- source: filename, line, line_number
- modal:
group=GGroup1,code=G1,updates_state=true - target_pose: optional
x/y/z/a/b/c - feed: optional
F
Execution call sequence:
- a complete
G1line is assembled - the line is parsed and lowered into a normalized linear-move command
- the execution sink receives the normalized command
- the runtime receives the same command via linear-move submission
- the runtime returns
ready,pending, orerror pendingblocks execution until explicit resume
G0
Syntax examples:
G0 X10 Y20 Z30G0 AP=90 RP=10
Rules:
- case-insensitive words are accepted
- mixing Cartesian and polar words in one
G0line is rejected
Output fields:
- source: filename, line, line_number
- modal:
group=GGroup1,code=G0,updates_state=true - target_pose: optional
x/y/z/a/b/c - feed: optional
F
Current limitations:
- Siemens rapid interpolation override behavior is not fully implemented in the runtime or packet path
RTLION / RTLIOF
Syntax examples:
RTLIONRTLIOF
Current behavior:
- lowering emits AIL
rapid_mode - JSON includes:
opcodemode
- following
G0AIL instructions includerapid_mode_effectivewhen a rapid-mode command is active earlier in program order
Current limitations:
- runtime execution tracks rapid-mode state transitions, but full machine interpolation override behavior is not implemented yet
- packetization does not emit standalone packets for
rapid_mode
G40 / G41 / G42
Syntax examples:
G40G41G42
Current behavior:
- lowering emits AIL
tool_radius_comp - JSON includes:
opcodemode:off,left,right
AilExecutortrackstool_radius_comp_current
Current limitations:
- cutter-path geometric compensation is not implemented in v0
- packetization does not emit standalone packets for
tool_radius_comp
G17 / G18 / G19
Syntax examples:
G17G18G19
Current behavior:
- lowering emits AIL
working_plane - JSON includes:
opcodeplane:xy,zx,yz
AilExecutortracksworking_plane_currentG2/G3lowering validates center words against the effective plane
Current limitations:
- deeper plane-dependent geometric behavior is not implemented in v0
- packetization does not emit standalone packets for
working_plane
G2 / G3
Syntax examples:
G2 X10 Y20 I1 J2 K3 R40 F100G3 X30 Y40 I4 J5 K6 CR=50 F200
Output fields:
- source: filename, line, line_number
- modal:
group=GGroup1,code=G2|G3,updates_state=true - target_pose: optional
x/y/z/a/b/c - arc: optional
i/j/k/r - feed: optional
F - effective plane metadata derived from the active working plane
G4
Syntax examples:
G4 F3G4 S30
Rules:
- must be programmed in its own NC block
- exactly one of
ForSmust be present
Output fields:
- source: filename, line, line_number
- modal:
group=GGroup2,code=G4,updates_state=false - dwell_mode:
secondsorrevolutions - dwell_value: numeric value