Skip to content

Models

A Model is a state machine that runs in your Gateway - directly on a Relay or hosted anywhere else. It watches PLC data, makes decisions, and takes actions - automatically, 24/7.

Example: “When motor speed exceeds 1500 RPM, switch to warning mode. If it stays high for 30 seconds, shut it down.”

Model with statechart and live variables

  • Statechart Visualizer - visual diagram of states and transitions; active state glows green
  • Commands - buttons to send actions (Reset, Start, etc.)
  • Variables - live internal data with sparklines
  • Parameters - configurable settings you can adjust without editing the model
  • Controllers & Symbols - which PLCs the model reads from

Open the AI panel and describe what you want:

“Create a model that counts production cycles on Controller A”

The AI generates the state machine, connects it to the right symbols, and deploys it.

AI creating a model - conversation with statechart preview and deployment

Drag a .model file onto the Relay detail page, or click Import.

Click Duplicate on any existing model to create a copy.

  1. Click Start - model enters Waiting (gathering PLC data)
  2. Automatically transitions to Running
  3. Active state highlights green in the visualizer
  4. Click Stop to halt anytime

When a Relay is used, Models run locally on the Relay - so they keep working even without internet.

ConceptWhat It Means
StatesConditions the model can be in (Idle, Running, Warning, Error)
TransitionsRules for moving between states
VariablesInternal data the model tracks
CommandsActions you can send to a running model
ParametersSettings you can configure without editing the model

SCXML (State Chart XML) is an open W3C standard for describing state machines. It’s rigorous, portable, and readable - which is exactly what you want when automation logic has to survive across machines, sites, and years. That’s why Vitesse uses it as the native format for every Model.

Models have two views:

  • Statechart Visualizer - interactive graph of states and transitions
  • Code Editor - raw SCXML with syntax highlighting

Toggle between them using the view buttons. Stop the model before editing.

Models can record variable values over time. Recorded data can be:

  • Viewed as charts in the app
  • Exported as CSV or Excel