We've done this once. On our 2005 robot Sidewinder on our arm. We used a special valve. A 3 position, center closed valve. Something like an SY3340 SMC Valve.
http://www.smcusa.com/sections/first/SY3000valves.pdf
When you energize the coil on the valve the valve will extend the air cylinder, when you take away the power from the valve, the air cylinder with stop in mid-position. It's not going to be ACCURATE by no means, but it does allow for mid-stroke air cylinders. Of course if you energize the retract side of the valve, it starts to retract the air cylinder and will stop on the way down too.