Thank you again. Removing the code in the false case fixed the problem.
I have another question, though. Is there any way to use a read switch to stop the cylinder in a middle position (someplace between fully open and fully closed)? The manual says its not recommended, but has anyone got it to work? If so, do you have any code examples you can share?
