Proposal: New Function Block E_RTON (Retentive Timer On-Delay)
#2402
franz-hoepfinger-4diac
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Great idea. Call it TONR though - that's a name already known to many programmers from TIA |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal: New Function Block
E_RTON(Retentive Timer On-Delay)Context
In industrial automation, we often encounter processes that require timing logic which can be "paused" and "resumed" without losing the accumulated time. Standard IEC 61131-3 and IEC 61499 timer blocks like
TONorE_TONare non-retentive: they reset their internal elapsed time immediately when the input signal (IN) goesFALSE.While this is perfect for simple delays, it is insufficient for monitoring cumulative processes such as maintenance intervals, total run-time under specific conditions, or processes that are frequently interrupted by safety gates or pauses.
The Proposal
I propose the addition of a Retentive Timer On-Delay (
E_RTON) function block to the standard event-driven timer library.Core Logic
The
E_RTONaccumulates time as long as the enable signal is active. If the signal is removed, the timer "freezes" the current elapsed time and continues from that exact point once the signal returns.IN=TRUE): Timer runs and accumulates time.IN=FALSE): Timer pauses. Accumulated time is retained.PT, the outputQbecomesTRUE.R): The only way to clear the accumulated time and setQback toFALSE.Interface Definition
Event Inputs
REQ: Update/Service request (cycles the internal logic).R: Reset event. Clears accumulated time and resets outputQ.Event Outputs
CNF: Confirmation that the internal state or output has been updated.Input Variables
IN(BOOL): Enable signal. IfTRUE, time is accumulated.PT(TIME): Preset Time (the duration to reach).Output Variables
Q(BOOL): Output state.TRUEif accumulated time >=PT.ET(TIME): Elapsed Time. The currently accumulated duration.Use Cases
Implementation Note for IEC 61499
In an event-driven environment,
E_RTONwould ideally calculate the delta-time betweenREQevents using the system's time stamp or a dedicated clock tick, adding this delta to an internalCV(Current Value) only whenINisTRUE.crosspost: https://www.reddit.com/r/Universalautomation/comments/1sq6qae/proposal_new_function_block_e_rton_retentive/
Author: Franz Höpfinger
Organization: HR Agrartechnik GmbH / Meisterschulen am Ostbahnhof
Date: April 2026
Beta Was this translation helpful? Give feedback.
All reactions