This paper introduces the research on the tool change of servo tool magazine of machine tool based on Siemens 840D sl system. Through PLC program, the tool change in the tool magazine of the machine tool being processed is carried out, which saves time and improves the efficiency of the machine tool.