New to PLC, elevator

Nuzzie

Member
Join Date
Oct 2011
Location
Napier
Posts
5
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 by my school. So I've been mucking around a bit and decided to try the old elevator problem, but am having some problems. I've got the most basic of basic functions working okay, but am having trouble implementing a request system.

Now, I'm not in any PLC class and have just been picking it up as I go along. I was hoping though, that you guys might be able to identify some of the key functions that I will need to use to get this going, and some instructions of how to make the best use of them (not insofar as the elevator is concerned but in general). I'm not interested in you solving this for me, but would like some guidance.

Attached is what I've written and would like to work off of.

Thanks very much,
Josh
 
I was hoping though, that you guys might be able to identify some of the key functions that I will need to use to get this going, and some instructions of how to make the best use of them (not insofar as the elevator is concerned but in general).
Josh,

1. Define the scope of the job: how many floors will this elevator travel? Can the elevator reverse direction in mid-travel, or must it continue to the highest called floor when going up, and to the lowest called floor when going down? Most elevators do not switch direction in mid-travel, to reduce wear-and-tear and also to prevent someone from being stranded and not serviced by the elevator.

2. I see your 3 call buttons for 3 floors, but what about the Floor Buttons inside the elevator? You will need those to input WHERE the elevator is supposed to go next, after taking on a passenger.

3. You may want to consider using subroutines to split up the different functions of the elevator logic. For example, as a minimum, you need routines to do the following:
1. Initialize variables, timers, and encoder location of elevator.
2. Catch Floor Requests (Note that these can come from the Corridor Call buttons, or the elevator car Floor Buttons.)
3. Do Next Request, or Wait
4. Close Door and Move
5. Track Car Movement
6. Stop and Open Door

4. You could simulate an encoder for the elevator position by using a Counter and Timer. Assign a time to travel from one floor to the next (10 seconds, maybe?), then set up the timer to trigger the counter (C5:1) to Count Up when going up, and Count Down when going down. It appears that you were starting something like this with your Rungs 000 to 002. You simply assigned an Elevator Position to N7:0. If you use the timer and counter, you will not have to asssign these values. They will be generated by the Counter. Then when C5:1.ACC (Counter 1 Accumulator value) = 20, you know the elevator is on the 2nd Floor, and can use a EQU comparison (C5:1.ACC = 20) instruction to turn on the 2nd Floor LS switch. TIP: instead of EQU, use a LIM, because real elevator encoders may have some error in the braking and not stop exactly on the floor, maybe off a count or two.
 
Last edited:
Haven't had any time to add anything yet, but hopefully will soon.

1. At the moment, I am limiting it to 3 floors. I do want it to be a system that you can easily add in another floor if need be. When I was messing around with it before I ended up posting this thread, I was writing things that would end up being a nightmare if another floor was to be implemented. I want the elevator to travel to the highest floor servicing requests in that direction along the way. Once it's reached the top floor it can then move down to service lower floors. If it's going down initially then the same deal. I don't want it to reverse direction.

2. I realise this is a huge gap, but as it stands and my level being what it is, I'm only wanting what I can physically simulate on the PLC. Since i only have six inputs that only leaves 3 for the limit switches and 3 for call buttons. I was building a little model elevator to play with, but wasn't happy with it so pulled it apart and am starting again. So that's another reason I want to keep it within the 1000's limits.

3. That seems like a good idea, I've copied that.

4. That does seem better. I like that you would then be able to easily and logically tell when it's between floors. It would then be easy to add in a deceleration function as well.

Thanks very much Lancie
 
I realise this is a huge gap, but as it stands and my level being what it is, I'm only wanting what I can physically simulate on the PLC.
Yes, I understand that. But do not forget about "virtual" inputs. Because you are simulating an elevator (close to imagineering), you can also simulate inputs by using internal PLC bits as virtual inputs. For example, all of the B3 bits in the MicroLogix can be used as virtual inputs, but are only easily turned on/off inside the PLC. That may not be a bad option, because much of your elevator simulator will be done with a computer working with your PLC.

Actually there are operator panels (Automation Direct, Red Lion, and others) that connect to PLC comm ports and can switch internal PLC bits, so with that setup you can actually use B3 bits as real input switches.
 
I've got the most basic of basic functions working okay, but am having trouble implementing a request system.
Here is Subroutine 4- CATCH FLOOR REQUESTS, for the LogixPro Elevator Simulator Student Exercise #4. You may need to zoom out to 150% in order to read the text.
 
If you just want to use switches to simulate you could have 7 with 3 inputs 7 switches 1=1 2=2 3=3 4=1&2 5=2&3 6=1&3 7=1,2&3
 
Since I only have six inputs, that only leaves 3 for the limit switches and 3 for call buttons.
Josh,

You can use Bruce's method to increase the number of "things" you can input with 6 switches. Think Binary: with SIX binary 1 or 0, how many separate events can you tell the PLC about? 111111 Binary = 63 Decimal. 63 events, imagine that!

Do not forget about using the timer and counter for an elevator position encoder. If you set that up internally, your elevator position will be known to the PLC WITHOUT USING any external limit switches. You can then create internal "virtual" simulated limit switches based on the encoder (Up-Down Counter) values. Now that leaves you 6 inputs available - 3 for Corridor Call pushbuttons and 3 for Elevator Car Floor Requests! Before we are done, we will have that MicroLogix 1000 also playing "Jingle Bells".
 
Josh,

If you have 15 spare relays in your junk bin, you could wire up external relay circuits controlled by 15 switches or pushbuttons. This will allow 15 pushbutton inputs into your 6-input MicroLogix1000. The limit would be 63 switch inputs, but that would also require 63 relays (not a very practical circuit using relays).

Attached are a switch and relay encoder wiring diagram, and PLC rung logic to decode the inputs back to 15 switch inputs. You need 10 two-pole relays, 4 three-pole relays, and 1 four-pole relay. Of course, two 2-pole relays can be used in place of the 3 & 4-pole relays.

This would be a good sale item for Mark (Genius in Training) to create as a circuit board with an encoder chip and 15 terminal blocks, to wire to his trainer PLCs to provide more inputs.
 
Last edited:
As far as inputs go, I'll see how it goes once once I've got this position encoding up. This is going to seem like a silly question but one that I need to ask. I'm not sure how to use the timer to trigger the counters. When you first said I was just thinking about the CTU and that a MOV from T4:1.ACC to C5:1.ACC would work but that aint going to fly for the CTD. How do I make the timer generate a false to true transition everytime T4:1.ACC changes value so the counter can be triggered properly?

And Lancie, I'm only just starting in the electrical trade doing a Pre-apprenticeship course at my local polytech, having never done this anything electrical before, so I don't really have a junk bin let alone 15 relays in it. ;) Thanks for that though it looks very neat.

Thanks very much guys
 
Last edited:
I'm not sure how to use the timer to trigger the counters. When you first said I was just thinking about the CTU and that a MOV from T4:1.ACC to C5:1.ACC would work but that aint going to fly for the CTD. How do I make the timer generate a false to true transition everytime T4:1.ACC changes value so the counter can be triggered properly?
Josh, Sorry, I was getting too far ahead. Back to basics. Here is a common way that a self-resetting timer is created in RSLogix (using the Timer Done bit to reset the timer). I wrote and tested this using the LogixPro simulator.

Iant, there are no sheep within 100 miles of here. I will have to leave the sheep for our down-under friends. (y)

ELEVATOR SIMULATED ENCODER.jpg
 
Last edited:
Ohhhhh,I've used selfresetting timers before but it never ocurred to me to use it that way. Thanks, that makes so much sense.

And yes the local sheep are definitely pleased that PLC's have diverted my attention. ;)
 
Josh, If you can master this as a pre - apprenticeship - If I could, I would employ you now - keep going -
no my underarm doesn't stink (Trevor Chappel - Cricket if your too young)
 
Ohhhhh,I've used self-resetting timers before, but it never ocurred to me to use it that way. Thanks, that makes so much sense.
Another advantage is that you can control how fast your elevator travels by changing the T4:0.PRE value. To slow it down to half-speed for trouble-shooting your program, just change the Preset to 2 seconds.
 

Similar Topics

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...
Replies
4
Views
2,880
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,682
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,388
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,336
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,588
Back
Top Bottom