If you want to position a pneumatic cylinder in more than one position, you will need to use more than one solenoid in your system. The magnetic switches aren't useful to sense a cylinder midway if it is traveling quickly. Linked below is a white paper on how to make a multi-positioning pneumatic cylinder.
http://www.chiefdelphi.com/forums/pa...le&paperid=261 - how to make a multi position pneumatic cylinder