By programming PLC software,the PID control of stepper motor is realized based S7-1500 PLC.Firstly,the elec-trical connection relation between PLC,stepper motor and stepper motor driver are clarified.Then,the PTO configuration and axis technology configuration are carried out using Siemens S7-1500 PLC Portal software.The human-machine interface is designed based on HMI,and a PID controller is designed.Finally,an experiment system is constructed,and the PID parameters are adjusted by the critical proportionality method.The experimental results show that the PID control adjustment time of stepper motor is within 1 minute,and the deviation of the position is less than 0.02°.