PLC Simulator for macOS: Write, Compile, and Test Without Hardware
PLC programming has always required hardware — a PLC on your desk, connected via Ethernet or USB, with real I/O wired up. That's a barrier for learning, prototyping, and testing. A PLC simulator removes that barrier entirely. You write your program, compile it, and run it on a virtual PLC that behaves like the real thing — cyclic scan, timers, counters, I/O mapping — all in software.
This guide covers what PLC simulators do, how they work, and the native macOS option: Voltrus PLC — a full IEC 61131-3 Structured Text editor with a built-in softPLC runtime.
What Is a PLC Simulator?
A PLC simulator (also called a softPLC or virtual PLC) is software that executes PLC programs without physical hardware. It mimics the behavior of a real PLC controller:
- Cyclic scan execution — reads inputs, executes logic, writes outputs, repeats. Just like a real PLC's scan cycle.
- Timer and counter function blocks — TON, TOF, TP, CTU, CTD, CTUD all work as specified by IEC 61131-3.
- Variable monitoring — watch tables show live values updating in real time as the program executes.
- I/O simulation — force input values, observe output changes, test edge cases without physical signals.
- Debugging — breakpoints, single-step execution, call stack inspection — the same tools you'd use in a real PLC.
The key difference between a simulator and an emulator: a simulator runs your PLC program in a software runtime, while an emulator mimics a specific hardware PLC's firmware. Simulators are faster and more portable; emulators are more accurate to a specific vendor's hardware.
Why You Need a PLC Simulator
Whether you're learning PLC programming or a seasoned engineer, a simulator changes your workflow:
Learning PLC Programming
A physical training PLC costs $200-2,000. Plus power supplies, wiring, switches, and indicators. A simulator is free and instant — write code, hit run, see results. The feedback loop is seconds instead of hours of hardware setup.
Prototyping Control Logic
Before deploying to a $5,000 PLC on a production line, test your logic. Catch timer bugs, verify counter reset conditions, confirm state machine transitions. A simulator catches logic errors that could damage equipment if deployed untested.
Field Commissioning
On-site with a client, debugging a PLC issue. Pull out your MacBook, load the program into the simulator, reproduce the issue, test fixes, deploy to the real PLC. No need to carry a spare PLC for testing.
Education and Training
Classrooms can't equip every student with a PLC. A simulator lets 30 students each run their own PLC program simultaneously on their laptops. Standardized environment, zero hardware cost.
PLC Simulators Available for macOS
Most PLC simulators are Windows-only. Here's what actually runs on macOS:
How Voltrus PLC's Simulator Works
Voltrus PLC is a desktop app for macOS (and Windows/Linux) that includes the full PLC development pipeline in one ~30 MB download:
1. Write Structured Text
The editor is built on CodeMirror 6 with IEC ST syntax highlighting, autocomplete for keywords and standard functions, and inline error squiggles. Multi-file tabs, project tree sidebar, dark and light themes.
2. Compile to Bytecode
The ST compiler (mt-stc) parses your IEC 61131-3 Structured Text and emits bytecode for the VM runtime. Compile errors show inline in the editor with source location. Typical compile times are under 100ms for programs with hundreds of lines.
3. Run on the SoftPLC Runtime
The runtime (mt-plc-runtime) is a stack-based bytecode VM that executes your program in cyclic scan mode. You control the scan cycle: run continuously, single-step, or pause at breakpoints. The runtime supports:
- Timer function blocks: TON (on-delay), TOF (off-delay), TP (pulse)
- Counter function blocks: CTU (count up), CTD (count down), CTUD (bidirectional)
- Edge detection: R_TRIG (rising edge), F_TRIG (falling edge)
- Standard functions: math, comparison, string, type conversion
- Arrays: ARRAY [1..10] OF INT with full index access
4. Monitor and Debug
While the program runs, you get real-time visibility:
- Watch table — add variables, see values update live every scan cycle
- Trend chart — plot variable values over time with multi-series, pan, and zoom
- Breakpoints — pause execution at specific ST lines, inspect variables, resume
- Single-step — advance one line at a time, watch state changes
- Force/unforce — override variable values from the watch table to test specific scenarios
- Scan timing — real-time graph of cycle times with min/max/avg/p99 statistics
Example: Motor Control with Soft Start
Here's a real PLC program you can write and run in the simulator. A motor starter with a TON timer for soft-start ramp-up:
Run this in the simulator. Set StartBtn := TRUE in the watch table, wait 5 seconds, see Motor go TRUE. Set Overload := TRUE and watch the motor trip immediately. No hardware needed. v1.0 available now — $29.99 one-time.
Connecting to Real I/O
When you're ready to move from simulation to real devices, Voltrus PLC supports multiple I/O drivers:
- Modbus TCP — read/write holding registers, coils, inputs from any Modbus device
- Modbus RTU — serial RS-485 Modbus communication
- OPC-UA — connect to any OPC-UA server for vendor-neutral data access
- Siemens S7 — read/write data blocks on S7-1200/1500 PLCs
- EtherNet/IP — connect to Allen-Bradley ControlLogix/CompactLogix PLCs
- MQTT — bridge to IoT platforms and cloud services
The I/O mapping panel lets you bind ST variables to physical register addresses. When the runtime is in "Run" mode with I/O enabled, variable reads and writes go to real devices instead of simulated values. Same code, same debugger — just connected to real hardware.
PLC Simulator vs Physical PLC: When Each Wins
FAQ
Can you simulate PLC programs on macOS?
What is the best PLC simulator for macOS?
Do I need hardware to learn PLC programming?
How is a PLC simulator different from CODESYS?
Can I deploy simulator-tested code to a real PLC?
PLC Simulator for macOS
Write, compile, and run IEC 61131-3 Structured Text on your Mac. Built-in softPLC runtime, watch table, breakpoints, and trend charts. No hardware needed. v1.0 available now — $29.99 one-time.
Download for Mac →