I am trying to write on my UDT instances parameters for a logic I am developing I used these two functions:
path = "[Default]Alarms/myTag/Parameters.HH"
# 1
system.tag.writeAsync([path ], [1234])
# 2
system.tag.writeBlocking([path ], [1234])
But neither one updates the HH
parameter for myTag
UDT instance.
How should i do this?
That should work. Where are you running this script from? If you're using this in scripts called from tag value changes, you'll need to make sure you've set the Gateway Scripting Project to the project where these scripts exist or else they won't work.
If running/testing from the designer, you'll need to make sure you're in R/W mode and not just read only mode.
1 Like
I am running these scripts in a view that is designed to config the UDT parameters with user input.
I dont understand your solution exactly. Can you elaborate more specifically of the steps to check/do?
I found out what you mean by read/write comm and applied your solution. Still not working.
Can you show us the UDT definition ?
Also, can you try logging the return of the call to readBlocking
? It should give you clues on what is not working.
1 Like
Even as a first sanity check, try using your script above in the scripting console and see if it works there.
There was a problem with my addressing. Thank you for pointing that out