lars_runtime
Manage local LARS simulation instances for PLC and HMI stations: create, start, stop, remove, and clean up workspaces, and switch station targets between simulator and real hardware.
Instructions
Manage local LARS (LASAL Runtime System) simulation instances. LARS runs one program per instance — use one workspace per station (PLC + HMI) so both run simultaneously on separate ports. Actions: list (auto-cleans stale workspaces), setup (create workspaces for all stations), start (auto-creates the workspace if the station is known but unconfigured), stop, remove, gc (lazy cleanup of unreferenced workspaces), set_station_target (point a station's .lss at its LARS instance), restore (revert .lss to the real target. After set_station_target, build_project/control_plc/plc_values/deploy_all operate on the LARS instance automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | LARS workspace name (e.g. 'VisuPalletizer_PLC'). Required for start/stop/remove/set_station_target/restore when station is omitted. | |
| action | Yes | 'list' shows all configured LARS workspaces and their state (auto-cleans stale ones). 'setup' creates/updates LARS workspaces for the selected project's stations (or one station/lcp. 'start' launches a LARS instance (auto-creates the workspace first if the station is known but unconfigured), 'stop' terminates it, 'remove' deletes its workspace config. 'gc' runs lazy garbage collection: deletes auto-created workspaces that are not running and no longer referenced by any station .lss or published DataService stations.json. 'set_station_target' points a station's .lss at its LARS instance (127.0.0.1:<port>); 'restore' reverts to the saved real target. 'target_pc' switches an ARM-compiled .lcp to the PC (x86) compile target LARS requires (restore via 'restore'). | |
| dry_run | No | With action 'gc': report what would be removed without deleting anything. Default false. | |
| station | No | Station name from the solution (e.g. 'PLC', 'HMI', 'Local'). Picks the matching workspace. Mutually exclusive with name. | |
| lcp_path | No | Absolute path to a .lcp to create a workspace for (setup only, when no station name is usable). | |
| min_age_h | No | With action 'gc': only delete workspaces unreferenced for at least this many hours (overrides LASAL_MCP_LARS_GC_MIN_AGE_H; 0 = immediately. | |
| project_dir | No | Solution directory to auto-detect stations from (setup/list only. Defaults to the selected project. |