Right a 5/2 valve means there are 5 ports and 2 position. The ports are usually numbered 1 - 5 but could be letter P R etc. 1 is the supply port where you connect up the air supply, 2 and 4 are the outlet ports which the valve directs the air to, 3 and 5 are the exhausts which allow the air from 2 and 4 to exhaust when the valve is sending air to the other of 2 and 4. There is also a smaller air port to the side (or at both sides) to connect the air pilot. There are two if the valve is double pilot and 1 if the valve is pilot/spring. How it works: When there is no pilot being supplied the air from port 1 is directed by the valve to port 4. If this is connected to a cylinder, the cylinder will stay retracted. When a pilot pressure is supplied the valve switches over so that the air from port 1 goes to port 2 and the cylinder shoots forward, the air from port 4 is exhausted out port 5.