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 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.
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) bool {
return pressure < threshold
}
pt_471 -> bang_bang{threshold=100.0} -> press_vlv_cmdThere 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: