**Sprocket**It is one of the common parts. Due to different applications, its tooth shape and number of teeth are different, but its tooth shape and pitch are standard. The most common tooth shape is the "three arcs and one line" standard tooth shape. The various parameters of the shape can be found in the design manual.Figure 1 shows the standard "three arcs and one line" sprocket tooth shape. The tooth shape is symmetrical about the Y axis. The figure indicates the origin of the X and Y axes of the workpiece coordinate system, and the Z axis origin is on the upper end face of the sprocket tooth shape.

1. Tool route and programming ideas

Write a tooth shape machining program, other tooth shapes are processed by the coordinate system rotation, the total thickness of the tooth shape (Z-axis thickness) is processed by variables, and the feed per tool is 0.3 ~ 0.8mm, which can be selected according to the processing needs.The trajectory of the tool center and the corresponding points to the tooth profile are shown in Figure 2. From point A to point G, each point corresponds to each intersection point on the tooth profile, and the trajectory of the tool center is always offset relative to the tooth profile. A milling cutter radius value.

2 Tool center path

2. Programming

操作人员接到加工任务，拿到图样，把图样中链轮齿数#1、链滚子直径#2、分度圆直径#3、链轮外径#5、齿形厚度#6、刀具直径#32这6个参数赋值到程序中。程序中的计算方法及技巧，具体解释及说明如下。

G54G17G40G69M3S2000F1000

#1=13; Number of sprocket teeth.

#2=8.51; chain roller diameter.

#3=52; the diameter of the index circle.

#5=58;**Sprocket**Outer diameter, when assigning value, add 1mm to the size of the drawing.

#6=－10; Tooth thickness, that is, the end point size of Z axis.

#32=4; milling cutter radius.

IF[#1LT11]GOTO10;

IF[#1LE17]GOTO15;

IF[#1LE35]GOTO20;

IF[#1GT35]GOTO25;

N10 #4=0.58;

GOTO50;

N15 #4=0.56;

GOTO50;

N20 #4=0.53;

GOTO50;

N25 #4=0.5;

GOTO50; #4 is the assignment of the K coefficient. The corresponding value of the K coefficient is related to the number of teeth of the sprocket. The number of teeth <11 is 0.58, the number of teeth 11-17 is 0.56, the number of teeth 17-35 is 0.53, and the number of teeth > 35 is 0.5. The program can automatically select the K coefficient value, and there is no need to manually query and rewrite the #4 parameter each time the sprocket tooth shape with different tooth numbers is processed.

N50#7=[55-60/#1]；齿沟半角，公式来自工具书。

#8=[17-64/#1]; tooth shape half angle, the formula comes from the reference book.

#9=[18-56/#1]; The arc center angle of the working segment, the formula comes from the reference book.

#10=0.5025*#2+0.05；齿沟圆弧半径r1，公式来自工具书。

#11=-0.8*#2*SIN[#7]；工作段圆弧中心O2的X轴坐标，公式来自工具书。

#12=0.8*#2*COS[#7]；工作段圆弧中心O2的Y轴坐标，公式来自工具书。

#13=1.3025*#2+0.05；工作段圆弧半径r2，公式来自工具书。

#14=1.3*#2*COS[180/#1]；齿顶圆弧O3的X轴坐标，公式来自工具书。

#15=-1.3*#2*SIN[180/#1]；齿顶圆弧O3的Y轴坐标，公式来自工具书。

#16=#2*[1.3*COS[#8]+0.8*COS[#9]-1.3025]-0.05；齿顶圆弧r3半径，公式来自工具书。

#18=#3-#10*2; the diameter of the tooth root circle, this value is found in the machine tool to detect the workpiece.