Instructions
9.1 PID_Compact
PID control
Function Manual, 03/2017, A5E35300227-AC
283
Description of PID_Compact V1
Description
The PID_Compact instruction provides a PID controller with integrated tuning for automatic
and manual mode.
PID_Compact is called in the constant interval of the cycle time of the calling OB (preferably
in a cyclic interrupt OB).
The actual values of retentive tags are only updated when you download PID_Compact
completely.
Downloading technology objects to device (Page 44)
At the startup of the CPU, PID_Compact starts in the operating mode that was last active. To
retain PID_ Compact in "Inactive" mode, set sb_RunModeByStartup = FALSE.
Monitoring of the sampling time PID_Compact
Ideally, the sampling time is equivalent to the cycle time of the calling OB. The PID_Compact
instruction measures the time interval between two calls. This is the current sampling time.
On every switchover of operating mode and during the initial startup, the mean value is
formed from the first 10 sampling times. If the current sampling time deviates too much from
this mean value, Error = 0800 hex occurs and PID_Compact switches to "Inactive" mode.
PID_Compact, Version 1.1 or higher is set to "Inactive" mode during controller tuning under
the following conditions:
● New mean value >= 1.1 x old mean value
● New mean value <= 0.9 x old mean value
In automatic mode, PID_Compact, Version 1.1 or higher, is set to "Inactive" mode under the
following conditions:
● New mean value >= 1.5 x old mean value
● New mean value <= 0.5 x old mean value