Ladder programming sample code for Passenger lift / elevator



I need a code in PLC Ladder for 16 floor passenger elevator. The code should be able to move the Elevator up / down based on selections made on an HMI touch screen. Suppose the elevator is currently on floor 9 ( as is stored in a word register R0) and the calls registered are for floors 0, 3, 6,7, 11, 12 and 15 with 15 as top floor and 0 as ground floor. The calls are stored in Bits B0 to B15. In this case, the following bits are active Hi: B0, B3, B6, B7, B11, B12 and B15. So the first thing is to decide which direction the lift has to move (by using the Collective and selective principals)

Can someone help me in this?
Thanks in advance.


Hey. This is a very simple code. You have a button to call the Elevator. You’ve also got sensors on the Elevator position. For each button you have to make a trigger that is cocked when you press the button and turns off when you press any other button. XOR logical operation.Also you need triggery for sensors floors. These triggers will be activated at the time of arrival of the lift to the desired floor.
And now you need two comparison operations. You compare the word in the PLC to the floor number buttons and the word in the PLC to the cab sensor. If the floor number on the button is less than the Elevator floor number-then the Elevator will go down. If the floor number on the button is greater than the Elevator floor number - the Elevator will go up.