-

INTEGRAL / INTEGRAL_LTIME

Type Function block
Description Implements the mathematic integration over time. The function block is carried out when the ENABLE input is set to TRUE.

The following program fragment describes the functionality of the INTEGRAL function block:

Q = NOT R1;
IF R1 THEN
    XOUT = X0;
ELSEIF RUN THEN
    XOUT = XOUT + XIN * TIME_TO_REAL(CYCLE);
END_IF
Notes
  • The value of the operand connected to CYCLE has to correspond to the cycle time of the task in which the function block is used.
  • Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
Parameters Inputs

ENABLE

RUN

R1

XIN

X0

CYCLE

Outputs

Q

XOUT