Table of Contents

Integrator

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 TypeDescription Default value
IN REALInput value 0
ENABLEDBOOLEnable of integrationFalse
RESET BOOLInput value reset False

Outputs

OutputTypeDescription
OUT REALActual integrated value
LASTY REALResult 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.