Worm cam mechanism is a common indexing mechanism which is widely used in automatic machinery. Because of its high transmission precision requirements, the mechanism has high demands on the cylinder cam. The machining methods of cylinder cam are unique and the methods of special machine tool and NC machining are the two methods that general adopted in the machining of it. In this paper, the method of CNC Programming which is used for machining cylinder cam in 5-axeses high speed DMU 70eVolution Machining Center is introduced. The machining principle of cylinder cam has been studied, and the mathematical model for CNC Programming has also been worked out. The automated compensation of cutting tool’s radius is used in this field for the first time.