FB_Integrator (Function Block)
Integrates the input error signal over time.
The output accumulates the input scaled by the integral gain \(K_i = 1 / T_n\),
and is clamped to [Minimum, Maximum] on every cycle.
Setting Tn to LTIME#0 disables integration, setting the output to zero.
Use Sync() to preset the integrator state for bumpless transfer when
switching from manual to automatic mode.
Note
Set Maximum before Minimum to ensure the clamp guard applies
correctly.
Use FB_init to set tTn at declaration time.
Extends: FB_SisoComponent
Properties
Maximum
Type: LREAL
Gets or sets the upper output clamp.
Internally clamped to be greater than or equal to Minimum.
Set this before Minimum to ensure the guard applies correctly.
Minimum
Type: LREAL
Gets or sets the lower output clamp.
Internally clamped to be less than or equal to Maximum.
Set Maximum before this property to ensure the guard applies correctly.
Tn
Type: LTIME
Gets or sets the integral action time (Tn).
This controls how aggressively the integrator responds to sustained error.
A shorter value increases integral action. Setting it to LTIME#0 disables
integration entirely, setting the output to zero.
Methods
FB_init
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
if TRUE, the retain variables are initialized (warm start / cold start) |
|
|
if TRUE, the instance afterwards gets moved into the copy code (online change) |
|
|
Integral action time. LTIME#0 disables integration. |
Reset
Clears the integrator state and output.
Run
Advances the integrator by one time step.
Note
Must be called once per cycle on a single PLC task. If Tn is
LTIME#0 the output is set to zero.
Sync
Forces the integrator state to a given value on the next Run() call.
Use this for bumpless transfer when switching from manual to automatic mode, to prevent a sudden jump in output.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|