OPC writing errors with jsonSet() in nested folders

I am hoping someone can point me in the right direction, or offer up some suggestions. I are attempting to write to a Siemens PLC over OPC using nested derived tags in UDT folder.
Root derived tags are good with read and writes but the nested tags will read fine but when written to, I get… Bad(“Bad_EncodingError: Encoding halted because of invalid data in the objects being serialized.”)

I feel like I’m missing something very basic, here’s the setup:

UDT Structure
_sourceOPC = JSON value for name/value and objects
Value Source = OPC
Data Type = Document
OPC Server = myOPC
OPC Item Path = myBrowsedPath
Derived_Tag1
Source Tag Path = _sourceOPC
Read Expression = jsonGet({source},“Tag1”)
Write Expression = jsonSet({source},“Tag1”,{value})
Folder
_sourceDerived = JSON value for Object1
Source Tag Path = _sourceOPC
Read Expression = jsonGet({source},“Object1”)
Write Expression = jsonSet({source},“Object1”,{value})
Derived_Tag2
Source Tag Path = _sourceDerived
Read Expression = jsonGet({source},“Tag2”)
Write Expression = jsonSet({source},“Tag2”,{value})

Error only occurs on Tag2 writes, Tag2 reads are good

Hello,

Do tag1 and tag2 have the same configurations? Are you able to write to tag2’s source tag path directly without involving the derived tag? If so, is it possible that there is a datatype mismatch involved?

I feel like it’s a syntax issue in the jsonSet() that is not accessing the object correctly in the parent JSON. In the image, the green writes works but the red does not. To test I created an “_OPC Object1” by browsing the Siemens OPC item path, drilling down in DataBlocksGlobal folder to structure. I confirmed that both the “_derived Object1 from sourceOPC JSON parent” and “_OPC Object1” have the same JSON.

_sourceOPC JSON parent value looks like:

  • [{
    “PLC Scan Value 1 PN_Lot”: “”,
    “PLC Scan Value 2 PN_Lot”: “”,
    “PLC_EDC Stock Counters”: { “Anchor Bolts”: 26981, “nextName”:0}},Good, Thu Apr 28 10:19:43 EDT 2022 (1651155583066)]

_derived Object1 from sourceOPC JSON parent :

  • Write Expression = jsonSet({source},“PLC_EDC Stock Counters”,{value})

derived Name1 from derived Object1

  • Write Expression = jsonSet({source},“Anchor Bolts”,{value})

Are my write expressions correct?

The expressions look fine to me, but troubleshooting the problem as a whole may require a closer look. I would suggest contacting support to get a more thorough investigation.

will do, thank you for your feedback