Test your automation logic without a physical PLC. AutomationView includes an in-editor scan-cycle simulation engine that runs your Sequence programs and shows live feedback.
The simulation feature is also called emulation in some places. The on-screen buttons and command titles say "Simulation", while settings, the configuration group, and internal IDs use "emulation". They refer to the same feature.
The simulation engine runs entirely inside AutomationView. It is a pure scan-cycle simulator that runs entirely in software, without an external runtime or a real PLC. It executes your Sequence programs in a continuous scan cycle, evaluates transitions, activates and deactivates steps, processes timed actions, and provides live visual feedback in the Sequence Editor.
There are several ways to start running your program. Choose whichever method fits your workflow.
Press F5 to start the simulation immediately. No additional steps needed.
Click the Play button in the Sequence Explorer view title bar.
For the full list of simulation commands, see the Simulation Commands reference.
The simulation is controlled by four commands: Start, Stop, Step, and Reset. They are available from the Command Palette, the Sequence Explorer view title buttons, and the following keyboard shortcuts.
| Command | Shortcut | Description |
|---|---|---|
| Start | F5 | Start the simulation in continuous mode |
| Stop | Shift+F5 | Halt the simulation and reset all step and variable state |
| Step | F10 | Execute exactly one scan cycle |
| Reset | Ctrl+Shift+F5 (mac Cmd+Shift+F5) | Reset to initial conditions and keep running |
Step (F10) runs a single scan cycle so you can advance one cycle at a time and observe exactly how transitions fire and steps change. If the simulation is not already running, the first Step starts it in a paused, single-cycle mode.
The view title buttons shown depend on whether the simulation is running.
Each cycle follows the standard PLC execution model, so simulated behavior matches a real controller. Understanding these phases helps you debug timing and ordering issues.
Variable writes are batched and committed at the end of each cycle, mirroring real PLC behavior. Simulated time advances by the cycle time, not by wall-clock time.
Timer and counter instructions (TON, TOF, TP, RTO, CTU, CTD, CTUR, CTDR) run with full behavior only when a runtime instance is registered for them - typically contributed by a plugin. Without a registered instance, such an instruction degrades to a plain boolean set/clear and its timer/counter logic does not run.
These refinements shipped in the v0.6.x release series. They address edge cases that were visible in earlier versions when testing sequences with timers, counters, and branching logic.
IEC-correct token propagation. The emulator now follows the IEC 61131-3 SFC token model precisely. A token advances through steps and transitions in the order the standard defines, so sequences that rely on exact activation ordering behave as they would on a real controller.
Timer and counter preset values are preserved on step activation. If you manually set a timer preset (PT) or a counter preset (PV) before or during a run, that value is kept when the step activates. Earlier versions discarded manually set presets and replaced them with the compiled default on activation. Your override now survives step activation and takes effect immediately.
Reset restores variables to their initial values. When you press Reset (Ctrl+Shift+F5), every variable returns to the initial value it had when the simulation first started, not to zero. This gives you a consistent baseline and means you can re-run a test scenario without manually resetting variables one by one.
Force a step active or inactive. While the simulation runs, click a step in the sequence diagram to toggle it between active and inactive. Use this to jump ahead to a specific branch, escape a stuck state during debugging, or test downstream transitions without driving the upstream condition to TRUE. See Force a Step's Active State below for full details.
Adjust the scan cycle time to control how fast the simulation runs. Set it through the automationview.emulation.cycleTimeMs setting, described in the Simulation Settings reference. The value is applied live, so changing it while running takes effect on the next cycle.
| Cycle time | Cycles/sec | Use Case |
|---|---|---|
| 50 ms | 20 | Fast validation |
| 100 ms (default) | 10 | Normal simulation |
| 500 ms | 2 | Slow observation |
| 1000 ms | 1 | Step-by-step debugging |
While the simulation runs, you can set any variable to a specific value to test different scenarios. Changes take effect on the next scan cycle.
This is not a force. Setting a variable value does not lock it. If an instruction such as OTE, SET, or any other output instruction writes to that variable during the scan cycle, the program logic will overwrite the value you set. To reliably hold a value, you must ensure no instruction in the program writes to that variable.
Click on a variable in the Variables sidebar to set its value directly.
Click directly on a transition in the sequence diagram to set the associated variable:
This is useful for simulating sensor inputs, button presses, or testing edge cases without physical hardware.
While the simulation runs, click directly on a step (or right-click it) in the sequence diagram to toggle its active state:
The change takes effect immediately on the next scan cycle. Use this to skip ahead in a sequence, recover from a stuck state during debugging, or test the behavior of downstream transitions without driving the upstream condition to TRUE.
Forcing a step active does not execute its preceding transition's transition actions (such as counter increments). Only the step's own actions run while it is forced active.
For dynamic sequences, the toggle targets the instance currently displayed in the editor's instance selector.
The Sequence Editor provides live feedback during a run:
| Element | Active State |
|---|---|
| Steps | Highlighted with distinct color |
| Transitions | Marked when condition is TRUE |
| Timed Actions | Progress bar with countdown |
| Fired Transitions | Brief flash animation |
A live variable list shows current values (including timer and counter children such as IN, Q, and ET), along with the current cycle number and simulated time.