发布于 2005-07-04 13:00:44
0楼
Table TYPE Comment
Command Real Command value
Feedback REAL Feedback value
Zero_Int BOOL Zero integral value input
Freeze_Int BOOL Freeze integrator
Bipolar_Feedback BOOL Feedback signal is capable
of going bipolar
Invert_Output BOOL Invert the output for proper control
Kp REAL Proportion gain value
Ki REAL Integral gain value
Kd REAL Differential gain value
Integral_Lim REAL Bipolar limit of the
integral value
Last_Error REAL Previous scan error for
calculating rate
//of change for derivative
Integral_Value REAL Sum of the process integral
Correction REAL Correction output (unitless)
Max_Change_Per_Scan REAL Max allowable change in
error per scan
Error REAL Error value in current scan
Proportional REAL Proportional correction value
Derivative REAL Derivative correction value
Scan_Differential REAL Change in error in the last scan
L #Command
L #Feedback
-R
A #Bipolar_Feedback
JC BPLR
L #Command
>R
JC BPLR
TAK
BPLR: T #Error
L #Error
L #Last_Error
-R
L #Kd
*R
T #Derivative
L #Error
T #Last_Error
L #Error
L #Kp
*R
T #Proportional
A #Freeze_Int
JC FRZ
L #Error
L #Ki
*R
L #Integral_Value
+R
T #Integral_Value
FRZ: NOP 0
L #Integral_Value
L #Integral_Lim
>R
JC TOUT
L -1.000000e+000
*R
L #Integral_Value
JC TOUT
TAK
TOUT: T #Integral_Value
AN #Zero_Int
JC SKIP
L 0.000000e+000
T #Integral_Value
SKIP: NOP 0
L #Proportional
L #Integral_Value
+R
L #Derivative
+R
AN #Invert_Output
JC NINV
NEGR
NINV: T #Correction
这是我在E文网上找的一种PID算法,是S7-300的PID函数块,希望大家喜欢!!
主要特点,简单明.
除了老婆!我怕谁?