
This Function Block RT_UPTIME counts how long a device has been switched on. The interval PT is synchronized with the real-time clock.
Note: This Function Block can increase system load, as all used intervals are executed at the same time. However, it should be used in combination with the Function Block LOGGER. Otherwise, use the Function Block UPTIME instead.
If the input is true, the runtime is calculated at output Q. When switched off, the time is stored and counted further upon re-invocation.
The runtime can be reset via the input. As soon as the input is false again, the time measurement starts from the beginning.
The input can be used to shorten the PLC runtime. For this purpose, a time is specified at input PT. If, for example, T#1s is used, the output Q is only issued every second. When the time measurement is terminated, the value Q is immediately issued. The specified interval is synchronized with the real-time clock.
The output returns the measured runtime in the format T#.