15. Handy Instruction Design Examples 15.7 PID - Oven Temperature Control (Auto-tuning for PID Temperature Control) Control Purpose: z Execute auto-tuning function of PID instruction to control the temperature of the oven when the oven is in unknown temperature environment. The target temperature is 80 ℃ . z Apply DVP04PT-S temperature module for measuring the present temperature of the oven and transferring the results to PLC. The PLC will execute parameter auto-tuning function (D204 = K3) to operate the best PID parameters and automatically change the control direction as “Exclusively for the adjusted temperature control” (D204 = K4).
z PLC outputs the operation results (adjusted parameter) in D0 to the input of GPWM instruction. Y0 will output PWM pulses (width determined by D0) to control the heater and PID temperature control is accomplished. D0 Y0 Devices: D20 Control Program: M1002 Set target temp: 80 ℃ Set sampling time: 4s Set cycle time of GPWM instruction:
4s Set the average time of Channel 1:2 times DVP04PT DVP-PLC Application Examples 15-22 Device Function M1 Executing PID instruction Y0 Outputting adjustable pulses D0 Storing PID operation result D10 Storing the target temperature D11 Storing the present temperature D20 Storing pulse output cycle of GPWM instruction D200 Storing PID sampling time parameter MOV K800 D10 MOV K400 D200 MOV K4000 D20 TO K0 K2 K2 K1