Class Timint
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code rt_plc_arithm.c
 Time integrator.

 A curve f(t) is supposed to be made up of a large
 number of rectangular sections, each with a width
 ScanTime and a height Int. The output varies in
 accordance with both magnitude and duration of the
 input. The output is proportional to the time integral
 of the input.

 ActVal(t) = ActVal(t-1) + In(t) * ScanTime / TimFact

 where 1 / TimFact is the integrating rate.

 With the z-input it is possible to clear the
 integrator.

Example

 Suppose In is in litres / min. If we want ActVal to be
 in litres TimFact will be equal to 60 seconds /min.

RtBody attributes pwr_sClass_timint
Float32 In IN The input signal. The dimension is supposed to be
something per unit of time.
Boolean Clear z On a leading edge OldAcc is set equal to ActValt-1 and
then ActValt-1 = 0.
Float32 ActVal VAL The output signal.

ActVal(t) = ActVal(t-1) + In(t) * ScanTime / TimFactIn
Float32 TimFact TimFact 1 / TimFact is the derivative time, i.e. the time which elapses
when the ouput signal arises from 0 to In, if In is a constant value.
The factor is in seconds per unit of time.
Pointer to Float32 ScanTime ScanTime Program cycle time in seconds.
Int32 AccVal AccVal The operator's authorities to change ActVal.
0 -- Changes not allowed.
!= 0 -- Changes allowed.
Float32 OldAcc OldAcc Specifies the value of the output signal ActVal when
the integrator was cleared last time.

DevBody attributes 
PlcNode PlcNode  


GraphPlcNode
object_type 134
parameters[0] 2
parameters[1] 0
parameters[2] 1
parameters[3] 0
subwindows 0
graphmethod 0 (standard, individual attributes)
graphindex 0
default_mask[0] 3
default_mask[1] 1
segname_annotation 1
compmethod 4
compindex 0
tracemethod 0
traceindex 0
executeordermethod 2
objname Timint
graphname Timint
debugpar


Template Object
TimFact 1.0


Attributes detail


In Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName IN
Body RtBody
 The input signal. The dimension is supposed to be
 something per unit of time.

Clear Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName z
Body RtBody
 On a leading edge OldAcc is set equal to ActValt-1 and
 then ActValt-1 = 0.

ActVal Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName VAL
Body RtBody
 The output signal.

 ActVal(t) = ActVal(t-1) + In(t) * ScanTime / TimFactIn

TimFact Intern
Class Intern
Type Float32
Flags REDUTRANSFER
GraphName TimFact
Body RtBody
  1 / TimFact is the derivative time, i.e. the time which elapses
 when the ouput signal arises from 0 to In, if In is a constant value.
 The factor is in seconds per unit of time.

ScanTime Intern
Class Intern
Type Pointer to Float32
Flags INVISIBLE | POINTER | PRIVATE
GraphName ScanTime
Body RtBody
 Program cycle time in seconds.

AccVal Intern
Class Intern
Type Int32
Flags
GraphName AccVal
Body RtBody
 The operator's authorities to change ActVal.
  0   -- Changes not allowed.
  != 0 -- Changes allowed.

OldAcc Intern
Class Intern
Type Float32
Flags NOEDIT
GraphName OldAcc
Body RtBody
 Specifies the value of the output signal ActVal when
 the integrator was cleared last time.

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody