The virtual PLC runs a Structured Text (ST) program directly in the browser. Write the program in the PLC editor, then click Deploy and Run. Once per simulation tick, it reads the twin’s PLC signals, runs your logic and writes the outputs. You need no separate build or installation. The browser compiles the program when you deploy it.
Use it to test control logic against the twin before the real controller exists, to try out a sequence quickly, or to teach PLC programming on a running machine. For simple sequences without code, use logic steps instead.

Quick start
Section titled “Quick start”- Switch to the Planner workspace and click the PLC Editor button in the tool bar on the left.
- If the model already has PLC programs, the editor opens the first one. Otherwise the model gets a node PLC with a PLC Program component and a short template program.
- Edit the program. Syntax errors are marked while you type.
- Click Deploy to compile and load the program. Compile errors and unknown signals appear as markers in the code.
- Click Run. The status changes to running and the watch list shows live values.
The editor stays open when you change workspaces, and the PLC keeps running while you watch the plant. Only the Viewer workspace hides the editor.
How a scan works
Section titled “How a scan works”The PLC scans once per simulation tick (60 times per second). Each scan reads all inputs at once, runs the program from top to bottom, then writes all outputs together through one identified writer per program occurrence. Repeated placements of one program remain separate writers. This works like the process image of a real PLC. Outputs act on the drives in the same tick.
In this section
Section titled “In this section”| Page | What you find there |
|---|---|
| PLC editor | Deploy, Run, Stop, Step and Reset, the watch list, export and import, saving |
| Signals and variables | Connect program variables to signals with VAR_EXTERNAL, the station 4 example, global variable lists and AT |
| Programs and the scan cycle | Several programs in one model, cold and warm start, RV_FirstScan, scan errors |
| Language reference | What the compiler accepts, what it does not, and the standard function blocks |
| Data types | Strings, enums and numeric rules |
| Simulation or PLC mode | Who writes the model outputs, and how a program steps aside for a real PLC |
| ST Functions | Built-in functions for calculations, limits and type conversion |
| Function Blocks & Libraries | Your own functions and function blocks, shared through PLC Library |
| PLCopen Motion | MC function blocks for axes and Cartesian paths |
| Running ST in DES | Writing programs that run on events in discrete-event simulation |
Generating a CODESYS 4 project from the PLC programs of the twin is coming.
See also
Section titled “See also”- Virtual Commissioning — all commissioning functions at a glance
- Signals and Logic — PLC signals and logic steps
- Logic and PLC in DES — logic and ST programs in discrete event simulation
- Signals & Alarms — the Simulation / PLC switch
- Laser Welding Assembly Station — the demo used above
- realvirtual CONNECT — connect a real controller instead