I have a project get the siemse PLC node (no the ) to Json , the data structure like {“a“:{“a1“:1,”a2”:2},”b”:{“b1“:3,”b2”:2}}, if I try to change one of the tag ,like modify b2 to 3, if the tag data write to plc ,I think it will have risk to change data that I don’t want to change , are there any guys to test it ?
This is correct, if you write the tag as a JSON document, it will take the entire JSON structure and write it to the tags. You are then responsible for making sure the data only changes where you intended to change it.
We did run in that situation when using the OPC UA server from siemens. The only sollution i ‘ve found is to separate the data that should be writed by ignition and the one that shouldn’t (For us is different struct in one UDT.) Then i just make separate document tag in Ignition per struct in the UDT. That’s the only solution i’ve found for the moment.
Thank you for your information , in fact I create a tag to show a data list use it , it just for display data, but I don’t know why other guys use it to change data .
Just put that tag on read only in ignition.
If you use my Integration Toolkit's "Divert Write" tag actor in the derived tags that split up the JSON, you can safely write to the inner items. (For OPC servers that expose the inner members.)