I designed this program about one year ago, when I graduated from the high school. Note that the code has been simulated but not tested on an elevator model.
The equipment would feature four levels, automatic doors and leveling speed.
The PLC detects the position of the elevator through proximity and dump switches.
The count proximity (C) reads a strip of magnets fixed on the rails at the middle floors. Due to the count switch the PLC activates the right direction contactor and reduces the speed of the elevator once the car is near the requested floor.
The dump switches are mounted in the shaft at the bottom and top floors. They reduce the motor speed when the car comes close to an extrem floor.
Once the PLC is activated, it doesn't know the position of the elevator, unless it is at the bottom or top floor. In this condition any request would trigger both direction instructions, so the program would fail. Due to a small delay on the up instruction (RS), the other one prevails.
The leval proximity switch (F) stops the elevator when the car is exatly on the requested floor.
The feedback switches of the direction contactors are supposed to reset the request if the car does not start moving within a certain time.
The exterior requests delay is set by the RCE timer.
In this video you can see the animated circuit schematic of a relay logic elevator.