The escalator is stationary until someone approaches. When someone passes by the sensor, the motor starts to operate, and stop 1 minute after the last person passed by.
Well, someone, that is a good description of the logic. You need to add a list of inputs and outputs, and then your programming can begin. Do you have a question?