Elevator PLC Question

jicokazoe77

Member
Join Date
May 2018
Location
Philippines
Posts
2
Hi I'm new to plc and I've been looking for solutions in 4 floor elevator.
I have been studying this elevator solution for like a week now, and this part bothers me:

BnTHm4d.png


From what I see from the simulation, it is like a pulse that randomly latches and unlatches going up and going down flag.

It's kinda weird but is it safe to use in the real world?
 
Welcome to the Forum!

Do be aware that you should not be "looking for" solutions but "creating" solutions to this homework problem. If you happen to "find" something, you will learn nothing but how to cheat by copying other people's effort. This may be enough to get you through a lesson or a class, but not a life.

And remember, your teacher's Googling skills are probably equal to your own.

You did ask a legitimate question, which deserves a legitimate answer, however.

First off, the PLC never does anything randomly. It always does what it's told, which may or may not be what you intend.

If you look at rung 8, you'll see reference to "T4:2.ACC.1". This is a bit in the accumulated time of the timer. Remember your binary:

Value | Binary
0 = 0 0 0 0
1 = 0 0 0 1
2 = 0 0 1 0
3 = 0 0 1 1
4 = 0 1 0 0

The /1 bit is the second from the end, thus is true (making -| |- true) when the value is 2 or 3 (or 6 or 7 ....), and false (making -|/|- true) when the value is 0, 1, 4, 5, etc.

The TON instruction is driven by the -|/|- of the timer's own DN bit. Thus, because of the way the TON "thinks", when the time is up, the DN bit gets set, making DN true and thus the -|/|- NOT true, which resets the timer, including the DN bit, which then makes -|/|- true, and the timer starts from scratch. This is a very common technique.

Thus the timer counts 0-1-2-3-(4 back to 0), changing every 0.1 sec.

Thus for the first 0.2 sec, -|/|- T4:2.ACC.1 will be true, making the Up Flag true and the Down Flag false. Then during the next 0.2 sec, it will be the other way around.

In other words, the Up and Down flags blink alternatively and mutually exclusively.

You may already understand this; if so, pardon my assumption that you did not. You're question was: "It's kinda weird but is it safe to use in the real world?"

It's not all that weird; variants on this technique are quite common in making lights blink.

The use of latches allow the left-hand side of the rung to go false, and the PLC "remember" what it's supposed to do -- probably drive the elevator up or down once a button has been pressed. It would certainly be strange for the elevator to start going up, then if someone happened to call from a lower floor while it was travelling, for it to stop going up and head down.

As for "is it safe"? That's going to depend on the rest of the program. Without that, there's no way to tell. There's nothing inherently UNsafe about the code snippet, but without the rest of the code, it's impossible to judge.

If you post YOUR code and have questions as to why it isn't doing what you expect, we're usually only too happy to help. But please don't ask us to do anything for you. We're here to teach, but that usually means sitting on one's hands after pointing the student in the general direction of the answer.

Good luck!
 
Welcome to the Forum!

Do be aware that you should not be "looking for" solutions but "creating" solutions to this homework problem. If you happen to "find" something, you will learn nothing but how to cheat by copying other people's effort. This may be enough to get you through a lesson or a class, but not a life.

And remember, your teacher's Googling skills are probably equal to your own.

You did ask a legitimate question, which deserves a legitimate answer, however.

First off, the PLC never does anything randomly. It always does what it's told, which may or may not be what you intend.

If you look at rung 8, you'll see reference to "T4:2.ACC.1". This is a bit in the accumulated time of the timer. Remember your binary:

Value | Binary
0 = 0 0 0 0
1 = 0 0 0 1
2 = 0 0 1 0
3 = 0 0 1 1
4 = 0 1 0 0

The /1 bit is the second from the end, thus is true (making -| |- true) when the value is 2 or 3 (or 6 or 7 ....), and false (making -|/|- true) when the value is 0, 1, 4, 5, etc.

The TON instruction is driven by the -|/|- of the timer's own DN bit. Thus, because of the way the TON "thinks", when the time is up, the DN bit gets set, making DN true and thus the -|/|- NOT true, which resets the timer, including the DN bit, which then makes -|/|- true, and the timer starts from scratch. This is a very common technique.

Thus the timer counts 0-1-2-3-(4 back to 0), changing every 0.1 sec.

Thus for the first 0.2 sec, -|/|- T4:2.ACC.1 will be true, making the Up Flag true and the Down Flag false. Then during the next 0.2 sec, it will be the other way around.

In other words, the Up and Down flags blink alternatively and mutually exclusively.

You may already understand this; if so, pardon my assumption that you did not. You're question was: "It's kinda weird but is it safe to use in the real world?"

It's not all that weird; variants on this technique are quite common in making lights blink.

The use of latches allow the left-hand side of the rung to go false, and the PLC "remember" what it's supposed to do -- probably drive the elevator up or down once a button has been pressed. It would certainly be strange for the elevator to start going up, then if someone happened to call from a lower floor while it was travelling, for it to stop going up and head down.

As for "is it safe"? That's going to depend on the rest of the program. Without that, there's no way to tell. There's nothing inherently UNsafe about the code snippet, but without the rest of the code, it's impossible to judge.

If you post YOUR code and have questions as to why it isn't doing what you expect, we're usually only too happy to help. But please don't ask us to do anything for you. We're here to teach, but that usually means sitting on one's hands after pointing the student in the general direction of the answer.

Good luck!

Thank you for your reply and also for the advice. I'll be applying what you said from now on.

Apparently, the program used by the author in the solution I found is Logixpro. I had to convert everything into Cx-Supervisor and Cx-Programmer. I focused on CX-Supervisor trying to do it through scripting.

What I did as a replacement in this rung is to use the pulse contact offered by the CX-Programmer.

Again, thank you for your reply. I will make sure my next post will feature my code instead of other's.
 
I don't know how the program works. However maybe you are activating the inputs in a wrong way. Do you have a description?
 
Last edited:
May I suggest that you forget the ladder logic at this point and focus on the following.

look at your assignment as the customers specifications.
writ then down in terms you understand and in logical order.
go from the first floor to the second, then from the second to the 3rd, then the 4th.
do the same going down.

think about when you were on an elevator and what happened going up and then going down.

you know it has floor buttons on every floor.
you know it has a hydraulic motor / pump (my assumption), and an up/down valve.

what tells the elevator where it is?

did the elevator just stop when it got to the correct floor, or did it slow down first?

when you do this exercise, you can the code your logic with a lot less confusion.

james
 

Similar Topics

Hello guys i am new in plc and i want my final project in our subject to make an elevator at least 3 floors. can anyone outthere help me out in...
Replies
3
Views
1,678
Hello, i am in plctalk.net :) I need little help. These wiring diagram and ladder diagram for s7-200. Can someone convert these two diagrams for...
Replies
1
Views
4,377
Hi Guys Im stuck programming my doors and delay function (on button press, while in operation) and i have no clue as to solve it.. im using logo...
Replies
12
Views
4,323
I've been very interested lately in PLCs and have been trying to teach my self PLC programming, and have recently been lent a AB Micrologix 1000...
Replies
18
Views
7,586
hi, my name kohar. i work my final project at college to control 5th floor elevator. can i get some information to start with, i get confuse with...
Replies
14
Views
5,581
Back
Top Bottom