Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

ironplcvm

Name

ironplcvm — IronPLC bytecode virtual machine

Synopsis

ironplcvm [OPTIONS] COMMAND

Description

ironplcvm is the IronPLC virtual machine runtime. It loads and executes compiled bytecode container (.iplc) files that ironplcc produces.

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-vars FILE

Write 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 runtime error.

--scans N

Run 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, --verbose

Turn on verbose logging. Repeat the flag to increase verbosity (e.g., -vvv).

-l FILE, --log-file FILE

Write log output to the specified file instead of the terminal.

Examples

  1. Run a compiled program:

    ironplcvm run main.iplc
    
  2. Run for a single scan and dump variable values:

    ironplcvm run main.iplc --scans 1 --dump-vars output.txt
    
  3. Run with verbose logging:

    ironplcvm -vv run main.iplc
    

See Also