I have a UDT instance that I am using system.tag.readBlocking()
to get the entire UDT's contents in JSON format.
How would I go about writing back to the UDT instance? Also, no all UDT members will be written to.
I have a UDT instance that I am using system.tag.readBlocking()
to get the entire UDT's contents in JSON format.
How would I go about writing back to the UDT instance? Also, no all UDT members will be written to.
Reading in json format destroys some type info, and is therefore unlikely to suit for writeback. I suspect that the conversion to json is also a performance hit.
It may not be JSON format, I'm just reading with system.tag.readBlocking()
at the UDT instance level (my JSON ignorance is showing).
Of course I can create the UDT member paths and still use a single system.tag.writeBlocking()
call to update them all, but I thought this might be cleaner since I can read the entire UDT at once.
Write blocking is the correct way, and obviously, it can and should be batched in one call.
It is possible to get the configuration of a tag, edit it, and alter the tag path to one level higher than the edited properties in order to write the new values back using system.tag.configure, but I only use this approach when I have to skirt around read only parameters that are set to True
.
Writing value props would only be conceivable using tag.configure if the tags are all memory tags, otherwise you'll be applying overrides to the value props that won't actually be used unless the tags are converted into memory; you'll also see the override icon appear.