Automatic stair lights

This ladder logic program can drive an automatic stair lights system via PLC. It consists of a strip of lights fixed along a stair and controlled by photocells. When someone crosses the stair the lights will work with a sequence depending on the walking direction. At each extremity of the flight there are two photocells, distant few centimeters each other: they will put out a positive or negative count signal, depending on the activation sequence. Due to the count signal the lights will get dark when no one is walking on the stair.

Lights from L1 to L10 are turned on and off by the timers from T1 to T10, through the instructions K1 and K4.  Timers from T1A to T10A perform the sequence (on and off) from L10 to L1. When someone enters the ramp trough S1-S2, the instructions RS1, R1, TC1, CTU will be activated. By exiting the ramp through S2-S1, the instructions RS2, R2, TC2, CTD will be activated. The count is performed by the merkers (also called “relays”) from 1 to 5. It increases due to the instruction CTU and decreases due to the instruction CTD.

I tested the program with a simulation software. Since a PLC is pretty expensive, you may use a compiler which converts ladder logic into PIC microcontroller code.

Ladder diagram (pdf)

Lascia un commento

Il tuo indirizzo email non sarà pubblicato.