I was thinking the timer was my PID trigger but since I have it in a periodic task. Are you saying its meaningless? I thought I had it in a continuous task. I should remove it and set my update time for the PID the same as the update of the periodic task, correct?
The threads that I've read say it is much better to use a periodic task, why do you suggest continuous. In the continuous I will need the trigger timer from what I have read.
This is for a center guide for large metal coils. The detector outputs 0 when the strip is on center. Output to the hydraulics is done by a (+/- 10 VDC) signal to a bosch servo valve with on board electronics. Currently I have a test bench set up and the code works with actual detector and output (+/- 10 volts) to a small drive which runs a actuator but I want to learn the proper method for writing the logic so I am in the write, learn, test mode and will eventually have to provide something.
Normally our company made controllers which we did not need to use any Integral for this type of guiding. Even though the unit provided adjustment for it. Normally it was set at zero, but since we will be replacing the control with CLX, I would like to provide the flexability to use the I and D also. As did the old controller, therefore the need to set it up correctly.
Thanks, I'd appreciate more suggestions and will revise the code.