# Best way to turn boolean tag value high every 5 seconds?

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-turn-boolean-tag-value-high-every-5-seconds/50123>\
**Category:** Ignition\
**Created:** [August 19, 2021, 8:05pm UTC](https://forum.inductiveautomation.com/t/best-way-to-turn-boolean-tag-value-high-every-5-seconds/50123 "2021-08-19T20:05:20Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [August 19, 2021, 9:43pm UTC](https://forum.inductiveautomation.com/t/best-way-to-turn-boolean-tag-value-high-every-5-seconds/50123/7 "2021-08-19T21:43:02Z")

</div>

I tend to prefer encapsulating this type of functionality into a UDT. This way I can easily instantiate another “heartbeat” object when it is time to monitor another device (in this example). Attached is a tag JSON that will create the structure shown here:

![HeartbeatObjects](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/d/dda5b6274afab58441ef9e2a11421f8386b7066f.gif)

You’d obviously change the _heartbeat_ tags to OPC tags and then set the address accordingly–the example here uses memory tags.

[heartbeat\_objects.json](https://forum.inductiveautomation.com/uploads/short-url/1VT6oBXT4L6CweTMlmrC8EzvQe1.json) (5.0 KB)

---

_[View the full topic](https://forum.inductiveautomation.com/t/best-way-to-turn-boolean-tag-value-high-every-5-seconds/50123)._
