Siemens S7-1200 OPC UDT error

I have a S7-1200 PLC with a data block containing several UDTs.

OPC communications to the PLC are working and I can read individual elements from any UDT or other data point. I have re-created the UDT in ignition, ready to be populated.

When I drag the UDT from the OPC browser into the Tag browser, I get a new tag with the “document” data type as expected. However, ignition reports a value of “Error_Configuration”. I had expected a text string (dictionary?) that I could query for data to populate the elements of the UDT.

I have read several related posts on this forum, but I have not found the answer. What am I doing wrong? Any help would be great.


1 Like

I have just tried re-configuring the OPC server without the “data block 1” object, only VFD001 and VFD002. The result is the same.

As we discovered in this post the Server Interface method cannot be used, I think because the server does not include datatype definitions in the datatype dictionary for this area.

I have reached out to a contact I have at Siemens to confirm.

Ok - This makes sense. I will have a go using the “Companion specification” method and report back. If this doesn’t work, I will have to revert to using the Siemens driver which works very well with UDTs as long as the data blocks are not “optimized”.

Thanks for the rapid reply.

I have just upgraded my S7-1200 to firmware V4.5.2. I then set the PLC up with TIA V17.

I repeated the test and I am now getting a different result. “Decoding error”.

I have just tested the new OPC UA interface using the free client from Integration Objects.

The client is able to read data from the UDT. It returns a value of Byte[42].

From the testing ive done on S7-1200 PLCs it seems like UDTs added to the Server instance always has the same NS offset so in theory it should be possible to build the complete UDT object with a parameter where you define the “base NS address” and the tag paths in the UDT have an expression where it just increases the NS value by X depending on the position of the tag in the UDT on the controller.

I can’t confirm 100% that it works like that, but from what ive seen it looks like thats how it works on the 1200 server side.

Thanks. That is pretty much my plan once I am able to read the UDT using ignition.

I have updated Ignition and I am still unable to read UDTs or structs as a document datatype. I can read arrays. I tested the setup again, this time with the OPC UA client from UaExpert. I can read and write UDTs, arrays and struct data types on the S7-1200.

Any idea why ignition doesn’t seem to be working?

See last post here. Another user confirms that the S7-1200 OPC UA server on V4.5 firmware works with UDTs.
S7-1200 OPC UA problem - Entries - Forum - Industry Support - Siemens

When using the Server Interface option in the 1200 you are unable to read the entire object in ignition from my understanding, but if you as a test create a for example an integer in an UDT and point it directly to the integer value inside of the UDT in the PLC the tag will be populated. This means that if you point the 1st tag in your ignition UDT to the 1st tag in the PLC UDT you get the root NS address of the object and can calculate the offset from that.

I dont know if I explained this well enough but as you can see in the “OPC Item Path” it ends with i=4 in your screenshot. Replacing the 4 with a property you create called “RootAddress” or something similar you should be able to create an expression on the other tags inside your Ignition UDT for example “nsu=http://Server interface_1;i={RootAddress} + 1” or something similar.
I don’t remember the context exactly, but something like this should be possible as the addresses will keep the same offset in the PLC as long as you use the same UDT structure.

Thanks. I can read the entire UDT object, just not with ignition.

If I have to, I will resort to the addressing approach that you have described.

I am not sure why reading the entire UDT object doesn’t work in ignition on the 1200 PLC.
I struggled with the same problem. It seems like the Server Interface OPC method used in the 1200 and that is an option on the 1500 just has issues in general.

Ignition is able to read the entire UDT object from a 1500 PLC when using the other OPC server method built into the hardware, but this option is not available on 1200 PLCs sadly

My contact confirmed that Nodes created under the “Server Interfaces” are custom address spaces and on the S7-1200 the structures are only defined using a new attribute introduced in OPC UA 1.04 and are not defined by the presence of the legacy datatype dictionary mechanism in the address space.

This is why Ignition cannot read these structures as a whole on the S7-1200.

AFAIK if you don’t create custom address spaces and create the Nodes directly in the device (is this possible on the 1200?), while ensuring the “Legacy data type definitions” OPC option is enabled, you will be able to read whole strutures.

Thanks for investigating Kevin. As per Matthew’s post, I think that what you have described is only currently possible with the S7-1500 which has more OPC-UA options.

Is there a plan for adding the custom address space functionality/new attribute to ignition? I have only tested 2 free OPC-UA clients but they were both able to read the whole structures from the S7-1200.


It’s part of a long term plan to implement OPC UA 1.04 support (or probably 1.05 by the time we start) on a timeline that will likely be Ignition 8.2.

Ignition is currently OPC UA 1.03, which is why you can’t read these structures and even on the S7-1500 the “legacy datatype dictionary” option needs to be enabled.

Thanks @Kevin.Herron and @Matthew_Hunt. I will have to wait for Ignition 8.2!