This program controls a strip of ten lights by two pairs of photocells at bottom and top stairs. A count signal prevents the lights from getting dark when someone is walking along the stair.
The program has been tested with a plc simulator, but I think it should work with other applications, such as LDmicro http://cq.cx/ladder.pl