Disclaimer: I used to work for Keba.
Modern PLCs aren’t as bad as the old dinosaurs. Used properly they can simplify your life, and they support more modern coding methods. But I can see why you’d dislike them if all you’ve dealt with are the giant dinosaurs.
PLCs and PC based controls aren’t mutually exclusive. Let the PLC deal with the boring but difficult task of communication with IO via one of the dozens of fieldbuses. Use something nice like OPCUA to communicate with the PLC. That is the primary way I use PLCs these days. ROS <-> OPCUA <-> PLC <-> Anything.
One of the most powerful things a PLC can provide is communication with a realtime fieldbus in a consistent way. There are a bunch of different things like EtherCAT, Ethernet/IP, Profibus, etc. Some of these have open source libraries available, with different levels of reliability and quality, but none of them really compare to being able to connect a device, hit scan, give names to the IO endpoints, and get back to work. You don’t have to read the full spec and become an expert at mapping PDOs and reading packet traces just to turn on a digital output.
Now that basically everyone supports OPCUA, interacting with PLCs from a PC is fairly standardized. You don’t have to replace your industrial PC based controller with a PLC just to access IO. They can happily coexist.
More modern PLCs from companies like Beckhoff and Keba run on actual operating systems like Windows 10 and Linux. They both have realtime extensions where the PLC runtime lives, and both allow you to write native code in the OS, with ways to interact with the PLC runtime.
Keba is a full-blown robot controller combined with a PLC. It runs Linux and operates on a mix of PLC and C++ code. The actual robot kinematics and control are written in C++, while things like motor drive communication and regular end user applications are done in the PLC runtime. I did several ROS integrations when I worked at Keba, including running ROS directly on the controller.
Beckhoff provides a similar setup, minus the premade robot controller. The Windows 10 OS has a realtime extension where the actual PLC runtime lives. I haven’t done as much with Beckhoff, but they also have a ton of ways to combine C++/dotnet and PLC code. You can even turn a regular PC with Intel based network cards into a controller, which sounds very interesting with ROS2 being able to run on Windows. You can use the ADS library from your ROS2 nodes for tighter integration.
There’s a specific IDE for each brand.
Yeah. You’re buying an integrated platform, not just a computer. Ones that are based on Codesys will at least have a similar look and feel. Keba, and many others, use Codesys. Beckhoff kinda does but it lives inside Visual Studio Shell. I was still able to get up and running immediately with it based on Codesys experience.
OOP is barely used in PLCs.
Codesys 3/Twincat 3 support OOP. Classes, inheritance, interfaces, etc. You can do fun things with pointers too.
Code is probably saved in a binary file, preventing any kind of version control and all its benefits.
Beckhoff stores it in loose files and supports git. While at Keba I wrote a git integration that would use the built-in project comparison tools.
There are no common standards to be used.
They use the beautifully named IEC 61131-3 standard. All that really matters is Structured Text. You can write actual code. Changing vendors won’t be as easy as compiling with clang vs gcc, but a lot of stuff is portable.
There are no such things like automatic documentation, testing, formatting, community resources…
Depends on the platform but there are a lot of public resources for Beckhoff and meaningful google results. There is open-source support for unit testing with TcUnit. You can get decent results for Keba by googling questions about Codesys, but when you pay for a platform, you can contact support too.
My background was Comp Sci, and I was used to writing C/C++ on microcontrollers and PC based controls to make custom welding robots. Working with older PLCs was truly miserable and frustratingly limited. When more modern tools like Codesys 3 came around it felt like actual programming again.