can python software take place of logic ladder program in PLC through modbus?

user3300423 picture user3300423 · Jan 22, 2016 · Viewed 10.9k times · Source

Trying to figure out the best way of controlling industrial PLC's with Raspberry Pi/linux server - specifically using python and pymodbus (modbusTCP) over ethernet...

Once the PLC internal registry is mapped properly to modbus, can software written in python take the place of ladder logic programming in the PLC and control it completely?

Or will ladder logic/ native PLC code still need to be written?

Answer

user3597496 picture user3597496 · Jan 23, 2016

You should not replace PLC logic with your linux server. You need real time OS for that. Even running real time OS and controlling PLC with it is a bad idea. PLC-s have all kind of checks built in for controlling inputs/outputs, program cycle, internal diagnostics and so on. They are a tool meant specifically for that task. IMHO ladder logic is easier to learn than real time OS.

You should use your server as HMI - human machine interface, that sends control data to PLC and displays it back to the user.

If your project is for learning experience or personal project then you should of course do whatever you feel like.