Siemens Array of Struct (configure, read & write)

How to configure a Siemens Array of Struct in Ignition 8.1?

I have created a UDT similar to the Struct, with an {offset} parameter.
To test, I try to instance a Data Type to the first element of the array (i.e. DB99.I100), so each Tag of the Instance gets the correct address of the Struct (i.e. DB99.DI102, DB99.I106, ...).

I get "Error_Configuration: ... The node id ... does not exist in the server address space" for each Tag.

How to address an array, and the tags of the struct of each element (read & write)?

I think they should use a comma after the DB number so
DB99,DI102 etc.

1 Like

Yes, sorry, there is actually a comma, the address of each Tag is still correct.

The instance of a single element of the array still gives "Error_Configuration",
then I will need to address all the elements of the array.

This should be correct then, issue with siemens driver is if one tag reads illegal memory it will error out the whole struct.

Maybe some better ways to do, but if you disable your whole UDT and reenable one tag at a time you'll find the one causing the issue.

Also check your logs, sometimes I've done this for ages and found S7ReadResponse. Error code = 8104 in my logs, if got this error cahnge the PUT/GET communication option in security in your PLC

At first I generated all the tags of an S7-400 PLC from a CSV to json with python.
They all work except one array of struct that was generated as single tags with absolute address.
I understood that i can map a struct to a UDT, but i think I miss how to point to array elements and where to actually configure that.

I heard that arrays are exposed by the Siemens Driver as a json structure, is it true? How to configure it to work?

No, anything to do with JSON or documents is when connecting to the built in OPC UA server on the 1200/1500.

The driver doesn’t know anything about structure or arrays. Everything is a scalar tag accessed by absolute addressing. If it’s part of a struct or array that is irrelevant.

Good, thanks!

So, as example, with ItemPath=[S7-400]DB99,DI96 I can read the value.

But, since DB99 +100.0 is one ARRAY[1..50] of STRUCT,
are you saying that with ItemPath=[S7-400]DB99,I100, (or DB99,DI102 ...) I should also correctly read the values?

I get "Error_Configuration: ... The node id ... does not exist in the server address space".

1 Like

Are you typing that address in manually or is it generated by UDT param or script? Are you sure there's no whitespace or non-ascii characters in it or something?

It looks syntactically valid but I can't see any other reason the driver would use Bad_NodeIdUnknown other than an address that doesn't parse.

If you set the log level of the logger you find searching "S7Address" to DEBUG it might have more info or even confirm if the problem is the address.

1 Like

There was a whitespace at the end, only in those tags, by coincidence!
Error parsing address indeed.
Thank you for the hints :wink:

1 Like