Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
ironplcvm¶
Name¶
ironplcvm — IronPLC bytecode virtual machine
Synopsis¶
Description¶
ironplcvm is the IronPLC virtual machine runtime. It loads and
executes compiled bytecode container (.iplc) files produced by
ironplcc.
The runtime follows the IEC 61131-3 execution model. Each scheduling round, the runtime checks which tasks are due based on elapsed time and executes them in priority order.
By default, ironplcvm runs continuously until interrupted with
Ctrl+C. Use --scans to limit execution to a fixed number of
scheduling rounds.
Commands¶
- ironplcvm run [OPTIONS] FILE
Load and execute a bytecode container (
.iplc) file.--dump-varsFILEWrite all variable values to the specified file after execution stops. The output contains one variable per line in the format
var[N]: VALUE. Variables are dumped on both normal shutdown and after a VM trap.--scansNRun exactly N scheduling rounds then stop. Without this option, the runtime runs continuously until interrupted with Ctrl+C.
- ironplcvm version
Print the version number of the virtual machine.
Options¶
-v,--verboseTurn on verbose logging. Repeat the flag to increase verbosity (e.g.,
-vvv).-lFILE,--log-fileFILEWrite log output to the specified file instead of the terminal.
Examples¶
Run a compiled program:
ironplcvm run main.iplc
Run for a single scan and dump variable values:
ironplcvm run main.iplc --scans 1 --dump-vars output.txt
Run with verbose logging:
ironplcvm -vv run main.iplc