pneumatics programming help

We’ve just got our robots done, and we’ve been able to get some sensors and all that working. WE now want to get our lift to work, and we’ve got some pneumatics kits. The problem is we’re having a though time trying to program it into our controller. We may be programming wrong. But we put everything in a while loop and and we tell it to get digital input from (16,0) wait 1,000 ms, get digital input (16,1) wait 1,000 ms. and that end the while loop. What do we need to add or what are we doing wrong?