Script not execute in tag

I've been having some issues with the scripts I put inside my tags. In the value change event, it always ran at startup, but for the past few days, it doesn't run at all. For every 10 value changes, I see that it runs the script 2 or 3 times. I haven't changed anything in my scripts, and it's happened to me in different tags and scripts. Has this happened to anyone else?

I ran a test by setting it up in my event gateway, and it worked fine.

I've attached a basic example of a script for my tags.

Hi,

Try this:

system.tag.writeBlocking([HERE ARE YOUR TAG PATHS],[VALUES])

1 Like

system.tag.write() isn't even in the manual anymore. Check the link to look at your options.

Note that tag change scripts should execute in a couple of ms. Anything that writes to tags (other than memory tags) will take longer than this and can choke your system. (There are only three threads available for tag change scripts.) For slow operations the tag change script should call a gateway script which can run outside the three threads.

3 Likes