Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PLCSimNew to Visual Studio Code? Get it now.
PLCSim

PLCSim

appscat

|
1,360 installs
| (0) | Free
Simulate PLC programs in Structured Text (IEC 61131-3) directly in VS Code — no hardware needed
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PLCSim

Simulate PLC programs in Structured Text (IEC 61131-3) directly in VS Code — no hardware needed.

Open a .st file, run the simulator, and interact with your program in real time. Free forever for learning and prototyping. Pro unlocks the tools you need for serious work.


Get started in 3 steps

1. Install PLCSim from the VS Code Marketplace.

2. Open the PLCSim panel from the Activity Bar (sidebar icon). Load one of the built-in examples or open your own .st file.

3. Run the simulator and interact in real time — toggle inputs, change values, watch outputs react. No compilation, no deploy, no hardware.

→ Full documentation at plcsim.appscat.cat

→ User Manual


Free — Full IEC 61131-3 Syntax & Simulator

Write and run complete Structured Text programs without restrictions.

Language (IEC 61131-3 Edition 3)

Feature
Scalar types BOOL · SINT INT DINT LINT · USINT UINT UDINT ULINT · REAL LREAL · TIME DATE TIME_OF_DAY DATE_AND_TIME · STRING WSTRING · BYTE WORD DWORD LWORD
User-defined types STRUCT, ENUM, ARRAY (1D and 2D), typed literals (WORD#16#FF, DINT#-100)
Variables & scope VAR, VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR_TEMP, VAR_GLOBAL, PERSISTENT, RETAIN
Control flow IF / ELSIF / ELSE, FOR, WHILE, REPEAT, CASE, RETURN, EXIT, CONTINUE
Operators Arithmetic: + - * / MOD ** · Comparison: = <> < > <= >= · Logic: AND, OR, NOT, XOR · Bitwise (WORD/INT): AND, OR, XOR, NOT · Shift/Rotate: SHL, SHR, ROL, ROR
Comments Block (* ... *), line // ..., doc comments (** ... *) for auto-generated documentation
Timers TON, TOF, TP, TONR
Counters CTU, CTD, CTUD
Bistables & edges RS, SR, R_TRIG, F_TRIG
Standard functions 30+ functions: String (LEN, CONCAT, REPLACE, LEFT, RIGHT, MID), Math (ABS, SQRT, SIN, COS, ROUND, FLOOR, CEIL, TRUNC), Type conversions (all scalar types), Time/Date (ADD_TIME, SUB_TOD, CONCAT_DATE_TOD, etc.), Array bounds (LOWER_BOUND, UPPER_BOUND)
Syntax highlighting Full .st language support
Examples 18 ready-to-run programs included

Simulator

Feature
Interactive panel Toggle BOOL inputs, edit numeric values, watch outputs react in real time
Scan cycle control Configurable from 10 ms to 5000 ms
Trend charts Oscilloscope view for every variable — 30 s of history, auto-scrolling

Editor Intelligence (LSP)

Feature
Real-time diagnostics Syntax and type errors underlined as you type — no need to run the simulator
Code completion IntelliSense for variables, function blocks, standard functions and keywords
Hover documentation Type information and signatures on hover
Go to Definition F12 to jump to any variable or function block declaration
Find All References See every usage of a symbol across your project
Rename Symbol F2 to safely rename a symbol and all its references in one step
Cross-file support All LSP features work across multiple .st files in the same workspace

Pro — Debugging & Test

Tools to validate, debug and automate the verification of your ST logic.

Feature
Native Debugger (DAP) Set breakpoints in .st files, step over statements (F10), step into function blocks (F11), inspect variables in the Variables panel and on hover — uses the VS Code Run & Debug panel natively
Watch Window Live variable list with filter, sort, pinned variables and change history
Single Scan / Step Pause the simulator and execute one scan cycle at a time
Snapshots Capture and restore simulator state — ideal for reproducing bugs
Unit Testing Write .plcsim.yaml test plans and run them from the VS Code Testing tab

Pro — Project Structure

Organise large programs as modular, maintainable projects.

Feature
Custom Function Blocks FUNCTION_BLOCK definitions, nested instances
Multi-File Projects Split programs across types/, globals/ and blocks/ — loaded in dependency order

Multi-File Project Layout

Create subdirectories in your workspace and PLCSim detects the structure automatically — no configuration needed:

workspace/
├── types/       ← TYPE … END_TYPE  (structs, enums)
├── globals/     ← VAR_GLOBAL blocks
├── blocks/      ← FUNCTION_BLOCK definitions
└── Main.st      ← main program logic (any name, any number of files)

Files are loaded in dependency order: types/ → globals/ → blocks/ → root .st files. Within each folder, alphabetical order.

Use PLCSim: New Project from the Command Palette to generate the structure automatically.

→ Full multi-file documentation


Pro — Export & Dialects

Take your validated logic to the real hardware.

Feature
TIA Portal export Export programs as .scl files ready to import in Siemens TIA Portal
Siemens SCL dialect Native SCL syntax support
Beckhoff TwinCAT dialect TwinCAT ST syntax support
Schneider Unity dialect Unity Pro ST syntax support

Pro — Industrial Communications

Connect the simulator to your real infrastructure.

Feature
OPC-UA server Exposes all variables as OPC-UA nodes — connect any SCADA or HMI
Modbus TCP server Map variables to coils and holding registers
EtherNet/IP server Map variables to CIP tags
MQTT connector Publish variables to Node-RED, Home Assistant or any MQTT broker

Pro — Object-Oriented Programming (Edition 3)

Modern PLC code with classes, inheritance, and interfaces.

Feature
Classes CLASS blocks with methods, properties, and internal state
Inheritance EXTENDS for single-parent inheritance; SUPER to call parent methods
Interfaces INTERFACE contracts; IMPLEMENTS for conformance
Properties Computed attributes with GET and SET accessors
Methods Callable procedures with parameters and return values
THIS Reference to current instance inside methods and properties

Pro — Documentation

Turn doc comments into shareable reference docs.

Feature
ST Documentation Generator Generate Markdown documentation straight from (** ... *) doc comments — @description, @param, @returns, @author and @version tags for FUNCTION_BLOCK, FUNCTION and PROGRAM

Early Adopter

Installed before July 1, 2026? You get full Pro access automatically — no license key needed, guaranteed forever.


Get Pro

→ plcsim.appscat.cat


Requirements

  • VS Code 1.85 or later
  • No additional software needed for Free features
  • Mosquitto or any MQTT broker for MQTT connectivity (Pro)

Extension Settings

Setting Default Description
plcsim.licenseKey — Your Pro license key

License

See EULA

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft