In response to the current situation where domestic programmable logic controllers(PLC)are gradually becoming popular in industrial control systems but have a single function,a PID module has been designed for domestic PLC,including ordinary PID control function and PID parameter self-tuning function,suitable for ordinary PID control and automatic PID control of model free control objects.This paper have developed a user interaction interface for PID and an automatic iteration algorithm for control parameters,which has been embedded into the domestically developed Shanke PLC in laboratory,by controlling the encoder motor,have verified the robustness,speed,safety,and stability of the PID functional module,aiming to provide some reference and reference for the functional design of domestically produced PLCs in industrial automation control systems.