Both read inputs and switch outputs — so why does a factory pay hundreds for a PLC when a microcontroller costs a few dollars? The answer is the scan cycle, the I/O, and who has to fix it at 3 a.m. See the difference run live in a browser PLC simulator.
Join 1900+ learners practicing PLC programming
The short answer
A PLC is a rugged, certified industrial controller programmed in ladder logic and maintained by plant electricians; a microcontroller is a cheap, flexible chip programmed in C by embedded engineers. Choose a PLC for factories, safety and long service life. Choose a microcontroller for prototypes, custom hardware and high-volume products.
The comparison comes up constantly because the two devices genuinely overlap: strip either one down and you find a processor reading inputs, executing logic and driving outputs. In fact every modern PLC has a microcontroller or microprocessor at its core. What separates them is not the silicon — it is the engineering wrapped around it, the programming model on top of it, and the person expected to keep it running for the next twenty years.
This guide walks through the differences that actually decide a project, explains why the scan cycle is the one distinction most articles gloss over, and — because this site is a browser-based PLC simulator — lets you watch that scan cycle execute live instead of taking our word for it.
Side by side
| Dimension | PLC | Microcontroller |
|---|---|---|
| Architecture | Modular system: power supply, CPU, plug-in I/O modules in a rack or DIN-rail base | Single chip on a board you design (or a dev board like Arduino / ESP32) |
| Programming | IEC 61131-3: ladder logic, structured text, function block — readable by any trained electrician | C / C++ / MicroPython firmware — readable by the engineer who wrote it |
| Execution model | Deterministic scan cycle: read inputs → execute logic → write outputs, enforced by a watchdog | Free-running loop plus interrupts — timing behaviour is whatever your code makes it |
| I/O | Isolated, protected industrial I/O: 24 VDC, 4–20 mA analog, relay and 120/240 VAC outputs, wired to screw terminals | 3.3 V / 5 V GPIO pins — needs level shifters, optocouplers and driver circuits to touch real field devices |
| Environment | Rated for panel temperatures, vibration and electrical noise; conformal-coated options for harsh plants | Commercial-grade parts; hardening the board for a factory floor is your engineering problem |
| Certification & safety | UL / CE as standard; safety-rated CPUs and I/O (SIL, PLe) available off the shelf | Whatever certification you pay to have your custom board tested for |
| Cost profile | Higher device cost; low lifecycle cost — spares from the distributor, no board redesigns, decades of vendor support | Very low device cost; lifecycle cost lives in board design, firmware maintenance and component obsolescence |
| Who maintains it | Plant electricians and maintenance techs, online, often without stopping the machine | The embedded engineer who designed it — or nobody, once they leave |
Read the table top to bottom and a pattern appears: none of these rows says one device is better. The PLC wins wherever reliability, standardisation and maintainability by other people matter; the microcontroller wins wherever unit cost, board-level flexibility and custom hardware matter. They are optimised for opposite failure modes.
Execution model
Most PLC-vs-microcontroller articles spend their time on ruggedness and price. Those matter, but the deepest difference is in how the two devices execute your logic — and it changes how you think about programming them.
A microcontroller runs firmware. Your C code executes top to bottom in a loop you wrote, at whatever speed the work allows. Anything time-critical hangs off interrupts that can fire at any instant — including halfway through a calculation that was using the value the interrupt just changed. The timing behaviour of the whole system is emergent: it depends on your code paths, your interrupt priorities, and whatever the Wi-Fi stack decided to do this millisecond. Skilled embedded engineers manage this well; it is still their job to manage it.
A PLC runs a scan cycle. The vendor's runtime — not your code — executes a fixed loop, typically every few milliseconds: read all inputs into an image table, execute your logic top to bottom against that frozen snapshot, then write all outputs at once. A watchdog timer halts the CPU and faults the controller if a scan ever overruns. The consequences are profound:
This is the part no blog post can show you. Our simulator has a scan cycle highlight mode that slows the loop down and lights up each phase — input read, rung-by-rung logic solve, output write — as it happens. If you come from microcontrollers, five minutes of watching it will teach you more than any diagram.
Decision guide
The honest summary: PLCs and microcontrollers rarely compete for the same job. If you are asking the question about a factory machine, the answer is almost always a PLC. If you are asking about a product or a project on your bench, it is almost always a microcontroller. For a deeper treatment of the hardware-selection side — architectures, I/O interfacing and cost-at-scale — see this hardware-selection guide to PLCs vs microcontrollers on plcprogramming.io.
From hobbyist to industrial
A large share of the people comparing PLCs and microcontrollers are makers and Arduino programmers wondering whether their skills transfer to industrial automation — often because the jobs are there. The good news: the mental model transfers almost completely.
Digital inputs, digital outputs, debouncing a push-button, latching a motor on, timing a delay — every concept you used on an Arduino exists in a PLC. What changes is the notation and the discipline. Instead of digitalRead() and an if statement, you draw a contact and a coil on a ladder rung. Instead of millis() arithmetic, you drop a TON timer block and read its done bit. Instead of architecting a loop, you trust the scan cycle.
The two things that genuinely feel foreign at first are ladder logic's relay-diagram notation and the scan cycle's frozen-snapshot execution. Both click fastest by doing, not reading — and unlike your Arduino bench, you don't need to buy anything. The free beginner track starts from your very first rung and auto-grades each exercise in the browser, and the full PLC programming course carries on through timers, counters, sequencing and HMI design. If you can wire an H-bridge, you can learn ladder logic in a weekend.
Every article on this topic describes the scan cycle in words. This site is the only place you can watch one execute — because the PLC simulator runs entirely in your browser.
No hardware. No licence. No install. The fastest way to understand what makes a PLC a PLC.
Try the simulator free →