The function block provides the following input pins Input, Enable, Preset, and PresentValue and the output pins are Runtime_Min, Runtime_Sec, Runtime_Hrs, and Runtime_Days.This function accumulates runtime whenever the input is True (non zero) and enable is True. If Preset is True, runtime is set equal to the Preset Value. Runtime is provided in four outputs of seconds, minutes, hours, and days. From iteration to iteration, the Function Block keeps track of the run time seconds. On power up or reset, this is cleared.
Note: On power up or reset, only the Runtime Sec output is set to zero. The other three outputs, Runtime Min, Runtime Hrs, Runtime Days are stored and not lost.
Logic Inputs
| Input Name | Input Value | Logic Value | Description |
| Input | unconnected | 0 | Set Input = False |
| invalid | 0 | Set Input = False | |
| 0 | 0 | Input is False | |
| VAL != 0.0 | 1 | Input is True | |
| Enable | unconnected | 1 | Set Enable = True |
| invalid | 1 | Set Enable = True | |
| 0 | 0 | Enable is False | |
| VAL != 0.0 | 1 | Enable is True | |
| Preset | unconnected | 0 | Set Preset = False |
| invalid | 0 | Set Preset = False | |
| 0 | 0 | Preset is False | |
| VAL != 0.0 | 1 | Preset is True |
Analog Inputs
| Range | ||||
| Input Name | Low | High | Input Value | Description |
| Preset Value | 0 | <+inf | unconnected | Set Preset Value = 0.0 (in minutes) |
| invalid | Set Preset Value = 0.0 | |||
| VAL < low | Set Preset Value = 0.0 | |||
| VAL > high | Set Preset Value = 0.0 | |||
Output
| Output Name | Range | Description |
| RUNTIME_MIN | Any floating point number >= 0 | Runtime Min |
| RUNTIME_SEC | Any floating point number >= 0 | Runtime Sec |
| RUNTIME_HRS | Any floating point number >= 0 | Runtime Hrs |
| RUNTIME_DAYS | Any floating point number >= 0 | Runtime Days |
Operation

| Input | Enable | Preset | Result | Comment |
| Do not care | Do not care | True | Run time = preset value | Set runtime to the present value |
| Do not care | False | False | Stop Accumulator | Do not accumulate when enable is false |
| False | True | False | Stop Accumulator | Do not accumulate when input is false |
| True | True | False | Add one second to the run time total |
Run time is always accumulated internally in minutes. It is reported in 4 different units of seconds, minutes, hours and days. Run time Min is saved over a power outage and reset. If a power outage or reset occurs, the controller could lose up to one minute of runtime. Runtime Sec, Runtime Hrs, and Runtime Days are calculated every iteration from the Runtime Min.
Runtime Hrs and days outputs are fractional units to the nearest minute. Runtime sec is runtime Min multiplied by 60. You must use the preset input to set the runtime to an initial value in minutes.
Runtime Accumulate is run every second. The state of input, enable, and preset are examined by the Function Block when it is run. Momentary transitions of the inputs between invocations of the Function Block will not be detected. If the runtime reaches 16,277,216 minutes, it will stop.
Runtime Min is effectively limited to 16, 277,216 minutes (31 years).
Example
Connect an output from another block to the Input. Connect a digital input to Preset. Set the Preset Value to 123. Set the Preset Value to 255 (TRUE).
The four outputs are as follows: