Garage door help

GRNDPNDR

Member
Join Date
Sep 2012
Location
London
Posts
8
So one of our assignments in class is a garage door system, more specifically the exact same one as in LogixPro, but I can't figure that program out.

I've done the logic in RSLogix 5000 and my garage door works perfectly.

We have a "Challenge" question that has eluded me and so I've come for help. There is no mark for this and the assignment has been handed in, but at this point I really just want to know how to do this.

When the door is in motion up or down, pressing the opposite button (pressing down while it's moving up) will stop the door, pressing the button again will change the direction of the door.

What am I missing with this? and do I need some other than XIO/XIC, OTL/OTU ??
 
At first glance, I'd say you need to look at using the ONS/OSR (One shot) command (not sure which one it is in Logix5k). This will cause the logic to only be true for 1 scan, which should let you use the buttons for the stop/change direction of the door.
 
How do I post what I have done? I have an ACD file and no way to take a screenshot of it. Since I can't open it on my laptop I'm not sure how to post my current ladder logic for people to view.

I'll happily post the ACD file if anyone can use it.
 
How do I post what I have done? I have an ACD file and no way to take a screenshot of it. Since I can't open it on my laptop I'm not sure how to post my current ladder logic for people to view.

I'll happily post the ACD file if anyone can use it.
zip it first then add it as an attachment to a post.
 
Caution - this may require re-thinking your original program.

Assume you have a one-shot of the pushbutton inputs.

You have three states of the door, stopped, moving upward or moving downward. Now define, for each of these states, how they respond to the various inputs: up limit, down limit, obstruction, 'up pushbutton', 'down pushbutton'.

You will arrive, if carefully done, at a complete 'state diagram' of the system. This will help you to think about the program in whatever programming language you wish.
 
I concur with Bernie. This is perfect for a "state engine" type of program, but I would pad that out with a dwell time for each of the stopped states to minimize short cycling.

Your door would have the following obvious states:
0) reset position unknown?
1) fully opened stopped
2) travelling downward
3) fully closed
4) travelling upward
5) stopped during travel (dwell)
and perhaps:
6) Fault! overtravel
7) Fault! Motor fault
8) something I forgot or want to add later...
etc.
These states are mutually exclusive, only one of them can be active during any scan.

Draw those out in a circular pattern of blocks like numbers on a dial clock, then draw lines between the states as you need to allow them to occur.

On those lines, write down the conditions for the transition. How would you allow the door to go from one state to the next?
Example1: To go from Fully opened to travelling downward I need the E-stop monitor and the rising edge of PB1...
Example2: To go from "reset, unknown position", if LS1 is on and LS2 is off then transition to "fully closed", if LS1 is off and LS2 is on then transition to "fully opened".

This chart can be studied and perfected (use pencil) and then directly translated into solid ladder logic. I can find a link to an example using my preferred style for the structure and data types, just ask.

The logic just uses the transition instructions in series with commands to clear a group of bits and then latches the bit for the presently selected state. One of those bits are reserved (the most significant bit) as a marker to restrict multiple state changes per scan of the transition or stepping code. This allows the logic controlling the states to be compact and orderly, only one rung per state covering them in order.

After that logic, the outputs are mapped on OTE rungs in series with any mode control bits to the left of them, and preceding those would be the Step Bit examine instructions in parallel.

So it is obvious that, for example, motor X1 coil is turned on when in states 2 and 4 with simple ladder code, and a search or cross reference for the step bit turns up the OTL showing the transition that got you to that step, and the other state transition rungs around it along with your paper chart, or searching the results for the XIC of that bit will help you find all the states that it can lead to.

It is also obvious when looking at the state changing section of the code, that if there are three branches, then there should be three lines on the paper chart pointing to that step, and those steps should be easy to identify looking at the addresses of straightforward bit examine logic.
 
Last edited:
Some great advice in your replies so far. I'm not sure how you did your original software (i.e. whether you had to keep your finger on the the button to open the door). But you need to think about 'setting' a bit that will Open the door.

The bit will be reset by the door reaching it's destination (fully open - perhaps from a proxy sensor).

The bit will also be reset by someone pressing the Down button IF the door opening bit is SET.

I think you just need a pen, a piece of paper and a quiet room for half an hour and you'll have your eureka moment.

;-)
 
Wow, there are some good replies here. I'm still not too great at sitting down and figuring out how things should translate to ladder logic.

I don't think we were supposed to re-write the entire thing. bit it wouldn't hurt using techniques that are a bit more advanced than we have learned right now (state engine??)

I think he just wanted us to use a halt or something.

At any rate here is my ACD file, this actually contains all of our work in the one file.

The routine for this garage door change is under "Lab2 -> Challenge" if im not mistaken.
 
In regards to a state engine driven by a group of bits. I've seen a real life application very similar to a up&down garage door expressed as a skip hoist. It carried rock from a weigh scale up to a conveyor at the top of a tower processor.

Your mentioning the bits driving a Single rung and to have them clear and set at the end of cycle is not to be overlooked. The programmer I followed had used many bits spread over two integers. He had not followed the Single rung idea nor did he always clear the bits, so sometimes more than one bit could be on.

Admittedly the hoist was very complex, it was monitored by both an absolution position sensor and limit switches. It was VFD driven and had different speeds depending on whether the hoist was traveling up or down. And weight was a factor so the VFD had to be monitored for over-current.

The programmer had not sketched out his sequence very well before writing the ladder so the bits didn't sequence one after the next. He'd had to go back through and add more steps and build the logic as he went.

When I had to troubleshoot it the upper limit switch had been knocked off the tracks and so the hoist had sailed past the dump position and wedged itself at the very top. The maintenance people lowered it back to the bottom with the manual controls on the VFD. They fixed the switch and then had me try to get the PLC to sequence from the beginning.

Except the programmer had not intended for anyone to manually operate his bits, he probably could have done it the day after finishing the job. But the convolution of ladder meant extreme trial and error was the only path to take. It was a great deal of fun having someone man the VFD controls ready to stop the hoist because most trial runs would start off with the hoist zooming to the top where I was sure the ladder logic would ignore the switch and wedge itself again. Much yelling over the radio was heard from the top of the tower where the men saw the hoist perform completely abnormally from their daily experiences.

So the moral of the story was a Single rung of code per bit pattern was Mandatory, also clearing the bits before moving to the next stage. Also a resetting function, put hoist here push button and pick up from the beginning.

I started designing similar applications of sequenced logic to follow a integer, instead of a bit or pattern. I'd leave a gap between used values, maybe only using odd values to start with. That way steps could be added down the road.

Also in more advanced languages than ladder it is useful to Enumerate some constant values with the variable names being descriptions of the steps. In those cases code can be written that doesn't hard code a integer value as a given step in the sequence. Adding a new Enumerated value in the middle of the sequence is taken care of by the code compiler.

And Most Importantly - Leave Documentation everywhere. (and put Dates on it)
 
So one of our assignments in class is a garage door system, more specifically the exact same one as in LogixPro, but I can't figure that program out.
Were you able to figure out the LogixPro version? I have 3 different LogixPro versions of the Door Opener Student Exercise 4.

Version 1: Uses flags as directed, with no one-shot bits, requires 7 rungs.
Version 2: Uses flags and two one-shot bits, requres 7 rungs.
Version 3: Uses state-machine logic, 3 states, 4 transitions, reguires 13 rungs.

The key to all these versions is defining the Open and Close pushbuttons to perform 2 functions - the normal Open or Close, and also a Stop if Going Up, and a Stop if Going Down.

If you search this site with the site search button at the top of your screen (not the Google search) you will find many posts about this student exercise.
 
Last edited:

Similar Topics

Hi Everyone. Could you please help me out with this project. I have three tests and this project due within 5 days. I have no idea where to start...
Replies
9
Views
3,937
I need a program for a garage door opener that opens and closes in 5 seconds.Also that has a pm light that comes on after 5 cycles of the door.
Replies
33
Views
8,367
Hello, I know everyone's thinking, why an automated garage door? Well, because i can. I have a box with an AB ML1400 Series B controller and an...
Replies
7
Views
2,061
Hello, im a 1st timer entry level plc student,I have a project where I am trying to edit my LL. Ive bn given a gagrage door problem, here are...
Replies
2
Views
2,612
I have some gate controllers that I want to give the owner a way to open them out at the gate. I bought two universal garage door remotes @...
Replies
8
Views
6,164
Back
Top Bottom