The Machine Mode Converter provides intelligent detection of accelerator cycle types (FULLECO, DYNECO, CYCLING) by monitoring multiple timing signals and applying confirmation logic to determine the appropriate operational mode. It replaces simple timing delays with smart cycle detection that prevents race conditions and ensures proper downstream triggering based on actual machine state rather than fixed delays.

Triggers

The converter uses multiple forwarded subscriptions to handle different detection scenarios:

XTIM.SX.SCY-WRT/Acquisition (alias: SCY) - Start of cycle timing signal containing MACHINE_MODE field XTIM.SX.APECO-WRT/Acquisition (alias: APECO) - Asynchronous DYNECO confirmation signal rda3://${NODE_ID}/UCAP.INJECTION_TIMEOUT/Acquisition (alias: INJECTION_TIMEOUT) - Fallback timeout signal at beam injection + 100ms

All subscriptions ignore first updates to avoid startup artifacts.

Detection Logic

The converter implements a hierarchical state machine for cycle mode determination:

FULLECO Detection: When SCY trigger contains MACHINE_MODE="FULLECO", fire immediately with configurable delay (default 50ms). This provides the fastest response path for full economy cycles.

DYNECO Detection: For other machine modes from SCY trigger, wait for APECO confirmation signal. When APECO arrives, verify cycle stamp matching and update the MACHINE_MODE field to “DYNECO” before firing. This ensures proper DYNECO identification without false positives.

CYCLING Fallback: If neither FULLECO immediate firing nor DYNECO confirmation occurs, the injection timeout signal triggers fallback logic. The converter checks cycle stamps to verify no previous firing occurred, then publishes with the original machine mode from SCY.

Cycle Stamp Validation

The converter uses cycle stamp comparison to prevent duplicate firings across the multiple trigger paths:

• For APECO confirmation, verify the SCY and APECO events have matching cycle stamps • For timeout fallback, check if FULLECO already fired by comparing SCY cycle stamp and MACHINE_MODE • For timeout fallback, check if DYNECO already fired by comparing APECO cycle stamp • Only fire timeout if neither FULLECO nor DYNECO previously triggered for this cycle

Output

Property: Acquisition - Re-published timing trigger with updated MACHINE_MODE field and fresh acquisition timestamp Device: UCAP.MACHINE_MODE Usage: Provides intelligent timing triggers for downstream converters, replacing simple delay-based systems

The converter preserves original timing data (acqC field) while updating the acquisition timestamp in headers to reflect when mode detection completed.

Configuration

Delay: Configurable delay in milliseconds (default: 50ms) applied before firing to prevent race conditions with downstream systems. This ensures proper event ordering without sacrificing timing accuracy.

Dependencies

Notes

The converter acts as an intelligent timing multiplexer, replacing fixed-delay approaches with adaptive cycle detection. By maintaining cycle stamp tracking and state validation, it ensures each cycle fires exactly once through the most appropriate detection path while preserving timing accuracy for downstream hysteresis compensation calculations.