Advices on learning PLC programming

Pandiani

Lifetime Supporting Member
Join Date
Apr 2005
Location
Tz
Posts
718
Hi, guys I recently start learning PLC programming. I've downloaded free PLC book from Hugh Jack and trial LogixPro simulator. I've been reading PLC book very carefully especialy chapter about design. I decided to make program for door simulation in logixpro. First I made program with no formal methods suggested in the book and results were very satisfactory.Then I made stateflow chart with transitions and states and I got program that had 3 times more rungs. So can you give me any advice how to approach this. I know that good design on paper is very important, but when using that I get more rungs and sometimes strange behaviors. For example in Logixpro simulation user cannot press start,close and stop button at the same time but in reality he(she) can. Should I pay attention on that as well? I need your advices how you started anf if is it normal to screw thing a lot in the begining? I simply cannot think all posibbles situations and see them only after I start testing program

Any help would be greatly appreciated.

P.S. Excuse for bad English, it's not my native language.
 
i started programming for work 2 months ago but i learned a bit more bout plc's and stuff like you before i started that(at least i think reading your post) i think that almost everyone finds out most of the problems while testing, thats what testing is for in my eyes. screwing up a program or make it hard to read at the end because the changes you make wile testng can easily be fixed if the program is finished completely.

for the button problem,
you can make in youre program some sort of safety so that if those 3 buttons are pushed at the same time there won't change anything to the prgram stats
for example something like this:

L start
AN close
AN stop
= Q0.0

or in ladder:

start close stop Q0.0
-| |--------|/|--------|/|------------( )

thats where my storie ends so good luck and learn mutch

im also busy try'ing to learn mutch :D
 
Thank you for your reply. I'm eilling to learn and hope there are people on this board who will help.
 
i shall try to help as mutch as i can but i dont know that mutch about programming either. but this forum will help you alot i think. myself i learn alot here so that will work for you also
 
Any simulator is going to have limitations, so don't be surprised if it can't exactly model the real world. The intent is to teach basic concepts and logical thinking. It doesn't try to be a tool to allow simulation and testing of complex control systems. There are simulators that try to do that, and they cost thousands of dollars, and they have limitations too.

As far as the difference in program lengths, that is to be expected. Ladder logic was specifically developed to handle sequencing and event driven controls, and is very efficent for that. The "higher level" languages like sequential function chart or function block programming and other state languages were developed for more complex processes. It is common to have an interlock that is a simple rung in ladder turn into a long function block or statement list. On the other hand, some control operations that are a long complex mess in ladder can resolve into a very simple function block. These are simply the tradeoffs of the two approaches.
 
Don't worry about how long your program is; at least not yet. For now just make sure it works and you know why it works.

As for the buttons... Assume that if a human can think of a way to screw up your control system then they will do it! :mad:

I make the base assumption on all my software that a human will eventually come along and attempt to blow him (or her) self up. I make the assumption that someone with malice and forethought will attempt to break my controls. So far no one has succeeded, but several have tried :mad:

🤷

Didn't there used to be a smilie shooting itself?
 
As Tom said the simulator and the book are trying to introduce you to concepts and methods. Also the learning examples are pretty simple because not many of us have the time to develop a full-blown, real-world application just for the sake of learning.

Things like flow charts and state diagrams are nothing more than tools. Sometimes tools are appropriate to a task and sometimes they are not. But either way you need to learn how to use the tool. And it's usually easier to learn to use the tool on a simple task.

In your case the door exercise sounds pretty easy for you. You can keep the whole process in your head so it's relatively easy programming the whole thing without any outside organizational tools. Now expand this exercise to programming 20 interlocking, sequenced doors with proper cross-checking and variable sequencing. You most likely wouldn't be able to keep the whole process in your head. In that case you would use something like a state diagram or a flow chart to keep your thoughts in order.

Using flow charts and state diagrams will tend to produce code with a higher rung count. But it also often results in code that accounts for more unexpected situations and is much easier to understand and modify by someone who didn't write it.

Keith
 
Thank you guys very much, now I'm highly motivated to continue learning. I know I'll have a lot of questions and hope you'll help me to me to figure out and get answers.
Cheers
 
marksji is right, a human will find a way to cause problems. i used to spend a lot of time trying to get the "perfect" program, and would still have bugs in it. so if you write a program and have problems with it, don't let it get you down. some bugs you may not find till months down the road.

i don't program much now, our machines come in after they have been put together in the factory and tested, all the programming already done. but we find bugs in them also.

good luck.
 

Similar Topics

Hello all, The company that I worked for had their own libraries for process automation. I'd like to create my own library for automation (to...
Replies
2
Views
1,700
Hi , I am an Electrical engineer , i am working in construction contracting field , and i would like to move to Oil and Gas sector through...
Replies
1
Views
1,791
Hi for my final year project a part of my project consist to supply a house automatically by plc with hot water. then from a well i have to pump...
Replies
6
Views
1,846
Hello, I am trying to develop sorting algorithm for a conveyor belt with pushers where incoming boxes are measured by reflective diffusive...
Replies
13
Views
8,800
I've gotten to the learning curve where I can program a call for pump to come on at set point but I'm not sure how to turn the same pump off when...
Replies
1
Views
105
Back
Top Bottom