door code help

ELarsen

Member
Join Date
Dec 2002
Location
Gardena, CA
Posts
35
i am going to try and post the code i have for the door simulation.
i just cant figure out how to use the open and close buttons to stop the door without sending the door in the other direction. i am supposed to be able to use a binary or a Latch/Unlatch. This particular part is exercise #4. I honestly have spent several hours trying and need a kick start, I dont want the answer, just what should i be doing......(attachment)by the way, thanks in advance.

ladder.jpg
 
I aint no expert BUT

Instead of I:1/0 and I:1/1 being used to start the motor sequence why not use them to setup a flip flop?

Pushbutton I:1/0 once and it sets B3:0, push a second time and it unlatches B3:0

Same goes for I:1/1.

Use the B3 bits to start motor up or down, you would eliminate the use of the Output XIC to latch the circuit because the bit would stay latched.

Do a search on flip flop and it may show you what you need
 
Last edited:
If I understand your problem well

you need to open and closed the dood with 3 buttons, and 2 limit SW
useing Set & Reset command. since you dont want direct answer
I will try to explain.

You shuold set the UP output with I1/0 a same for DOWN output. keep your interlocks in line.
Stop button will reset UP output & DOWN output.
The LSs will reset the UP&DOWN bits according to thire direction.
It Should look like that.


UP-LS UP-output UP-output
---{/)------( )-------{R)--



I hope you understand me if not Iam sorry.
any how its nice someone want answer not solution.

All The Best
 
ELarsen:

Since you don't want the solution (very commendable, BTW), I'll just walk you through an analysis of what's going wrong, and let you come up with the fix.

The problem you are having, just to paraphrase, is that when the Door is moving UP, you want the CLOSE_PB to act like the STOP_PB. Similarly, when moving DOWN, OPEN_PB should stop the door. Instead, what you are seeing is that the door reverses directions.

First let's look at the OPEN_PB, and how it affects the code.

If MTR_DOWN is running, everything is hunky-dory, like so

OPEN_PB UP_LS MTR_DOWN STOP_PB CLOSE_PB MTR_UP
----| |----+----| |--------|/|--------| |--------|/|--------( )
|
MTR_UP |
----| |----+

CLOSE_PB DOWN_LS MTR_UP STOP_PB OPEN_PB MTR_DOWN
----| |----+----|/|--------|/|--------| |--------|/|--------( )
|
MTR_DOWN |
----| |----+




===========

When OPEN_PB is pressed, on the first scan, because MTR_DOWN is running, the first rung won't go true...

OPEN_PB UP_LS MTR_DOWN STOP_PB CLOSE_PB MTR_UP
----| |----+----| |--------|/|--------| |--------|/|--------( )
|
MTR_UP |
----| |----+



...and on second rung, the motor will drop out.
 
CLOSE_PB DOWN_LS MTR_UP STOP_PB OPEN_PB MTR_DOWN
----| |----+----|/|--------|/|--------| |--------|/|--------( )
|
MTR_DOWN |
----| |----+



So far, so good. Both motors are stopped, just like they should be.
============

Where you get into trouble is that on the SECOND scan after OPEN_PB is pressed, now MTR_DOWN is no longer running. Since PBs are usually active for longer than a PLC scan (it's hard to hold down a button for only 10 msec), and since MTR_DOWN is off, from last scan, MTR_UP starts up:

OPEN_PB UP_LS MTR_DOWN STOP_PB CLOSE_PB MTR_UP
----| |----+----| |--------|/|--------| |--------|/|--------( )
|
MTR_UP |
----| |----+

CLOSE_PB DOWN_LS MTR_UP STOP_PB OPEN_PB MTR_DOWN
----| |----+----|/|--------|/|--------| |--------|/|--------( )
|
MTR_DOWN |
----| |----+



Gee, if only OPEN_PB were on for only one scan.....



Now let's look at CLOSE_PB when the door is going up.

Initially, everything is running fine...


OPEN_PB UP_LS MTR_DOWN STOP_PB CLOSE_PB MTR_UP
----| |----+----| |--------|/|--------| |--------|/|--------( )
|
MTR_UP |
----| |----+


CLOSE_PB DOWN_LS MTR_UP STOP_PB OPEN_PB MTR_DOWN
----| |----+----|/|--------|/|--------| |--------|/|--------( )
|
MTR_DOWN |
----| |----+




=======

Then when the button is pressed, MTR_UP drops out....


OPEN_PB UP_LS MTR_DOWN STOP_PB CLOSE_PB MTR_UP
----| |----+----| |--------|/|--------| |--------|/|--------( )
|
MTR_UP |
----| |----+



...but since MTR_UP dropped of on that last rung, there is nothing to prevent MTR_DWON from starting up.

CLOSE_PB DOWN_LS MTR_UP STOP_PB OPEN_PB MTR_DOWN
----| |----+----|/|--------|/|--------| |--------|/|--------( )
|
MTR_DOWN |
----| |----+



So a one-shot alone won't fix it.
We need to know that, even though the button was pressed, the motor logic should ignore the command. The -|/|- UP_MTR is the right idea, but it needs to be incorporated in the COMMAND, not (just) the motor starter rung.



So there you have it.
Do as Ron Doran says, and remove the -| |- PB's from each of the two rungs. Replace each with an internal bit that is active:
  • when a button is pressed, and
  • only when the opposite motor is not running, and
  • only for one scan.

Does this make sense to you?
 
Last edited:
I could post an "answer" but seeing as how you don't want one... a few comments will have to do. 👨🏻‍🏫


About 10 years ago I was asked to do exactly this application for a small OEM. Yes these things do happen in real life.

After about 3 days of sodding around using the kind of ladder that you have posted ...I had a "Road to Damascus" experience.

The client kept adding to the specification, so what had started out as looking like a simple half dozen or so rungs had degenerated into a little monster. Everytime I tried to make an addition to the program I got tripped up with "unintended" consequences. I was getting to the point where I was starting to make a fool of myself.

Later that night I suddenly realised that there was a whole different way of approaching the problem, and within a few hours I had the whole thing up and running perfectly. What is more we went on to keep improving the product until we had a thermonuclear bomb proof high speed industrial door.

The change in approach was of course to use "state logic".

What you will need is to completely re-write the logic so that each rung represents a unique "state" of the door. ie

1. Stopped Closed
2 Opening.
3. Stopped Open
4. Closing.
5. Halted while closing.
6. Halted while opening
7. Faulted

These represent at least some of the more obvious states of the door. You may need to add more in real life.

The key is to now define all the events will cause transitions to the next required states.

There are a number of simple ways to program this kind of stuff in ladder. In fact I use it all the time these days, probably even when I don't really need to.

The big advantages are:

1. Only one rung is true at a time, so it is very easy to troubleshoot.

2. The format of all the rungs and program structure is very similar, so it makes for faster and easier program development. Its also a lot easier to document a Functional Description.

3. Messaging and fault monitoring are easy to incorporate.

4. I find it a lot easier to modify the program without getting into headscratching tangles.
 
Allen

I solved that problem like you.only one point to add, its very important where in the ladder the ORS came in.otherwise it will not
affect.Just point to think of.
I have also another solution but I will print it out when ELarsen
let us do it.
 
Thanks for all the replies, this is where I have gotten to thus far. Currently the open PB stops the door when closing, but the close PB does not stop the opening sequence. I know I am closer but....I must admit I am bit confused when I watch the logic. I cant use a ONS instruction in Prologix. Another kick please, ha ha.

Ed

ladder.jpg
 
OSR is a one shot rising..means it activates on rising edge..same thing basically.

If I:1/1 is suppose to be a normmally open contact then when pushed it should stop the motor up sequence.

What I think you should do is put BOTH OSR rungs first in ladder before the rungs that activate the outputs.

The thing with one shots is they are only active for one scan so if you have the rung after an action that action may not happen.

PUT BOTH OSR rungs at top of ladder then the actions and try.
 
Ed

When you use OSR you need to do it in right order.
up and down buttons musr go through osr
Hint
pay attention to the order you need only 4 runks 0-3

I e-mail you the right answer it base on Omron Iam sure you will understand that.Open the file if you feel desperate.
Post it to the forum when you will be ready.
 
Success finally. Literally couldnt have done it without all the great assistance. Again thanks and as Arnold once said, "I'll be back". I am trying to learn more detailed programming. I have programmed presses and a few selected projects, but where I work now there is very very very little call for any programming. I have tired of not knowing so I will pursue some training on my own. I feel confident now that I have a great resource (thats all of you).
Take care,

Ed
 
Arikby...no offense meant because I am sure your intentions are good
BUT
This is not a competition..

You do not have to "BE THE BEST"
OR
Provide the most.

I am not a plc programmer, I am a wannabe. I offer advice on what I think may help. You are far ahead of me in ability but get too eager.

I appreciate your sharing your professional experience.
 
Ron


I know it is not a competition.I could post it before few weeks.
but I respect Ed and I waited for him.
This student problem is just brain exercise, in the real life I would not spend time for that I will put timer with out second thought.
When I wrote "any idea how to make it simpel?"it not came for show off,It came to share ideas for PLCs tricks.

I enjoy to help to this young student I wish forum like that was in my time.(tomorrow I will be just 42).I spend lot of time with my guys to teach theme.
I wish I could say I am Good certainly not the best.I am good but not good enough.I still have a lot to learn.
I not consider my self as PLC programmer even it part of my job.
You can be the best programmer but with out total understanding of all the automation system and all what involved( I mean kind of vision).you worthless. Im more system integrator then just programmer.
Ron I am an Israeli and "eager" is part of our nature’s I apologize
I hope you will accept that.
I know you are the Americans more restrained then as the Israeli’s.
My eager cause me lot of problems in US in the beginning of my way there.
I think you underestimate your self.I would say You are far ahead of me.trust me.

Ron
Thanks for your comment.

All the best

Arik
BTW
Thanks for joined my name to the poll.
 

Similar Topics

We have an aluminum extrusion oven with lid door on it. run by micro logic 1400 and panel view c600. the lid door will open/up and close/down by...
Replies
10
Views
2,631
I've noticed a strange behavior with certain rotary disconnects. We all know that, if installed correctly, the disconnect interlocks with the door...
Replies
6
Views
1,509
I have noticed that many HMI have a Nema rating of Mena 4/4X (indoor use only) Does anyone have any guesses as to what the constraints are that...
Replies
5
Views
1,835
Our system has S7 1516 F CPU. We have doors that have contactless safety doorcontact that is cat 4 ple rated. The sensor provides us with two...
Replies
7
Views
3,047
Was wondering what is everyone using for outdoor rated OIT/Panel View covers? OIT is mounted on a panel. Shade would be preferred as the panel is...
Replies
2
Views
1,218
Back
Top Bottom