Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Program Reference: APIs and Status Matrix

Output APIs

Primary public APIs:

  • ExecutionSession
  • injected interfaces:
    • execution sink
    • runtime
    • cancellation

Additive executable IR API:

  • AilExecutor::step(now_ms, sink, runtime)
  • uses the same IExecutionSink / IExecutionRuntime motion contract for motion-capable AIL instructions
  • AilExecutorOptions.initial_state can seed modal context when an executor instance needs to inherit prior plane, rapid, or tool-comp state

Public parser and lowering APIs:

  • parse(...) -> ParseResult
  • parseAndLowerAil(...) -> AilResult

Current limitations:

  • the public execution path is ExecutionSession; lower-level engine control is internal
  • AilExecutor::step(...) currently dispatches motion and dwell instructions through the shared runtime path
  • loops remain parse-only; the public execution path currently implements buffered GOTO/label flow and structured IF/ELSE/ENDIF, but not loop families

Every emitted message includes modal metadata:

  • group: GGroup1 or GGroup2
  • code: emitted function code such as G0, G1, G2, G3, G4
  • updates_state: whether this message updates modal state

Current supported baseline:

  • G0/G1/G2/G3 -> GGroup1, updates_state=true
  • G4 -> GGroup2, updates_state=false

Command Status Matrix

CommandStatusNotes
G0 rapid baselineImplementedEmits G0Message with target pose and feed.
RTLION / RTLIOF rapid interpolation modePartialLowered to AIL rapid_mode; full machine-actuation semantics still pending.
G40 / G41 / G42 tool radius compensationPartialLowered to AIL tool_radius_comp; executor tracks modal state only.
G17 / G18 / G19 working planePartialLowered to AIL working_plane; executor tracks active plane state only.
G1 linearImplementedCompatibility surfaces emit G1Message; execution emits normalized linear-move commands.
G2 arc CWImplementedEmits G2Message; execution can dispatch normalized arc commands.
G3 arc CCWImplementedEmits G3Message; execution can dispatch normalized arc commands.
G4 dwellImplementedEmits G4Message; execution can dispatch normalized dwell commands.
M functions (M<value>, M<ext>=<value>)PartialParse + validation + AIL boundary only; runtime machine actions are not fully mapped.
R... = expr assignmentPartialParsed and lowered to AIL assign; richer expression and write semantics are deferred.
N... line number at block startImplementedParsed into source metadata with duplicate-warning support.
Block delete / and /0.. /9ImplementedParsed with skip-level metadata; lowering applies active_skip_levels.
GOTO/GOTOF/GOTOB/GOTOC + labelsImplementedParsed, lowered, and executable through public ExecutionSession.
IF cond GOTO ... [ELSE GOTO ...]PartialParsed/lowered to branch_if; public execution handles the baseline expression subset.
Structured IF/ELSE/ENDIFPartialLowered into label/goto control flow; public execution supports the baseline branch subset.
WHILE/ENDWHILE, FOR/ENDFOR, REPEAT/UNTIL, LOOP/ENDLOOPPartialParse-only in current implementation.
Comments ;..., ( ... ), (* ... *)ImplementedPreserved as comment items in parse output.
Comments // ...PartialSupported only when ParseOptions.enable_double_slash_comments=true.
Subprogram call by name (THE_SHAPE, "THE_SHAPE")PlannedSiemens-style call model planned; parser/runtime integration pending.
Subprogram repeat (P=<n> NAME, NAME P<n>)PlannedRepeat-count call semantics planned.
Subprogram return (M17 baseline, RET optional)PlannedReturn-to-caller runtime semantics planned.
ISO compat call (M98 P...)PlannedEnabled only by ISO-compatibility profile option.

Parse and Lower Options

Parse options:

  • ParseOptions.enable_double_slash_comments
    • false (default): // ... emits a diagnostic
    • true: // ... is accepted as a comment

Lower options:

  • LowerOptions.active_skip_levels
    • block-delete lines (/ => level 0, /n => level n) are skipped when the level is active