Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post

PID Library

SetTunings()

Description

Tuning parameters (or "Tunings") dictate the dynamic behavior of the PID. Will it oscillate or not? Will it be fast or slow? An initial set of Tunings is specified when the PID is created. For most users this will be enough. There are times however, tunings need to be changed during run-time. At those times this function can be called.

Syntax

SetTunings(Kp, Ki, Kd)
SetTunings(Kp, Ki, Kd, POn)

Parameters

Kp: Determines how aggressively the PID reacts to the current amount of error (Proportional) (double >=0)
Ki: Determines how aggressively the PID reacts to error over time (Integral) (double>=0)
Kd: Determines how aggressively the PID reacts to the change in error (Derivative) (double>=0)
POn: Either P_ON_E (Default) or P_ON_M. Allows Proportional on Measurement to be specified.

Returns

None