Author Topic: PID Control Block error in operation  (Read 5551 times)

Ian

  • Guest
PID Control Block error in operation
« on: January 18, 2012, 12:56:27 PM »
I have been testing the PID block with just P and I gain set.  When the output of the block raises to the maximum value the integrator stops as it should do.   The problem is that when the demand falls below the feedback value the integrator does not re-start.  

I would have thought that when the output reaches maximum  the integrator would be prevented from raising the output but not from reducing the output.

Have I missed something in the control?

A similar thing happens if the lower limit is reached.  

Ian

Since I posted this I have seen the problem many times after compiling and downloading.  The first time I start the PID routine I have a problem , then if I power down the MC50 and apply power again I usually do not see the problem.   I have found that as my program has increased in size I see the problem more often.   When I first download I see the execution time is 3ms and the problem occurs.   When I power down and re-apply the power the execution time is 2 ms and I do not have the problem.  

Does anyone have any ideas???

Ian

I have been notified that there is a problem with the PID routine if the exectime changes which in my case it does from 2 to 3 mS on first download.   The output of the PID locks up.   The way around it is to set the exectimeout to be higher than you would get under any circumstances.  In my case 4mS.   In that way the exectime shouldn't change.    This is not ideal but a solution non the less.

 
« Last Edit: April 21, 2012, 06:31:38 PM by Ian »