logoalt Hacker News

tamimiotoday at 12:11 AM1 replyview on HN

Not really, sure you can use a rpi to control some hw but they are not the same, a PLC usually run rtos, is deterministic (you can predict timing) while rpi relies on linux OS and its scheduler, the PLC also uses ladder language or function block compared to rpi high level language, and obviously PLC industrial grade I/O both analog and digital that also deal with voltage noise that usually happens by field sensors, and environmentally rugged and rated to run non stop compared to rpi.

Now, if you really want to use rpi as a plc, you need something like openplc or codesys as a runtime, add some HATs for I/O, and use protocols like modbus. It will be a software plc but you are missing the hardware certification and other features. Rpi is good as edge computing rather than plc, like processing vision or data logging, it’s why in drones you need the autopilot AND rpi or companion computer, each does certain functions.


Replies

Kim_Bruningtoday at 1:20 AM

I used to think codesys on raspberry pi was pretty much the pessimal application of an ARM processor (and nothing has changed my mind so far). Here you have a chip that is famous for staying stone-cold and doing interrupts in microseconds , and instead you run it hot on a 50Hz (default) PLC loop instead.