Many ball valves have mechanical stops built in to the valve to act as a backup if the stops in the gear or actuator do not work, or are not set correctly. Depending on the specific valve design, there are different ways of bypassing the integral stops (with a stepped key for example). When performing field service, it is often useful to know how to bypass any integral stops so you have a way of correctly setting the stops on an actuator or gear box. By allowing the ball to over-travel, you can drive it forward, and then back until you find the sweet spot where the valve will seal. By definition then, this will be the fully closed position.
Here is my method of finding fully closed and fully open positions:
NB. CW = Clockwise (to close), CCW = Counter Clockwise (to open)
1 Use a stepped key, or other means to bypass any integral stops on the valve.
2 Rotate the valve to the position where you expect the valve to be fully closed.
3 Check for leakage past the seat (or seats if pressurizing the body cavity).
4 Move the ball CW while monitoring seat leakage. If the leakage increases, reverse direction. If leakage decreases, continue moving CW until leakage stops or is below acceptance criteria.
5 Set the corresponding stop in the actuator/gear box.
6 Remove actuator/gear box and mark the position of the key on the mounting plate of the valve (MARK A). Do not stroke the actuator/gear box while off the valve.
7 Measure 90-deg off of MARK A (fully closed) and make a mark for fully open (MARK B).
8 Install the actuator/gear box back on the valve, and remove the top of the actuator/gear box (weather cover, position indicator, any other accessory) to expose the valve stem.
9 Make a mark on the top of the valve stem/key (MARK C) and a corresponding mark on the top of the actuator/gear box (MARK D). A continuous straight line works best for me. At this time, MARKS A, C, and D should all be in alignment, but MARK A may not be visible with the actuator/gear box installed.
10 Measure 90-deg off of MARK D (fully closed) and, on the top of the actuator/gear box, make a mark for fully open (MARK E).
11 Rotate the valve CCW and align MARK C with MARK E.
12 Remove the actuator/gear box. Again, do not stroke the actuator/gear box while off the valve.
13 Using a machinist's square or other suitable straight-edge, visually compare the alignment between MARK C on the top of the stem, and MARK B on the mounting plate. Most of the time, these two lines will not align due to lash-up of the gearing in the actuator/gear box. As accurately as possible, measure the angular difference between MARKS C and B.
14 Install the actuator/gear box back on the valve. Add or subtract your measured angle from MARK B, and on the top of the actuator/gear box, make new MARK F. Move valve CW or CCW depending on the measured angle, so MARK C now lines up with MARK F.
15 Repeat steps 12-14 until you have MARK C in alignment with MARK B. One iteration is usually enough.
16 Set the open-position stop on the actuator/gear box.
17 The open and closed positions are now set.
The above technique is used when you do not have visual access down the valve bore. If you do, then the above is not necessary.
Technically, this would still work with a twisted valve stem, but if you suspect stem damage, the only safe option is to remove the valve and repair it before continuing its use.