Hello,
I'm looking to utilize UDT's for implementing alot of Valves, Motors, Analog sensors,....
Lets say we have a UDT of the following structure:
Motor Struct
- Cmd Struct
- Fwd Bool
- Rev Bool
- Status Struct
- Standstill Bool
- Forward Bool
- Backward Bool
The way I look at it currently with some research on the forums and the web you have the following options:
You make an udt with the full UDT subscribed and save this in a Meta data Tag named Source and some parameters with the OPC Path looking like this:
- nsu=http://www.siemens.com/simatic-s7-opcua;s="{DB Name}"."{InstanceName}"
Then you make the struct of the UDT like you have in the PLC and get each value from the JSON in derived tags with
- Source Tag Path: [.]../../Meta/Source
- Read Expression: JsonGet({Source},"Cmd.Manual."+{TagName})
- JsonSet({Source},"Cmd.Manual."+{TagName},{Value})
The other possibility is just making the structure and adding the OPC path to each component.
This makes a subscription per member of the UDT -> Not optimal for big UDT's?
I'm currently testing the first option but I can't seem to be able to get the tags out of the Leased state when there are no views or clients open.
So my questions are these:
- Is it possible the setup with JSON read and write interferes with the Leased setting of Tag Group?
- What would the most optimal way be to config the UDT's with JSON or OPC UA directly for each member of UDT?
- When making template views in perspective i'm currently using path binding as it seems more optimized for big amounts of templates in a view, is this correct?
- Do you need to watch out for limits with the Tagproviders and Tag groups? Should you make a new one per x Tags?