what is SetMode(...)? for PID

hello,

from http://www.arduino.cc/playground/Code/PIDLibrary

i don't understand the function of SetMode(AUTO/MANUAL). i'm guessing that when set to AUTO, it set values for P_param, I_param, D_param. automatically, MANUAL: the user enters these values.

am I right?

thnx

Bassam: hello,

from http://www.arduino.cc/playground/Code/PIDLibrary

i don't understand the function of SetMode(AUTO/MANUAL). i'm guessing that when set to AUTO, it set values for P_param, I_param, D_param. automatically, MANUAL: the user enters these values.

am I right?

thnx

am I right?

No. In PID talk a control loop is turned on by switching it to "automatic mode", it then controls the output signal by comparing the measurement input (PV) with the setpoint value (SP) and continously adjusts the output signal (OP) using the tuning constants already provided. One can turn off this "automatic mode" by switching to "manual mode". Manual mode means a person (or another independent adjustable variable) has direct control on what the output signal is.

It's just like cruse control in a auto. When turned on (automatic mode) speed is automatically controlled by a PID controller reading speedometer data and increasing or decreasing throttle control to maintain speed to match setpoint setting. However when you turn cruse control off then it's in "manual control" and then only you and your foot have control of the throttle.

Unrelated:

PID controllers that can setup their own P,I,and D tuning constant vaues are said to have a "auto-tune" mode. These are usually proprietary algorithms and I have not yet come across a open source PID control software that included a auto-tune feature. Auto-tune is a common feature for standalone PID temperature controllers, as tuning a temperature control loop can be a very time consuming effort as process feedback is usually very slow in many applications so it's hard/fustrating/timeconsuming to manual tune such controllers.

Lefty

No. When the loop is in AUTO mode, the input is read, the calculations are performed, and the output is written.

When the loop is in MANUAL, the input is not read, the calculations are not performed, and the output is not changed in any way.

When a transition from MANUAL to AUTO is performed, the internal values are reset. I think this mostly effects the integral.

Basically, MANUAL means YOU are responsible for the output. AUTO means the PID controller is responsible for the output.

thank you

I have not yet come across a open source PID control software that included a auto-tune feature.

I saw one a few weeks back (I was looking for the PID code too) but I can't remember where it was :s