PDA

View Full Version : Model Elevator Controls Question



M. Wilson
07-30-2008, 08:07 AM
Hello Everybody,
I am putting together a program for model elevator controls.· I wrote the basic stamp program.· Each part works on its own, but when I go to put them together they will not work.· On page 2 of attachments, you will see the DHB button.· When you push this button and the door zone switch is made up, then (IN3) and (IN4) go high causing P-15 to go high, turning on (DO)LED.· If the elevator is at the top floor and the DHB is pressed, then (IN4) goes high and P-14 goes high, causing LED to turn on.· This part works separately from the second part.· The second part has the elevator at the top floor and if you push the UHB button and DZ-2 is made up,·(IN5) will go high causing·P-15 to go high, turing on DO(LED).· If the elevator is at the first floor, and you push the UHB button,·(IN5) will go high and P-13 will go high, lighting up the LED.··When I combine the two together,·they won't work.· But separately, they work.··Can somebody please take a look and see if you can·help.· Thanks!
Mike

kelvin james
07-30-2008, 02:31 PM
Looking at the program, i am sure an endif is required before the second if - elseif conditional code.

M. Wilson
07-31-2008, 05:26 AM
Thanks for the help. Works OK.

Mike