Rule #1 for Programming PLCs

preview_player
Показать описание
This might not be what everyone wants to hear...however my goal is to encourage programmers in the correct direction for the sake of their careers. The engineer must go to the process...not expect the process to come to them...it is about the process and not about us, the engineers.
Рекомендации по теме
Комментарии
Автор

You are so true with all you say. My first control programs were created back in 1972 with Data General Assembler language. We were the first aluminum smelter plant in the world to be on computer control. The control was based on an office computer like the DEC made by Data General. It doesn't bet more basic than assembler language. You coded it, you loaded it, and prayed it worked. like you I used basic, foretran, and some 'c'. I really liked the ladder logic idea. it is easy to see and understand. I liked the AB because it would show what was happening at the time. I have created some overly complex PLC code, but it was still easy to follow once you learned. I agree with everything you say.

michaelparry
Автор

Way to tell it like it is Professor Tim! Years in the trenches have taught you (and the rest of us) well! I'm honored to have worked with you.

dirkbuikema
Автор

I walked into this video looking for direction on how to make my own plc for a greenhouse as a fun tech project gone too far. But by the end you have shown me not only why my previous job has a lot of issue learning their plc but why they have so many issues finding anyone other than the German based manufacturer to troubleshoot it. I remember seeing code flying down the hand held controller and my boss spending lots of money, time and effort every time a sensor went out of wack or a cylinder blew.. I can't tell you how many hours I spent learning how that thing worked with the production line.. how many hours per year lost to red lights or amber lights that wouldn't go away. How many hard restarts that poor thing went through.
Now that I've watched this I am going to learn this the right way so I can rake in a little of that corporate coin they are throwing around.. maybe it will make up for the blood I didn't intend to give to the workplace 😬

jeffb
Автор

The only point of this video was that in consideration of "good parts out the door", the systems have to be easily maintained by those WHO DO NOT WRITE CODE for a living. Our own personal opinions on writing code are relevant only to us. The "maintainers" have a much more difficult task than those who write the code themselves. As long as we can get a sign off from the enterprise, we can walk away and if we do get called back, the code is never that cold to us after a little reacquaintance time. However, the individual that has to be able to sort out dozens of programming styles has a real challenge on their hands and that is reading stories that we have written with minimum effort because it is the easiest and fastest way to get that signoff. They almost have to be greater experts than us.

plcprofessor
Автор

A well written PLC program will raise faults for ALL conditions. As a (PLC) programmer, that is what you should strive for. Iit is not good practice to expect somebody to open the code and check what is going wrong. Whatever the language you pick, your design strategy and implementation is the key. The number of faults a system can raise base on the number of IO points and complexity is revealing. One of many good advice: do not implement silent interlock. Thats a killer. This is one of many reason why another person has to open the code. Another classic one is a sequence logic launching an action without any fault timeout.

Rick-miyt
Автор

Fully agree. Thanks for slapping that into me, I was getting distracted.

CraigHollabaugh
Автор

After using ladder for most of my career, I found IEC61131-3, specifically SFCs and CFCs. Trouble shooting SFCs and (properly commented) CFCs is even quicker than ladder. We had a young hotshot engineer who, after no small effort, convinced me to try IEC61131-3. After a big successful project where public safety was more of an issue than I had previously encountered (6000 psig 180k ppm H2S gas near a small city) I didn't have any trouble swallowing my pride and buying that kid dinner and thanking him. Best job-related advice I ever got.

jeffreymorris
Автор

Great information…Thanks a million !!!

lanthonyperdum
Автор

I’m sorry but you can’t compare poorly written Structured Text with ladder logic.

In ST you can assign an input to an output Digital_Out1 := Digital_In1; without the need for IF THEN ELSE.

For the case statement code you could write:

_IO_EM_DO_00 := (State = 1);
_IO_EM_DO_01 := (State = 2);
_IO_EM_DO_02 := (State = 3);
_IO_EM_DO_03 := (State = 4);

Most structured text IDEs will highlight the Boolean values and display variable values within the code.

Each language has their pros and cons. I would definitely recommend Ladder for certain applications, but I prefer the power of Structured Text. Using ladder or Function Block programming as a wrapper framework to hold Structured Text functions where required is a good compromise in the limited cases when someone needs to view the code.

PJElliot
Автор

What is the solution for the maintainer that has to troubleshoot the process (system) . Next time you purchase something that requires you to read the instructions, try reading the section in Chinese and see how far you get. It is bad enough some of the crappy instructions written in your first language but try on a language that is not your first language and on top of that try following the instructions that has an alphabet or characters that you have no idea what any of them signify. There is a logical continuity that resembles electrical continuity with ladder logic diagrams that you can follow without reading any text. If you haven't spent many hours on the factory floor than your opinion is that of someone having written a travel guide for a country that they have never even visited.

plcprofessor
Автор

Wow, my thoughts exactly you are spot on❤❤

abelferia
Автор

There has to be a focus, a focal point. It cannot be broad at both ends nor narrow at both ends. There has to be a focus on one end or the other, the code writer or the maintainer.

plcprofessor
Автор

For me, structure text or ladder logic, they both need to be readable. That is the key. I’ve worked with unwieldy examples of both.

rschall
Автор

Makes sense, double check equipment first. Got it. 🔥👍

davidherr
Автор

The example is written in poor ST style, it can be written more simply as an assignment statement. ST strength will be seen in more complex tasks, not simple on off controls. For example, operations on tables, indirect addressing or even just calculating the moving average - LD looks completely unreadable.

StefanBrock_PL
Автор

It is allen Bradley problem.. in codesys you can see logical state of all variables in online mode in ST. In siemens too. :)

przemekfirek
Автор

My comment was too early, this was a great CLASS. Definitely will listen more to this “old geaser”.

davidherr
Автор

MicroGrid node equipment has many PLCs. Fast builds & repairs are key for reliable production.

johnswolter
Автор

I believe the genius was programming using 'ladder logic' that looked similar to the schematic diagrams used to show relay logic.

cfgosnell
Автор

I was just 10 years old when I had my first interaction with automation. It was with BASIC on 8bit PC in 1984. Actually, it was my mother's second husband to explained how to connect all the el. appliances at home to the computer and control them. When I started the PLC course I was somehow disappointed in the ladder logic as was already programming Arduino on C++ which is much easier. But a couple of weeks later I understood that is much more important to understand the ladder logic especially the relay logic which actually is based on Boolean algebra. In my opinion, if you don't know what are logic gates and binary system there's no point in losing your time trying to be a professional PLC programmer.

iliapopovich