Follow the scan path from the pushbutton input to the mode state, through the dwell timer, and finally to the motor output. The failure occurs before the output rungs: opening and shutting are controlled in both Rung 000/001 and Rung 007/008, while the two modes can become true together. Once both states compete during a scan, rung order—not the requested motion—can determine the result.
Where Does the Door Sequence Break?
The required sequence has three distinct phases: travel, end-of-travel dwell, and reverse travel. During normal opening, the opening state drives the motor until the fully-open sensor changes state. That transition must stop upward motion and start an independent 5-second dwell. Only the timer completion should request closing.
The reversal fault begins when the open pushbutton is pressed during shutting. If the shutting state remains true while the opening state is also set, the program has conflicting commands. The timer may not count because its enabling conditions disappear within the scan, or the closing command may remain energized by logic elsewhere. A PLC timer accumulates only while its rung remains continuously true; a false scan resets a non-retentive dwell timer.
| Observed condition | Likely logic condition | Check first |
|---|---|---|
| Door closes immediately after an open request | Shut mode remains active or is rewritten later | Monitor both mode bits through one scan |
| Timer never accumulates | Timer rung loses continuity | Watch the timer enable condition and open-limit state |
| Both motor commands appear possible | No mutual interlock | Inspect every rung writing the modes or outputs |
| Behavior changes with rung placement | Multiple rungs write related state | Consolidate mode decisions before output mapping |
Which Ladder Structure Best Fits the Sequence?
Two structures can implement the sequence, but only one directly removes the current conflict.
| Approach | Mode decisions | Output decisions | Diagnostic clarity | Recommendation |
|---|---|---|---|---|
| Distributed control | Made on Rung 000/001 and again on Rung 007/008
|
Mixed with sequence logic | Poor; a later rung can override an earlier result | Do not retain |
| Centralized state control | All start, reversal, limit, and timer conditions handled on Rung 000/001
|
Rung 007/008 only map valid modes to motors |
Good; each bit has a single functional role | Use this structure |
Centralize the mode logic, make open and shut mutually exclusive, and leave the final rungs as simple output mappings:
XIC open-mode OTE Motor-up
XIC Shut-mod OTE motor-down
This arrangement separates the request path from the actuator path. Pushbuttons, limit sensors, and the dwell timer decide the state first. The output rungs then translate that state into one motor command.
How Should the Modes Be Interlocked?
The legal mode states are open only, shut only, or neither. Both true is illegal. Apply the interlock at the mode logic and again at the motor-command logic so one programming error cannot request both directions.
open-mode |
Shut-mod |
Meaning | Required output |
|---|---|---|---|
| 0 | 0 | Stopped or dwelling | Both motors off |
| 1 | 0 | Opening |
Motor-up only |
| 0 | 1 | Shutting |
motor-down only |
| 1 | 1 | Illegal conflict | Both motors off while diagnosing |
Each request must clear the opposite state as part of the same transition. An open request during shutting removes Shut-mod before enabling open-mode. A close request during opening removes open-mode before enabling Shut-mod. At the motor layer, add the opposite mode as a permissive exclusion if the simulator logic permits it.
Search the entire program for every output instruction that writes these four identifiers. A state or output written on multiple rungs is vulnerable to last-rung-wins behavior. Give each motor output one controlling rung, and make the mode transition logic the only place that determines direction.
How Should Pushbuttons and Limit Sensors Change Direction?
- When the open pushbutton is accepted, cancel
Shut-mod, cancel any close-after-dwell request, and establishopen-mode. - While opening, keep
Motor-upactive only while the fully-open sensor permits further travel. - When the close pushbutton is accepted during opening, cancel
open-modeand establishShut-mod. Do not route this manual reversal through the 5-second dwell unless that delay is intentionally required. - While shutting, keep
motor-downactive only while the closed-end sensor permits further travel. - When the open pushbutton is accepted during shutting, cancel
Shut-modand establishopen-mode.
Place travel-limit contacts as stop conditions, not only inside a momentary start branch. In particular, move the XIO L2-sensor condition on Rung 001 outside the start condition if L2-sensor is the limit that must terminate that direction. This makes the limit continuously authoritative after the pushbutton is released.
Confirm the physical meaning and polarity of L2-sensor in the simulator before moving the contact. An XIO instruction is true when its addressed bit is false. Watch the sensor bit at both end positions and choose the contact form that makes travel permissive away from the limit and false at the stopping position.
How Should the Five-Second Dwell Work?
The timer must describe the dwell state, not general open mode. Start it only when the door has reached the fully-open position, upward motion has stopped, and no manual command has selected another action. Set its preset to the simulator representation of 5 seconds; use the timer’s displayed time base rather than guessing a raw preset value.
| Sequence point | Timer rung | Open mode | Shut mode |
|---|---|---|---|
| Door traveling open | False | True | False |
| Fully open, dwell active | True and accumulating | False or motion-inhibited | False |
| Five seconds complete | Done transition | False | True |
| Closing begins | False/reset for next cycle | False | True |
Do not let the timer completion and open request fight over the modes. A fresh open request while already at the open limit may restart the dwell, remain stopped, or be ignored; select one behavior explicitly. The essential rule is that timer completion can request closing only if no newer manual request has changed the sequence.
How Do You Verify the Repair Scan by Scan?
- Go online with the simulation and monitor the open pushbutton, close pushbutton, both end sensors,
open-mode,Shut-mod, timer enable, timer accumulator, timer done state,Motor-up, andmotor-down. - Start from mid-travel with both modes off. Press open and verify that only
open-modeandMotor-upbecome true. - Press close while opening. Verify that
open-modedrops beforeShut-modandmotor-downtake control. - Press open while shutting. Verify the reverse transition and confirm that the dwell timer remains reset because the door is not fully open.
- Allow the door to reach the fully-open sensor. Verify that
Motor-upturns off, neither direction runs during the dwell, and the timer accumulates continuously for 5 seconds. - At timer completion, verify that only
Shut-modandmotor-downbecome true. - Drive to each limit and verify that its stop condition removes the corresponding motor command even after the initiating pushbutton has been released.
- Force the logic through rapid alternating button presses and verify that
open-modeandShut-mod, and likewise the two motor outputs, are never true together.
FAQ
What happens if open-mode and Shut-mod are both true?
The program has an illegal state, and rung order can decide which command survives. Interlock the modes so selecting either direction clears the opposite mode.
What happens if the timer rung goes false for one scan?
A non-retentive dwell timer resets and cannot reach its done state. Monitor its enabling conditions while the door remains at the fully-open sensor.
What happens if L2-sensor stays inside the start branch?
The sensor may affect only the start path instead of continuously stopping motion. Place XIO L2-sensor as a stop condition on Rung 001 after confirming the sensor polarity.
What happens if Motor-up is controlled on multiple rungs?
A later output instruction can overwrite the earlier rung result during the same scan. Use one output rung: XIC open-mode OTE Motor-up.
What happens if close is pressed while the door is opening?
Cancel open-mode, establish Shut-mod, and verify that Motor-up turns off before motor-down turns on.