Basic PLC question that challenges the best:

fanny pack

WOW, really, you had to go there.... not sure why these had to go away, I loved my fanny pack, I thought about a murse but :unsure:

The great thing about a fanny pack my compact 9 was really easy to get out and it could hold a couple clips
 
Fellas, this was a wild ride. Write what you know, outside of some rare instructions, you can accomplish your task with any of the languages, so pick the one you can write the cleanest. I had the pleasure of looking at one of the first robot programs I wrote years ago, and I was amazed at how much I've learned since then. That kid had promise, but he didn't code for ****.
 
I came into work one time, sick as a dog and heavily medicated. Worked on a machine for half a day and then was somehow at home with no recollection of having travelled.

The next day I had a look at the code in the machine. I had no idea how it worked but it was working well. So I backed away and never touched it again.
 
I came into work one time, sick as a dog and heavily medicated. Worked on a machine for half a day and then was somehow at home with no recollection of having travelled.

The next day I had a look at the code in the machine. I had no idea how it worked but it was working well. So I backed away and never touched it again.




:ROFLMAO:
 
For the record, itÂ’s not supposed to support recursive functions. But if you use an FB with a method, the method can call itself if you pass itÂ’s own FB pointer to it. TwinCAT canÂ’t stop what it doesnÂ’t know about...

And it also supports recursive data definitions using pointers (no special trickery there) which is nice for tree structures (especially with runtime memory).
This post is just loaded with question marks.


Let me phrase it this way, how serious is the role of industry standards like IEC 61131-3 and PLCOpen and how strictly should we adhere to them?



They are pretty much designed to protect us (and those who maybe harmed by us) from ourselves. Which brings up another question, do advanced programming features lead to bad code?
 
Write what you know, outside of some rare instructions, you can accomplish your task with any of the languages, so pick the one you can write the cleanest.
This is closer to being correct now but back when most PLCs or micro controllers didn't have floating point there were somethings that were extremely difficult to do.
For instance multiplying by PI or my close approximation 355/113.
The problem was that 355 times a number could exceed what would fit in a 16 number. Most CPUs could multiply a 16 x 16 bit number and get a 32 bit result. One had to use assembly language to divide a 32 bit by 16 bit number to get a result. The remainder then had to be converted to a fraction of 65536.
 
Let me phrase it this way, how serious is the role of industry standards like IEC 61131-3 and PLCOpen and how strictly should we adhere to them?




Let me phrase it this way: does adherence to IEC 61131-3 protect us, and those who may be harmed by us, or does it only protect the former from lawsuits because it is considered to imply due diligence?
 
Let me phrase it this way: does adherence to IEC 61131-3 protect us, and those who may be harmed by us, or does it only protect the former from lawsuits because it is considered to imply due diligence?
Let's take out harm to others out if the question to avoid this being a legal arguments.


The purpose of the standards is to improve code quality; troubleshooting, reusability and reliability(error free). Mostly they're guidelines and it's up to us to follow and few are either restricted or generate a warning by the compiler.
Should there be more restriction to insure higher code quality or should they leave it up to us to innovate? Give us more features and we can be responsible users.
 
The purpose of the standards is to improve code quality; troubleshooting, reusability and reliability(error free). Mostly they're guidelines and it's up to us to follow

Personally I think that first sentence is a canard, because the second is universally true. There is no such thing as a structured programming language; there are only structured programmers.

P.S. I am not referring to ST specifically here, but to all "structured" languages. One can write good and ugly program in ST, in LAD, in Java, whatever. The language itself is a tool and irrelevant; there is only the convenience, familiarity, knowledge and discipline of the coder.

[sorry, I keep expanding this post]

TL;DR - Random thoughts, possibly OT.

  • There is at least one amusing thread on this forum about various "temporary" hacks that were never replaced by a permanent solution, even after decades.
  • One of the forum members has a signature something like "There is never enough money to do it right, but there is always enough to do it twice."
  • Standards only work if people follow them, and if something deemed "necessary" cannot be accomplished within the standards, what do we expect is going to happen?
  • Does IEC 61131-3 define byte order in a REAL?
  • LAD is part of the IEC 61131-3 standard
 
Last edited:
Not too late to join this ... :)
I were schooled in LAD and switched..
But please, tell me when LAD is the best alternative.
LAD is 100% graphical.
FBD is only 50% graphical.
How do I argue that ? ..
By the fact that you have to combine the "≥" and the "&" with the boxes inside your head to interpret the logical result. Remove the "≥" and the "&" and you dont know what these boxes do.
Ladder is so easy to follow, in particular when being online and observing logic that changes rapidly.

I started with FBD (way back with Siemens S5), was forced to work with LAD (because of changing to AB PLC5), and had to admit that LAD is just better.
 
Not too late to join this ... :)
LAD is 100% graphical.
FBD is only 50% graphical.
How do I argue that ? ..
By the fact that you have to combine the "≥" and the "&" with the boxes inside your head to interpret the logical result. Remove the "≥" and the "&" and you dont know what these boxes do.
Ladder is so easy to follow, in particular when being online and observing logic that changes rapidly.

I started with FBD (way back with Siemens S5), was forced to work with LAD (because of changing to AB PLC5), and had to admit that LAD is just better.

FBD is graphical. You have to read LEQ and ADD in LAD just the same. You still have to read variable names in either. They’re both graphical. No sense in assigning values to it.
 
Not too late to join this ... :)
LAD is 100% graphical.
FBD is only 50% graphical.
How do I argue that ? ..
By the fact that you have to combine the "≥" and the "&" with the boxes inside your head to interpret the logical result. Remove the "≥" and the "&" and you dont know what these boxes do.
Ladder is so easy to follow, in particular when being online and observing logic that changes rapidly.

I started with FBD (way back with Siemens S5), was forced to work with LAD (because of changing to AB PLC5), and had to admit that LAD is just better.

Agree to disagree then Jesper..:D

Ladder tends to get messy Quick, with that said I’ve also seen really messy FBD-editors (ABB Control Builder).
Will probably get punished for this, but if you have a hard time to grasp AND,OR,NOT and the states TRUE and FALSE and needing virtual contacts & coils instead you should probably stick to your screwdrivers & multimeters.
 
Not too late to join this ... :)
LAD is 100% graphical.
FBD is only 50% graphical.
How do I argue that ? ..
By the fact that you have to combine the "≥" and the "&" with the boxes inside your head to interpret the logical result. Remove the "≥" and the "&" and you dont know what these boxes do.
Ladder is so easy to follow, in particular when being online and observing logic that changes rapidly.

I started with FBD (way back with Siemens S5), was forced to work with LAD (because of changing to AB PLC5), and had to admit that LAD is just better.

Yes, Ladder is much better than FBD, if you can't make a good LAD network, you are trying to fit too much in one network anyway.

FBD is horrible, even more horrible than STL.


ST naturally trumps those all for almost everything when written with proper naming.
 

Similar Topics

What ladder logic is required to have an HMI button that gives output when you push it then removes that output when you push it again? For...
Replies
9
Views
3,804
I will apologize in advance for this question. In a PLC scan I understand the inputs are read, then the PLC carries out a scan out the logic and...
Replies
11
Views
4,091
:banghead: I am a newbie trying PSIM and am facing difficulty with a counter in the Batch program. I observe that there is significance in the...
Replies
2
Views
2,165
Hello Everyone, I am brand new to PLC's (learned they even existed 3 days ago) and have gone through the tutorial on this site. I am a little...
Replies
4
Views
5,203
Please,: Explain the meaning of Scan cycle in a PLC when it is running a program?
Replies
2
Views
3,199
Back
Top Bottom