Posted 13 Jan 2017 (edited) Hi, In document 2-PID FB I found FB for 2-PID control I downloaded this FB - attached 2-PID Function Block.zip and I set the same values what are in example and still I have error: Can I get any clue where is the mistake. Parameters looks correct Thanks Pawel Edited 13 Jan 2017 by pszczepan Share this post Link to post Share on other sites
Posted 13 Jan 2017 From the help file (example) that you attached: If no PID parameters are stored, the function block shall generate a #0601 error when attempting to enable the 2-PID function. The user can manually start the Auto-Tuning Process causing the status code #0002 to occur. While the Auto-Tuning process in ongoing, the AT_Status bit is turned on and will turn off when the Auto-Tuning process has been completed. You need to put values in for P, I and D. You can see the acceptable ranges below (also from the file in the .zip file): If you do not know what to put in for P, I and D, turn on the Autotune (Start_AT) bit and see what OUT_P, OUT_I and OUT_D results you get. You can then enter them for the P, I and D inputs. Share this post Link to post Share on other sites
Posted 14 Jan 2017 Now it works. So finally procedure looks like: first start - write 1,1,1 to P_Input, I_Input, D_Input and set Write_PID_Input after that, set ENABLE=1 set also START_AT=1. After some time OUT_P, OUT_I, OUT_D will get new values. Now I have question: START_AT should be all the time =1 and values OUT_P, OUT_I, OUT_D will be optimized or just once to get new OUT_P, OUT_I, OUT_D. After I receive new values OUT_P, OUT_I, OUT_D should I write this values to P_Input, I_Input, D_Input for future needs. When I will need it - when PLC battery will be low? Share this post Link to post Share on other sites