It's imperative that you accomplish this task while maintaining compatibility with the current program
structure. To this end, all 6 subroutines will be utilized, and therefore each must first be programmed with
the appropriate logic to accomplish this initial task.
U3, Initialization Subroutine:
Each time you test your program, you should first reset the simulation using the selection in the
simulations menu. This will ensure that elevator is back at the first floor and all the hardware is in it's initia
state. When you place your program into the run mode, U3 will be executed, and it is here where you
should ensure that all flags etc are in their correct initial state. In particular, the "DoNext or Wait" flag
should be latched true which will ensure that subroutine U7 (Next Request or Wait) will be actively
scanned at this time.
U4, Catch Floor Requests:
This subroutine is where the logic that will detect, and react to the closure of the 4th floor wall switch
should be placed. The lamp for this switch should be latched on, but this should only occur if the elevator
is not already at the 4th floor. In later exercises, additional logic will be added for the other switches that
can initiate a change in the elevator's location.
U5, Next Request or Wait:
This subroutine is where the decision to move the elevator will be made. The built-in lamps of the wall
mounted switches may be used as a flag to initiate a move of the elevator car. For now it will only be
necessary to monitor flag (lamp) O:2/11 and set the "Close and Go" flag in response. This will in-turn
invoke the "Close Door and Move" subroutine (U7) which will take care of getting the elevator underway.
U6, Close Door and Move:
In this subroutine, locate the logic to close the door, and then energize the motor to get the elevator
underway. The desired direction is obvious in this case, but later you will most certainly require flags to
indicate which direction to proceed in. Before exiting this subroutine make sure that both the "DoNext or
Wait" and the "Close and Go" flags are cleared (unlatched), and set the "Car is Moving" flag so that
positioning of the car will be controlled.
U7, Track Car Movement:
Once the car is moving, this subroutine takes control, and is responsible for deciding where to stop the
car. In this exercise the direction and destination are fixed (up, 4th floor), so you will only be required to
determine when the car has reached the fourth floor. Once there, the car's location should be flagged by
updating the appropriate floor indicator lamps, and the "Stop and Open" flag should be set (latched)
which will in-turn invoke the "Stop and Open Door" subroutine. The car's vertical position can be
determined by reading the motor's shaft encoder (I:5), and equating this reading to those you have
gathered for the individual floors. It may take a little trial and error to initially gather these values, but the
task can be made easier if you temporarily slow LogixPro's scan rate down somewhat.
U8, Stop and Open Door:
The first thing to do here is to stop the motor and reset (unlatch) the "Car is Moving" flag. You should also
Page 3 of 6The LogixPro Elevator Simulation
5/2/2004http://www.thelearningpit.com/lp/doc/elv/vator.html