Function Block Diagrams

cfisher

Member
Join Date
Mar 2005
Posts
3
Hello there people,

I've just completed the writing of my first PLC program, using Ladder Logic alongside Function Block Diagrams. I was surprised at how easy FBD's were to work with (probably due to me being more inclined to working with electronic systems than PLC's), and was wondering what other people thought, both good and bad. If anyone has any negative comments on the subject of FBD's, i'd be intrigued to hear them!

Craig
:cool:
 
I started my working life as a design engineer designing first generation computer controlled telephone exchanges. FBD to me "feels" very much like integrated circuit design, so I feel right at home there. The only time I ever use ladder is for checking things if the network has got so big that you have to scroll down three or four screens (just found one occupying 7 screens) and depending upon structure, Ladder may be a bit more compact (not always much, mind!).
 
I prefer ladder, but that's because that's what I'm used to. I've had to fathom STL as I've worked as a lot of the old S5 stuff is in nothing else.

I have never even tried to write anything in Function Block Diagram as, to me, it seems alien.

Its just a case of what works for you.

I think there are certain things in S7 that mean you'll need to go over to STL but if FBD suits you for now then crack on...

:)
 
I used to be a LAD guy, but am more and more leaning towards FBD.
One thing to really watch out for is the tiny inverter dot on the front of the block. That is the bug I most frequently find when a block isn't working correctly.
By the way, I REALLY hate STL, but sometines that is the only thing that will work.

Good Luck,
Kevin
 
I had read a very nice opineion here in this forum (Allen Nelson ?) that the only (or major) difference between Ladder and Function block is that in FB the wires hold numeric data and in Ladder the wires hold boolean data.

I like this openion, and I think that Ladder is more readable than FBD in control applications.

Anyway, it depends on many other factors (Your favourite PLC supports it or not, which of these two methods you learned first ... etc)
 
Another way to think of the difference between Ladder and FB is: Ladder visualises the flow of logical states better, whereas FB visualises the flow of the data better.

A single rung of ladder is a very powerful display of a the conditions within a single logical statement, the user can spot at a glance exactly the true/false state and why. But the inherent weakness of ladder is that is does not impose on the programmer any defined way to organise the data flow. Much of the skill of writing good ladder is all about organising and commenting the data so that others can follow it.

By contrast FB explicitly displays all the data links from one block to another. This makes it very easy to follow a piece of information around a program, and for example, when using FB you find yourself using "cross reference" far less often. However the weakness of FB is that you HAVE to think about what each Block is doing. On the page an AND block and an OR block look just them same, so the user has to be able to mentally track what each one does.

From this falls the observation that ladder is a better language when state and sequences are the dominant information, and FB is the better langauage when data is the dominant information. Of course it is quite possible to write perfectly good systems with only ladder, or only in FB and this kind of choice will reflect the experience and background of the programmer.

Just to add another thought to this... ControlLogix allows the user to link multiple statements on the same rung. This means that the data output of one statement can directly flow onto the input conditions of the next. Once you get used to this it dawns on you that this is a kind of half-way house towards combining the strengths of ladder and FB together.
 
Last edited:
FBD is the best. Ladder diagrams suit for old electrical people and STL is good for those who are familiar with computer programming software.
 
Well it was nice reading the above, I am currently learning both ladder and FB, for the first time... I am just a minute ago tryin to understand each rung of the ladder logic I have in front of me, in an attempt to convert it to FB, to run on a Tricon PLC... not sure i added any value to this post cause I cannot yet say which one I prefer...

All that is going through my mind while working on this conversion is, I hope I am along the right track... kinda exciting and scary cause its a big project, and I am clueless.. But I am liking what I am doing
 
Fb Vs Lad

Hi
For me i started with ladder diagram as the widely used programming language.it is easy to program to maintain or it's easy also for other persons to troubleshot your program .when i started to deal with FBD i found it more easier specially if you are going to standarize your programming or you always make the same program with a little modificatons all what you want to do is to copy and past your function block.
Br
 
FB is great for standard tried and proven logic that can be used repeatedly - eg standard alarm routine - standard scaling routine. FB can usually contain logic in either ladder or STL. One can open up the FB and monitor ladder inside quite easily - STL is another beast altogether.

I have just recently started using FB for standard routines and find it really good for repeatable rungs. Not so good for other code that is unique to a process or project. Takes too long to commission for me. Ladder is much better there. Most of my code is unique and FB is not much use to me for most projects.

Many electrical consultants specify ladder exclusively as it is relatively easily understood by electricians who understand control systems.
 
i still like use ladder depend on FBD, i always use Ladder for my PLC program. I want to try use FBD ? i think it's interesting to try
 
dont get me wrong..but from a simplistic point of view..ladder wins hands down..For all you FB people..draw this..


A B
-----------| |------|/|----------(c)
| |
|-|c|--|



Seems easy enough but would like to see a FB diagram that was as straight forward as that..

D
 
Not difficult, depending on the PLC. If the PLC is happy with ladder inside the function block, then that is how you write it. Have a look at Omron. The FBs CX-One renge from very simple to extremely complex. You can also open them up, modify them and save them for your own use at a later date.


Interesting that from posts here, it appears Siemens protect a lot of their FBs.
 
Mehdi said:
FBD is the best. Ladder diagrams suit for old electrical people and STL is good for those who are familiar with computer programming software.

Your statement above is your personal opinion, that is all it is, your opinion.

Everyone's opinion will differ on what is best, I work in LAD and STL, I very rarely touch FBD, but as for what one is best, that depends on the situation, for data manipulation I tend to program in STL, this is a throw back from working in S5, even though this can now be done in LAD in S7. The vast majority of my programming is in LAD, I like to have my code 'dumbed down'.

There has been discussions on this forum in the past about 'dumbing down' code, so I won't cover old ground.

I see that Bob has replied while I was typing, first of all Bob, I hope you had a good Christmas in the sunshine, secondly, Siemens 'KNOW_HOW_PROTECT' all of the 'canned' functions (FB's FC's SFC's and SFB's) supplied by them in the S7 libraries.

Paul
 
I see that Bob has replied while I was typing, first of all Bob, I hope you had a good Christmas in the sunshine,
A great one Paul - 35 degrees C - hope you did not freeze and had a good one too.

Siemens 'KNOW_HOW_PROTECT' all of the 'canned' functions (FB's FC's SFC's and SFB's) supplied by them in the S7 libraries.

Why? I find it very useful with Omron that I can open an FB up and modify it to suit a particular situation.

for data manipulation I tend to program in STL, this is a throw back from working in S5, even though this can now be done in LAD in S7.

Absolutely painfull to the unititiated!!!

The vast majority of my programming is in LAD, I like to have my code 'dumbed down'.

A lot easier for most. I tend not to even use sections most of the time but write one long ladder program. When troubleshooting, I know where to go as I break the program down into sections ithinb the one ladder program anyway. Just make a few notes as to where the sections start (rung numbers) and use the search function or the dowm arrow key with the rungs highlighted. Really very easy if one is organised.
 

Similar Topics

I just upgraded my RSLogix 5000 software from version 12 to Version 13. Now I cannot view any Function Block Diagram program files. They show up...
Replies
3
Views
8,012
Hi, I have attached herewith one image which our programmer has been used in S7 1500 PLC. Now we need to use the same instructions in S7 1200 PLC...
Replies
4
Views
118
Please see attached file. I need this program in Function Block form but I am totally lost on this. Any help would be appreciated. Thanks!
Replies
8
Views
295
Hi! I am using a TM200CE40T PLC from Schneider to write data over Modbus. I have used Memory words (%MW) before using the Write variable...
Replies
1
Views
534
Hi folks. New to the forum, but been working with PLCs for several years now. Would like some advice on whether you would keep this logic, or...
Replies
9
Views
1,067
Back
Top Bottom