Introduction - If you have any usage issues, please Google them yourself
Sharing a software PID program (FB58) used on Siemens PLC, I have changed it to C language code.
Chinese annotations have been attached to key places with self-tuning function.
After testing, the self-tuning PID parameters are very useful, which solves the tedious problem of parameter tuning.