PLC Programming on a Mac: CODESYS Alternatives, Soft PLCs, and Simulation Without Windows
Most PLC programming environments are Windows-only. CODESYS, TIA Portal, TwinCAT and Studio 5000 all assume a Windows engineering workstation. If you carry a MacBook, you have a platform problem before you write your first rung or line of Structured Text.
This guide covers what actually works on macOS: running CODESYS in a VM, the native and cross-platform editors, how to run a soft PLC runtime, and how to simulate I/O so you can test logic without hardware. It also says where a Mac is the wrong tool.
Does CODESYS Run on macOS?
CODESYS is one of the most widely used IEC 61131-3 environments, and many device manufacturers ship CODESYS-based controllers. The Development System V3 is a free download from the CODESYS Store and covers all five IEC 61131-3 languages plus CFC. It is a Windows application, and we found no macOS installer.
Mac users usually end up with one of three workarounds:
- A Windows VM (Parallels, VMware Fusion, UTM). It works for many people, but you pay for the VM and a Windows licence, and the guest needs several GB of RAM. USB serial adapters need driver support inside the VM, so test yours before a site visit.
- A separate Windows laptop for PLC work.
- Remote Desktop into a Windows machine. Fine on a good network, useless on a plant floor with poor connectivity.
On Apple Silicon the VM runs Windows 11 on ARM. Parallels documents that Windows on ARM runs x86 and x64 apps through emulation, but that x86/x64 drivers are not emulated, so USB serial adapters and vendor drivers are the part to test. We found no vendor statement that CODESYS officially supports Windows on ARM, so treat it as not an officially documented setup and test your gateway, device drivers and PLC connection before relying on it.
What Works on a Mac Without Windows
No native Mac tool replaces CODESYS, TIA Portal or TwinCAT for deploying to a specific vendor's hardware. What you can do natively is write and test IEC 61131-3 code, run it on a soft PLC, and exercise it against simulated or real network I/O.
OpenPLC Editor
A free, open-source desktop editor (GPL-3.0) for Windows, macOS and Linux with ladder, ST, FBD and IL, plus a built-in simulator with a live debugger. It targets education and small projects, and Autonomy Logic sells a commercial edition for production. The OpenPLC Runtime v4 is headless and runs natively on Linux or in Docker on macOS, Linux and Windows; the Editor controls it over a secure WebSocket connection. On a Mac you can write and simulate locally, then run the runtime in Docker or on a Pi.
IronPLC
An open-source IEC 61131-3 toolchain: compiler, runtime and a VS Code extension that runs on Windows, macOS and Linux, plus a browser playground. Its documentation says it supports most of edition 2 and parts of edition 3, does not yet provide I/O mapping, and debugging is still early. Use it to write and check Structured Text, not as a replacement for a vendor runtime.
Beremiz
An open-source IEC 61131-3 IDE from Beremiz SAS that supports the five IEC 61131-3 languages and compiles to C. Its download page lists a Windows installer and a Linux snap (amd64 and arm64, including Raspberry Pi), and otherwise building from source. We found no macOS package, so on a Mac it means building from source or using a Linux VM. It is useful for studying how a PLC toolchain fits together.
Vendor environments
TIA Portal, TwinCAT and Studio 5000 are tied to their vendors' hardware and run on Windows. If your only reason for Windows is Siemens, it helps to know what you can do without it: you can read and write S7 data blocks over the network from a Mac with S7 Explorer, covered in Connect to Siemens S7 from macOS.
What a Soft PLC Is and How to Run One
A soft PLC is a PLC runtime that runs on a general-purpose computer instead of dedicated controller hardware. It does what a hardware PLC does: read inputs, execute the program, write outputs, repeat. That cycle is the scan.
- Read inputs into an image table.
- Execute the program using that snapshot.
- Write outputs from the program results.
- Housekeeping: communications and diagnostics.
- Repeat, at a cycle time set by the task configuration (a few milliseconds to tens of milliseconds is common).
The difference is determinism. A hardware PLC with a real-time OS holds scan times tight. A soft PLC on macOS or Windows shares the CPU with everything else, so scan times jitter. For development, teaching, test stands and non-critical logic that is fine. For motion control, high-speed counting or safety functions it is not, and you should use real hardware or a real-time Linux target.
Ways to run a soft PLC from a Mac:
- On a Raspberry Pi or industrial PC. CODESYS sells Linux runtimes through its store (Control for Linux SL for x86, Control for Linux ARM SL, and Control for Raspberry Pi SL, whose adapted runtime is licensed for non-commercial use), and OpenPLC Runtime v4 runs on Linux. You edit on the Mac or in a VM and the controller runs next door. Check each vendor's list of supported boards and licence terms.
- In a Linux container or VM on the Mac. Good for a throwaway test bench, and you can script it for CI so ST logic is tested on every commit.
- As the production target. For lab setups, test stands and small IoT-style machines, an industrial PC running a soft PLC can be the final system. Keep timing requirements honest.
Because ST is a standard language, the control logic itself is largely portable between CODESYS, TwinCAT and others. What changes is I/O addressing, vendor libraries and task configuration. Plan to remap those when you move from a test bench to production hardware.
Simulating a PLC Without Hardware
A training PLC and wiring cost real money and time. Simulation shortens the loop: write logic, run it, and watch what happens. A useful setup has three pieces:
- A runtime that executes your program cyclically (OpenPLC runtime, the CODESYS simulation mode on Windows, or a soft PLC on a Pi).
- Simulated field devices that answer on the network. For Modbus, Modbus Poll can act as a simulator with device templates; see Modbus simulator for macOS.
- A monitoring view to watch and force values while the logic runs. A watch table in the IDE does this, and an external client can read the same registers.
A simple example to test: a motor starter with stop priority, a latched overload trip and a five-second start delay. Both the stop button and the overload contact are wired normally closed, so StopOK and OverloadOK read TRUE when healthy and a broken wire stops the motor.
PROGRAM MotorControl
VAR
StartBtn : BOOL; (* NO pushbutton, TRUE while pressed *)
StopOK : BOOL; (* NC stop, TRUE when released *)
OverloadOK : BOOL; (* NC overload contact, TRUE when healthy *)
FaultReset : BOOL;
Tripped : BOOL;
RunRequest : BOOL;
Motor : BOOL;
StartDelay : TON;
END_VAR
(* latch the trip; clear only when reset is pressed and the overload is healthy *)
Tripped := (Tripped OR NOT OverloadOK) AND NOT (FaultReset AND OverloadOK);
(* seal-in: stop and trip take priority over start *)
RunRequest := (StartBtn OR RunRequest) AND StopOK AND NOT Tripped;
StartDelay(IN := RunRequest, PT := T#5S);
Motor := StartDelay.Q;
Set StopOK and OverloadOK to TRUE, pulse StartBtn, wait five seconds and confirm Motor goes true and stays true after the button is released. Then set OverloadOK to FALSE and confirm Motor drops and stays off even after the overload clears, until FaultReset is pressed. Also check a stop pressed during the delay (the timer must reset and Motor must never turn on). These are the bugs that damage equipment if they first appear on a live machine.
A simulator proves logic, not timing or safety. It cannot certify a safety function, and it does not reproduce the real scan jitter, fieldbus latency or vendor-specific behaviour of your target.
Talking to Real Devices From a Mac
Once the logic works in simulation, connect real I/O and diagnose it with protocol tools that do run natively on macOS:
- Modbus Poll reads and writes Modbus TCP and RTU registers, which is the quickest way to check that a remote I/O module or meter responds the way your program expects.
- EtherNet/IP Explorer browses Allen-Bradley and other EtherNet/IP devices and tags.
- S7 Explorer reads Siemens S7 data blocks without TIA Portal.
- OPC UA Explorer browses OPC UA servers, which many modern PLCs expose.
For a live view of several devices at once, Voltrus SCADA collects Modbus, S7 and EtherNet/IP data into dashboards you can open in a browser.
Choosing a Setup
Learning IEC 61131-3 on a Mac: OpenPLC Editor, or any ST-aware editor, plus a simulated Modbus device. No hardware needed.
Prototyping logic before a client site: write and test ST on the Mac, then port to the vendor IDE for the final download.
Commissioning with a MacBook: use the protocol tools above for diagnostics, and keep a Windows VM or laptop for the vendor IDE.
Deploying to a specific vendor's PLC: use that vendor's IDE on Windows. A Mac does not change that.
For a language primer, see the IEC 61131-3 Structured Text guide.
Test Your PLC Logic Against Real Devices
Once your program is running, confirm its I/O with Modbus Poll: read and write registers, or simulate a device on your Mac.
See Modbus Poll