The end-stop screws on your derailleur – also known as limit screws – prevent the derailleur from throwing the chain off either end of the cassette. This is a vital task: the end-stop prevents the chain from falling off both the largest sprocket into the gap between the cassette and the wheel, or the smallest sprocket so that it gets stuck between the cassette and the frame.
Either of these contingencies will damage your bike, cutting through the spokes where they join your rear hub or taking chunks out of your frame beside the cassette. The chain will get firmly wedged too, so the chances of you falling off and hurting yourself are quite high. Only the heads of the end-stops screws are visible, the shafts of the screws are hidden inside the body of the derailleur. The derailleur is designed so that, at either end of it, the tips of the end-stop screws come into contact with tabs moulded into the pivoting part of the derailleur. Screwing the end-stop screws further into the body of the derailleur means that the ends of the screws hit the tabs sooner, limiting the movement of the derailleur and preventing the derailleur from pushing the chain off either end of the cassette. If you set the end-stop screws too far in, the derailleur won’t be able to push the chain onto the largest or smallest sprockets.
It’s easy to get confused when adjusting your rear derailleur because sometimes the same symptom can have more than one cause. For example, if you are having difficulty shifting onto the smallest sprocket, the cause could be that the ’high’ end-stop screw, which controls how far out the derailleur can move, is screwed too far into the derailleur. However, too much tension in the rear derailleur cable can provoke the same response. For this reason, I find it easiest to adjust the end-stop screw when there is no tension in the rear derailleur cable. If you’re fitting a new cable, use these instructions to adjust the end-stop screws before you fit the new cable.
In cases where the cable is already fitted, release it from the cable stops on the frame so that it hangs loosely. To do this, first turn the pedals and change into the largest sprocket on your cassette. Stop pedalling, and shift as if changing into the smallest sprocket. The chain won’t be able to derail because you’re not pedalling, but the derailleur cable will become slack. Follow the outer casing back from the shifter, to where the outer casing joins the frame at the first cable stop, and pull the casing forward toward the front of the bike. Wiggle the cable out of the slot in the cable guide. This will give you enough cable slack to adjust the end-stop screws without getting confused by cable tension issues.
Once you’ve finished adjusting the end-stop screws, replace the cable. To create enough slack in the cable, you’ll need to push the rear derailleur toward the wheel so that it sits under the largest sprocket.
Step 1: Setting the high gear is easier, so we’ll start there. Looking at the derailleur from behind, you see the two end-stop screws, marked ’H’ and ’L’, one above the other. Normally, the higher screw adjusts the high gear and the lower screw the low gear. But, annoyingly, some SRAM screws work the opposite way round. The writing is often small and difficult to make out. Turn the lower screw so that the chain hangs exactly under the smallest sprocket.
Step 2: The low end-stop screw is trickier. With the back wheel off the ground, turn the pedals with your right hand. Position your left hand with first finger hooked behind the cable entry tab at the back and thumb over the forward set of pivots. Push your thumb away from you (A) while turning the pedals. Push the derailleur across, so the chain runs to the largest sprocket but not so far that it falls into the gap between the largest sprocket and the spokes.
Step 3: If you can’t move the derailleur across enough to shift easily into the largest sprocket, you need to unscrew (anticlockwise) the lower (L) of the two adjustment screws. Small adjustments make a big difference, so take it easy. If the chain threatens to fall too far, wind the upper screw clockwise. Once set, you should be able to push the derailleur far enough by turning the pedals to let the chain sit vertically under the large sprocket, and no further.
Source : BIKE MAINTENANCE TIPS, TRICKS & TECHNIQUES
See also bike maintenance tips, tricks and techniques “Adjusting the cable tension on standard rear derailleurs”