# Persistent Tag Issue and Forced Value in PLC After Script Execution

**URL:** <https://forum.inductiveautomation.com/t/persistent-tag-issue-and-forced-value-in-plc-after-script-execution/90271>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 11, 2024, 5:28pm UTC](https://forum.inductiveautomation.com/t/persistent-tag-issue-and-forced-value-in-plc-after-script-execution/90271 "2024-05-11T17:28:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 11, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/persistent-tag-issue-and-forced-value-in-plc-after-script-execution/90271/3 "2024-05-11T17:45:07Z")

</div>

This has been discussed many times on the forum. You can't rely on web-based HMI to turn off the tag and the use of `sleep()` is an indication that your logic is bad. You shouldn't use it.

Instead,

- Have the button set a bit in the PLC.
- Have the PLC reset the bit when the task is done.
- Have the Perspective indication tied to the PLC bit.

> [@How to create the momentary Button in Perspective](https://forum.inductiveautomation.com/t/how-to-create-the-momentary-button-in-perspective/63815/7):
>
> Because, with currently available components, there is no way to ensure the PLC gets its bit released (in a reasonably short bounded time, typically ~100ms) if: The browser hard crashes while the button is pressed, The browser encounters a javascript bug or sandbox violation while the button is pressed, Some other javascript operation hogs the CPU(s) (charts for the win!), delaying recognition of the mouse release, The websocket gets cut off between browser and gateway (for any reaso…

---

_[View the full topic](https://forum.inductiveautomation.com/t/persistent-tag-issue-and-forced-value-in-plc-after-script-execution/90271)._
