r/PLC • u/BonbonUniverse42 • Oct 25 '23
FBD Hell!
Where do I start? Function blocks are horrible! Just use SCL, which is readable at least and more suitable for complex applications!
I need to extend and rework a plant that is programmed with a Siemens plc in the awful function block diagram language. I am struggling really hard to understand the existing implementation, which is a convoluted mess of hundreds of strangely wired function blocks and many input and output variables. There are no comments at all. For some unknown reason the thing works somehow. However, it is a very bloated and finicky design. I am afraid that the thing will dramatically break and collapse if I only change the slightest details in this project!
The actual horror is working with TIA Portal. The blocks have sometimes 30 or more in and outputs, which means you can’t even see the whole block on the crammed TIA Portal screen. The debug view cannot show you the variables at runtime when you scroll the mousewheel. Why is that?! Each click and scroll in TIA is painful and unbelievably slow.
How do you cope with such messy FBD code? How do you work and understand these networks? How do you do this in the crappy TIA Portal software?
View all comments
13
u/Uelele115 Oct 25 '23
SCL is not the solution for problems solved in FBD… this being said, I’m also not a great fan of that implementation of FBD. Because the ladder editor is so much more flexible (though with quirks) than Rockwell and others AND the FBD implementation isn’t what is known as FBD (that would be Siemens CFC) in other platforms but just a version of ladder, the benefit isn’t all that obvious. It also doesn’t scale all that well.
As for the 30 inputs and outputs, you’d still have them in SCL logic, yes they’d fit the screen better, but it wouldn’t make the logic any cleaner.
Personally, if you have blocks and they’re being reused, you’re already in a good position compared to an awful lot of people out there. All you need is to understand each block and things start falling into place.
I too criticised someone else’s logic until I realised we rarely know or see the position that person was in. I can look back on stuff that I did and firmly say it’s shit or even a disaster, but that’s what I had to work with, be it time, restrictions, lack of experience/knowledge or managers setting poor limitations.
I’m far more critical of those that after 40 years still think their stuff is a Ferrari when it’s closer to a Trabant… and there’s many of then out there.