Documentation

Integrator (B113)

Block name

B113_INTEGRATOR

ST call

PROGRAM TEST B113
VAR
BOOL1,BOOL2 :BOOL;
REAL1,REAL2,REAL3: REAL;;
FB: LIB.CORE.V1_0.B113_INTEGRATOR;
END_VAR
FB(IN:=REAL1, ENABLED:=BOOL1,RESET:=BOOL2,OUT=>REAL2,LASTY=>REAL3);
END_PROGRAM

Library

LIB\CORE

Version

V1.0

Description

The block integrates the input signal in in time.

Inputs

Input Type Description Default value
IN REAL Input value 0
ENABLED BOOL Enable of integration False
RESET BOOL Input value reset False

Outputs

Output Type Description
OUT REAL Actual integrated value
LASTY REAL Result before last reset

Function

The function reads input value in and adds it to the output every second. This gives, for example, wattseconds if there are watts on the input. The integrated value is reset after a rising edge at the reset input, and integrates if Enabled=true. Reset copies the last integrated value to the lasty output.

Application example

The block is used for calculation of cummulated values, such as total amount of water (m3) from flow value (m3/s), energy (Ws or kWh) from power (W), solar energy from sun (kWh/m2/day) from instant irradiation (W/m2) etc.