B113_INTEGRATOR
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
LIB\CORE
V1.0
The block integrates the input signal in in time.
Input | Type | Description | Default value |
IN | REAL | Input value | 0 |
ENABLED | BOOL | Enable of integration | False |
RESET | BOOL | Input value reset | False |
Output | Type | Description |
OUT | REAL | Actual integrated value |
LASTY | REAL | Result before last reset |
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.