INTEGRATOR block

Short summary

Name

INTEGRATOR

→POU type

→function block

Category

IEC-block, ControlEnh, block with internal error diagnostic

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/add.svg not defined in IEC-standard

Graphical interface

images/download/thumbnails/414780935/INTEGRATOR-version-1-modificationdate-1534927814778-api-v2.png

Available since

version 1.47.0 (for logi.CAD 3)

Functionality

This is a control technical transfer function of a discrete integral element with trapezoidal rule approximation .
Here the input values are not added up as in the rectangle rule approximation, but the block uses the region of the generated trapezoid generated from the current value and the previous value. This approximation tends to be more accurate – in particular in case of exponential and ramp functions .

Enter the input value at input IN. Enter the integral action time constant at input TI. During the first cycle after a restart of the application, the output OUT remains set to value 0. Setting the input P to the value FALSE (or an equivalent) only considers negative input values (locks the upper integration direction), whereas setting the input N to the value FALSE only considers positive input values (locks the lower integration direction). If FALSE is connected to both inputs P and N, both integration directions are locked and the value of the output OUT does not change. Setting the input R to the value TRUE resets the output OUT to the value 0. Only if the input R is set to the value FALSE, the integration is started.

The following formular describes the digital implementation:

images/download/attachments/414780951/IntegratorForm-version-1-modificationdate-1534928532002-api-v2.png

Internal values: t ... current time, tA ... time since last call of block

In-/outputs


Identifier

→Data type

Description

Inputs:

IN

LREAL

input

TI

TIME

integral action time constant

P

BOOL

locking the positive integration direction

N

BOOL

locking the negative integration direction

R

BOOL

reset

Outputs:

OUT

LREAL

integration value

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Internal error diagnostic for block

If the integral action time constant is less than the time period that has passed since the last block call , the output OUT is reset to the value 0 and the outpunt ENO is reset to the value FALSE . In case of an error the value of the ENO output will be set to value FALSE (or an equivalent).

Example for usage within ST-editor

PROGRAM ExampleIntegrate
VAR
iIntegrator : INTEGRATOR;
END_VAR
// Note: P and N have to be set explicitly to TRUE, because the default value (FALSE) would lock both integration directions.
iIntegrator(IN := 1, P := TRUE, N := TRUE);
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.