LAD, FBD, STL, and other?

Preferred control platform?

  • LAD

    Votes: 65 70.7%
  • FBD

    Votes: 11 12.0%
  • STL

    Votes: 15 16.3%
  • Other (opto22, C, other proprietary, etc.)

    Votes: 1 1.1%

  • Total voters
    92
C for embedded control ST or SCL for ladder logic.
Ladder logic is crippled.
STL or assembly requires too much mental energy and is too error prone.

Consider this. All your PLC firmware and programming software is written in C or C++. Why? Because C and C++ are the most flexible languages. C or C++ also have MUCH better programming environments and debugging capabilities. It is not necessary to do on-line editing when developing system software or embedded firmare.

Why do people use ladder? Because it is graphical. It doesn't require a linker and locator adn most important, one can do on-line edits. However no one will ever use ladder to write an operating system.
 
Peter Nachtwey said:
However no one will ever use ladder to write an operating system.

Ha! I would certainly hope not, but I woulnd't be beyond assuming someone out there might attempt it.

But back on topic, I'm more interested in what people enjoy using for control application, and the reasoning behind it, even if it's as simple as, 'it's what i've always know" or as technical as 'Standard #xxx.xx released by body yyyyyy states zzzz in paragraph 12.139, sec. (f), and this completely invalidates the most basic properties of all control platforms based on body jjjj standards.
 
Why do people use ladder? Because it is graphical. It doesn't require a linker and locator adn most important, one can do on-line edits. However no one will ever use ladder to write an operating system.
.

Your point is? That statement was ridicolous, ladder was just to offer a method for bubba's, like me, to be able to undertand.

Y'all do eveyhing you can to make things so proprietary that only some of y'all can do it.

I can tell you one thing for certain, take that BS and shove it where the sun does not shine, because us bubba's will always be here and figure out y'alls junk.

I am willing to bet in the long run ladder logic will improve to the point that it will offer the advantages of all.

Personally, as a bubba, do not care what any programmer has as prefence. It is all just a language.
 
I prefer LAD as it's the easiest to start out with and to monitor, and if your project isn't that big it certainly has enough capabilities.

Ofcourse it sometimes saves alot of space to write your program or part of it in ST or FBD.

How do you write plc programs in C?
 
I always advise to use ladder as much as possible, so nobody has to call you out of bed to troubleshoot. Ladder is easiest understood by everybody, so there's (almost) always somebody around who can do the job. That way the boss is also happy, because production can continue in the shortest possible way.

Kind regards,
 
Does this count as ladder ?

laddornot.JPG
 
L D[AR2 said:
Does this count as ladder ?

laddornot.JPG
If
  • the relation between "bData" and "bOutput" is known (and documented) or
  • FC1 can be monitored in ladder or
  • both previous statements are true (which is even better)
I would say yes.

Kind regards,
 
I put in a vote for LAD but I do have some caveats:

When dealing with stings or complex calculations, ST is the way go.

When dealing with sequences, SFC is very handy (although not really a language in itself). I've recently started a project using Steeplechase VLC which is toally flow chart based and there are some things to really like about it and other things that make me want to crawl under the desk.

Bottom line is that there are different languages because no one language can fit all applicaitons. AB has taken Ladder to levels never dreamed of 20 years ago but it still can't be everything to everybody. Other systems have a ladder system that is crippled because they have traditionally used IL or FB.

This debate is like asking which PLC is best...
 
I vote for STL. Development time is shorter, the resultant code runs faster, and more instructions are available. I don't find it error prone at all.

As long as I structure my code well (as everyone should), people don't have a problem understanding it. If a bubba can't figure it out, then they will get a different bubba.
 
LADDER (LD)
I use it mostly for basic digital IO (switches, coils, lights, etc.) because technicians/electricians can troubleshoot with it easily and they mostly deal with devices such as switches and coils.

STRUCTURED TEXT (ST)
I use it for complex operations such as math and decision making. Some things are so complicated that if it is done in ladder, it will be way to difficult to follow even for the original programmer. I have done some things that I don't think could have even been acheived in ladder.

SEQUENTIAL FUNCTION CHART (SFC)
I use it to control state machines. I find that it much easier to ask someone which state the machine is in by having them look for the highlighted SFC block as opposed to a series of bits in ladder. I can then ask them what conditions are directly below the highlighted block to find out what is required to move to the next step.
I have done many state machines using ladder, but have found SFC to be a much superior graphical representation for this purpose.


When I program a machine that I do not want to own for the rest of my life, I keep in mind who will be working with it and what makes it easiest for them to understand and be trained on.
 
S7Guy said:
If a bubba can't figure it out, then they will get a different bubba.

S7Guy... do you have on your fire proof suit?... :D

Ok, Let's break this down a bit (pun intended)
  • STL is easier to program and faster
  • LAD is easier to trouble shoot
  • CSF is just weird... That was created by someone that was really board
Now lets look at three examples of the same logic and you tell me why STL is easier to trouble shoot (assumption of your thought by your post) how is a bubba expected to get this through that hard head of his???

Ladderexam.gif


STLexam.gif


SCFexam.gif


thebest.gif


I consider myself a bubba (a very good bubba) but none the less, I have issue with someone making something hard 'just because they can'

I think they should be shot

Now every once in awhile I get screwed up... like with hydraulic accumulators (hi Peter :D ) but for the most part, I get it.

I have a hard time trouble shooting examples like above, programming yes is much faster and easier, as you have in the past its like having a phone conversation....this input off, this input on and not....

But I don't think you can generalize SHOOT THE BUBBA, he can't get it..

Now the last pic...just puts a added twist onto the whole trouble shooting game, first you have to figure out the German writing then figure out the code

Now to the Monkey... where is 'other none of the above'? I cant program with any :) not even OPTO22, you have to give us an out..
 
Last edited:
rsdoran said:
.
Your point is?
Ladder is OK for some types of control programming but it is not the best language out there for control programming.

That statement was ridicolous, ladder was just to offer a method for bubba's, like me, to be able to undertand.
What feature did I mentioned didn't make ladder easier to use for engineers and electricians too.

Y'all do eveyhing you can to make things so proprietary that only some of y'all can do it.
So we must respect the bubba union and write no code a bubba can't understand. That is ridiculous. Control does not begin and end with ladder used in PLCs. What about the firmware code in the PLCs and drives that you use? The ladder y'all write is a trivial amount compared to all the lines of code that goes into PLC firmware. I think my answer is reasonable for one who develops firmware and rarely does PLC programming.

jvdcande, how does one index into arrays in S7 LAD without a lot of pain and agony? I know there is an example on the disks that come with the Berger books.

Archie and ndzied1 have the most pragmatic view.

S7Guy, I disagree about the development time being shorter. SCL is the way to go. It is more efficient to buy a faster S7 to make up for inefficient code than to waste time shuffling registers around.

In geniusintraining's example I find the ladder and the FBD to be most obvious. If I were asked after I graduated from college I would have preferred the FBD. Since then I have seen a lot more ladder than FBD.
geniusintraining, didn't you just graduate from college a year or so ago. if so you should know physics, calculus and differential equations.
 
S7Guy said:
As long as I structure my code well (as everyone should), people don't have a problem understanding it. If a bubba can't figure it out, then they will get a different bubba.

If it wasnt for poor programming and incompetent engineers, us bubba's wouldnt have a job....so......thanks! :)
 
I vote with Archie 100%

First pick the language suited for the application
Second see if the client agrees with it.
 

Similar Topics

Hi, Im about to edit a SCL program from a FB but this error appeared "The Maximum number of lines that can be processed was exceeded". I can't do...
Replies
4
Views
1,947
I only have done LAD diagrams so far and now I got a task to convert these 4 LAD diagrams to FBD and STL. Can anyone help me with that? Thanks!
Replies
16
Views
8,276
Hello dear users As you know in Siemens S7_300/400 plc,after you create your program in FBD or Lad or STL,you can Generate source from your...
Replies
7
Views
3,203
Hey all. You guys don't know me, but you've given me a great deal of help over some time ^^ Anyhow. I was wondering if anyone knew of a way to...
Replies
13
Views
2,990
Hi all, I have a bit of a problem. I work, as you can probably guess by my name, as an apprentice at BMW. I'm currently at college and im doing...
Replies
10
Views
3,107
Back
Top Bottom