need your help marcia, could you make the program run?
Marcia's Elev[1] program was incomplete. It was only the LogixPro Elevator Exercise 2 Student Problem, where the elevator is only programmed to go to the 4th floor. That is all it does.
In order to add the full functions, much more logic has to be added to Subroutine 4. For example, there is no logic to determine the Lowest Floor Requested, or the Highest Floor Requested. Without those 2 parameters, the elevator will never work correctly. Also, the Car Request buttons are not set up properly. Car Requests 1 and 4 are latched on (correct), other floors 2 and 3 are not.
Marcia has got Sub 5 and 7 swapped and mixed up, so that the functions do not work properly. In Sub 5 (supposed to be 7), the car movement is not tracked correctly. The best method is to use LIM instructions for all 4 floors, so that the stopping point can be a range, not a single encoder value. The reason is that the elevator can not physically stop immediately when the floor location is sensed. The logic must allow for a short stopping time (a LIM range or 2 or 3 encoder counts).
It is best to follow the logic outline given in the LogixPro problem, and not go off on a tangent. If you think about the logical steps that must be done in order, then before the elevator can move (Sub 7 Track Car Movement), you must first do Sub 5 (Do Next Request, or Wait). It is possible to come up with a different subroutine arrangement that will work, but at the student level this is not recommended. Stick with the logic arrangement given in the problem, and it will be easier for others to help you with it.