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?