Hi everyone, I am currently trying to add a similar udt from TIA Portal to ignition, and although i followed the documentation, there was no indication of how to add structs inside the udt from an ignition prespective, does the dataset type mean "struct"? and how can i add the two structs "cmd" and "cfg" under the udt "udtConveyor" ?
Checkout the documentation
This is the documentation i checked, i don't know what type of tag should i use, derived or memory , ... it doesn't specifically indicate a conventional struct data type which will prompt me to add all items inside the structure, that's my problem
Those structs would be their own UDTs in Ignition. You need to define the child UDTs first, then add instances of them to the parent UDT.
Okay, and for those child udts, what type of tag should i have for the elemnts : bStart, bStop, ... etc ?
Booleans?
OPC tag if the source will be from an OPC server.
Yeah, i am using an OPC UA server from an S7-1500, actually i was following one of your previous posts on how to access udt data from PLC, topic link : OPC UA struct data type?
Ok, a little different strategy then. You still need to create the child UDTs first, but they need to use memory or derived tags as described in those other posts.
Tag types are described here.
There you can find out what the difference between them.
Yes, i changed to memory tags, i don't know which is better, derived or memo, but i am still unsure of how to make the connection between local ignition udts and the actual plc udts, gotta dive in a little bit deeper in your post!, sucks being a newbie lol
UDTs in general are useful because they can be parameterized.
You're going to end up using these parameters to device the OPC Item Path of the "source" OPC tags that are described in this strategy.
Our support guys can probably help you out with this if you get stuck.
So basically, i have created the udts in ignition and i don't quite understand the "OPC item path" part.
Usually, in the UDT, you create a parameter that defines the path to the root of the UDT in your plc. Lets call that parameter tagpath.
Say your PLC tag address architecture is something like this:
MyPLCUDT.HMIStartPB
MyPLCUDT.HMIStopPB
So in the Ignition UDT youll create members as an example:
StartPB
StopPB
Their OPC values will be:
{tagpath}.HMIStartPB
{tagpath}.HMIStopPB
When you create an instance of the UDT as a tag in Ignition, youll enter in the parameter tagpath for that tag the full OPC qualified text to the root of your PLC UDT. Something like ns=1;s=[PLCprovider]MyPLCUDT
I dont know what your exact tag path would be for your driver, but you can OPC browse and drag a tag into the tag database and use that as an example.
Once you do the above, each of your UDT members will resolve to the correct OPC path. For each instance of that type UDT, you just change the parameter value to point to the root of your PLC UDT tag.
Thank you for the instruction, i have followed the steps, here is what i got in ignition :
This is how data is structured in the PLC :
Now, when i try to make an instance of the udt in igntion, i managed to the enter in tagpath parameter, the full text OPC path and still got an error
I would avoid parameter names like "tagpath" to be honest, as it clashes with pre-existing nomenclature and it isn't very explicit in what it's value is supposed to be. For something like a parameter for a UDT name in a PLC, I have used "DeviceName", although I've since regretted not associating it with the PLC, so I would tend more towards "PlcUdtName" or similar now to be explicit about what it's expecting.
Did you set those opc item paths via the tag editor or via find/replace of the tag JSON and importing it back?
The latter option will not create the bindings for you when you import it.
Can you show a screenshot of your udt instance that includes the Parameters expanded as well as one of those tags expanded, with the opcitempath in view? (or just paste the tag JSON of the udt instance here - Right click on the instance, Copy JSON)
Edit:
oh wait, you created a "param.tagpath" inside the PLC UDT, not inside the Ignition UDT. This is the issue, you will need to add the parameter into Ignition's UDT definition, not to the PLC.
I'd also recommend that you look at the (free) Inductive University
Also, it appears your parameter is declared as an int. Would be a string in the ignition udt.
Thank you for your reply, i have corrected the udt in PLC, and removed the param tagpath as shown below :
However, in ignition this is how i created the udt :
Do you mean, i need to create the param in this section here :
And if yes, how do i link this param to the root of the udt in the PLC, thanks
When you create a tag of type UDT, set the parameter DeviceName to point to the PLC OPC path root.
If youre unsure what that syntax is, use the tag OPC browser, navigate to that tag and temporarily bring it into your tag database. Then open one of the tags and copy the portion of the OPC path that you need that gets you to the CV-001 root.
The siemens.com doesn't look right.
Drag a tag like your startpb from the OPC browser into ignition and show that OPC path here.