I have a UDT in my S7-1500 CPU and an NxN array instance (square matrix) of it in a global data block (this is the configuration in the data block: myPlcMatrix, Array[1…3, 1…3] of “myUdt”).
I have an OPC UDT definition in Ignition Designer, the same as in the PLC.
I want to create a tag in Designer (calling it myDesMatrix) that can read/write data from/to the PLC.
Is it possible to create a Dataset of my designer UDT? From what I know about data sets is that each row/column entry must be a primitive tag (not supporting structured tags…aka UDTs). Is this true?
I created a new tag by browsing the PLC, selected myPlcMatrix instance and edited Data Type from String to DataSet but instead of a 3x3 data set (which is what I was hoping for) I end up with a 9R x 1C data set…not exactly what I want…and each row is a String data type.
Is it possible to nest a data set inside a data set?
I guess knowing what I want to do would help:
1 Display information from my udt in a NxN table
2 Perform matrix calculations (such as multiplication, inversion, determinant etc.) on specific
values within udt in the matrix.
I’m really hoping I don’t have to do this the hard way…as in creating a derived tag of data type string array (in this case I’d need 3) and bind it to one of the string values in the data set then parse the string for the specific data I want…or even create a new data set for the specific information I need and create a derived tag data set using an expression (or custom script) to parse the bound tag…each for which I have to figure out which of each 9 rows in the data set match the n x m matrix element…
This is getting complicated. Do you know of a better approach?
Thank you!
Ted.