This is an Ignition Edge 8.1 with Perspective version 8.1.25 (b2023021409).
I found out the hard way that in Edge systems all gateway and tag scoped scripting is disabled, but all client scoped scripting should still work as per the following:
"All Gateway level scripting is disabled including Gateway Event Scripts and Tag Event scripts. This does not affect project or client scoped scripts."
But if I use "system.tag.writeBlocking" in the script console, I get inconsistent results. If I write to multiple tags it reports a status of "Good" for each tag but the tags do not change. However if I break out each tag into its own "system.tag.writeBlocking" instance it does appear to work:
system.tag.writeBlocking(["[edge]ISS1/ISS1_01_02/Control/Select_Open_Request"],[False]) system.tag.writeBlocking(["[edge]ISS1/ISS1_01_02/Control/Select_Close_Request"],[False]) system.tag.writeBlocking(["[edge]ISS1/ISS1_01_02/Control/Select_Cancel_Request"],[False]) system.tag.writeBlocking(["[edge]ISS1/ISS1_01_02/Control/Execute_Close_Command"],[False]) system.tag.writeBlocking(["[edge]ISS1/ISS1_01_02/Control/Execute_Open_Command"],[False]) OUTPUT: [Good] [Good] [Good] [Good] [Good]
This does not change the tag values to False but still reports "Good":
tagPaths = [ \ "[edge]ISS1/ISS1_01_02/Control/Select_Open_Request", \ "[edge]ISS1/ISS1_01_02/Control/Select_Close_Request", \ "[edge]ISS1/ISS1_01_02/Control/Select_Cancel_Request", \ "[edge]ISS1/ISS1_01_02/Control/Execute_Close_Command", \ "[edge]ISS1/ISS1_01_02/Control/Execute_Open_Command"] tagValues = [False, False, False, False, False] system.tag.writeBlocking(tagPaths, tagValues) OUTPUT: [Good, Good, Good, Good, Good]
The tag paths have been copied from the browser just to make sure I was not stuffing something up.
All the above tags are Boolean and I can manually write to each without issue via the tag browser.
The tags are mapped to DNP3 points; properties for one of them below:
Question number 1: Why the inconsistency between system.tag.writeBlocking with multiple and single tag paths when using the script console? (I assume I have stuffed up something obvious but cant see it or it might be something to do with Edge again??)
Question number 2: When I deploy this code to a "on change" script for a custom property on a perspective page (I believe this is client scoped scripting which should be allowed) neither method works at all. writeBlocking still reports the "[Good]" feedback for each write but the tag values remain unchanged. Any idea why?
Thanks in advance for any help with this, its doing my head in. I will keep working on this and post updates if I solve it.