# Industrial timer (TDR) subflows

**URL:** <https://discourse.nodered.org/t/industrial-timer-tdr-subflows/76836>\
**Category:** Share Your Projects\
**Created:** [22 March 2023 18:20 UTC](https://discourse.nodered.org/t/industrial-timer-tdr-subflows/76836 "2023-03-22T18:20:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjkoster](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mjkoster/32/36163_2.png) [@mjkoster](https://discourse.nodered.org/u/mjkoster)\
**Post date:** [22 March 2023 18:20 UTC](https://discourse.nodered.org/t/industrial-timer-tdr-subflows/76836/1 "2023-03-22T18:20:22Z")

</div>

Some time ago, there was a discussion about industrial timers in Node-RED (On-Delay, Off-Delay, Interval-On, etc.). I'm working on a custom node/node set, but in the meantime, I made some prototype subflows that work quite well.

![timer-subflows](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/7/b7f0c0ef2cbceee8e0a8d4c6c1e0e5bd07164977.png)

They are all based on a common template structure with some custom gating logic in a function node

 ![subflow-template](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/0/b08e5fb05db8cdd690c8f9ab1c0ae55924ecc67d.png)

Delay is set in seconds by sending a message with delay property (similar to the delay node)

Here is a flow that contains the three types I've built so far (on-delay, off-delay, and interval-on)

[timer-subflows.json](https://discourse.nodered.org/uploads/short-url/wwGa6NCO6GEiXWrhdlheXjdrSlN.json) (20.4 KB)

reference: [Understanding Time Delay Relay Functions | Macromatic Industrial Controls, Inc.](https://www.macromatic.com/support/knowledge-base-articles/understanding-time-delay-relay-functions)
