PID Lean
PID Lean
The S7-1200 has a one of the most complete PID controller of the SIMATIC world. Your tuning tool, for
example, makes your use very practical.
Some applications, however, are very simple, and don’t need all of the potential of the intern S7-1200
PID controller. For this very simple application, the follow “lean” version of PID controller could be a
choice.
He has a clean list of parameter that makes your use for simple application, that doesn’t needs of
tuning tools. He has an auto detection of its call time, so he could be place in any cycle or time OB
without any special adjusts. Your open source could also easily adapt for special uses.
[Pid.zip]
Parameter description
The parameter of the PID lean follow the S7-300/S7-400 (in a simplified way) description as decrypted
follow:
controller gain.
Ti TIME >= CYCLE T#20s INTEGRATION
TIME
Determines the
time response of
the integrator
If Ti = 0s, the PID
integration is
deactivated
Algorithmic
In manual mode (Man_ON = TRUE) the MAN value is passed to LMN (limited to LMN_HI, LMN_LOW).
ER = SP – PV
Delta Time = time interval between the actual call and the last call of the FB.
Notes:
If Ti = 0, then LMN_I = 0
If LMN > LMN_HI or LMN < LMN_LO or Man_On = True then LMN_I = LMN – LMN_P – LMN_I
LMN_D (derivative part of the PID) = Tm_lag * Delta ER / (Delta Time * Tm_lag / Td + 1 ) + LMN_D * (
1 + Delta Time * Tm_lag / Td)
Notes:
If Td = 0, then LMN_D = 0
Template for publishing FAQs in the Internet April 2005
Important:
The sample program is freeware. Any user can use copy and forward this program FREE OF
CHARGE. The authors and owners of this program take no responsibility whatsoever for the
functionality and compatibility of this software. Use of the software is entirely at the user's own risk.
Since this software is free of charge, there is no warranty, nor claim for error correction and hotline
support.