ReferenceControlGet Started

Control Sequences

Get started with control sequences in Synnax.

Control sequences are the primary means for automating hardware operations in your Synnax deployment. They provide a systematic way to control actuators and other mechanisms. On this page, we’ll explore the different types of control sequences available within Synnax.

Control Sequence Types

There are two primary ways to write control sequences in Synnax:

Arc is Synnax’s automation language for hardware control. Arc is reactive, meaning you declare what should happen when data changes rather than writing polling loops. It offers both a visual Graph Mode and a Text Mode, runs directly on drivers (including NI Linux Real-Time), and is performant enough for real-time control applications. Arc automations can be edited and deployed directly from within the Synnax Console.

Python client gives you the flexibility to write whatever software you need, with access to the entire Python ecosystem. Python sequences run externally and communicate with Synnax over the network, which introduces latency and makes control loop timing less predictable. Use Python for automations where you need maximum flexibility, and Arc for automations where you need consistent, low-latency control.

The Embedded Sequence Editor (Lua-based) is deprecated. New automations should use Arc instead.

How Control Sequences Work

Control sequences stream data from a set of input channels, perform some computation, and write data to a set of output channels.

Arc uses a reactive model where you declare what should happen when data changes. When a channel updates, Arc automatically runs the relevant computations:

// Open the valve when pressure is below threshold, close it otherwise
func bang_bang{threshold f64}(pressure f64) u8 {
    if pressure < threshold { return 1 }
    return 0
}

pressure -> bang_bang{threshold=100.0} -> press_vlv_cmd

There is no mention of hardware configuration in this sequence. Parameters like acquisition rates, scaling, and other hardware specific details are kept independent from sequencing mechanisms. This allows for a high degree of flexibility, including the ability to move and change hardware without changing the control sequence algorithms.

Example Deployment

To illustrate how control sequences fit into a larger system, here’s an example Synnax deployment that communicates with National Instruments devices:

ComponentDescription
NI Analog Read TaskReads data from the analog input ports of an NI-9205 at a fixed sample rate. Scaling and calibration information is configured within this task. The task pushes scaled values to the Synnax Core for consumption by the control sequence and Console for visualization.
NI Digital Write TaskWrites to the digital output ports of a NI-9375 based on commands sent to the di_X_cmd channels by the control sequence. The task also communicates the state of the digital outputs to the control sequence via the di_X_state channels.
Synnax CoreStores and streams all incoming and outgoing data from the NI devices, control sequences, and Synnax Console. All data will pass through the Core to travel from one component to another.
Synnax ConsoleDisplays real-time sensor values and actuator states on line plots.
Control SequenceReads the sensor values from the Analog Read Task and writes commands to the Digital Write Task.