Siemens S7-1500 - How to access nodes under the ServerInterfaces folder

Questions regarding the use of the ANSI C SDK for Server or Client development or integration into customer products ...

Moderator: uasdkc

Post Reply
nemethz
Sr. Member
Sr. Member
Posts: 10
Joined: 14 Mar 2017, 09:10

Siemens S7-1500 - How to access nodes under the ServerInterfaces folder

Post by nemethz »

Hi,

My app. is an OPC UA client that read PLC DB variables by their StringID.
But now, the new Siemens PLC-s are using a ServerInterfaces folder to publicate PLC variables.
I can read node values using the NumericID, e.g. NS4|Numeric|4.
These nodes has not StringID (?) and this is my problem, because the NumericID is dynamic, can changed on PLC/OPC UA Server restart, so cannot be used e.g. in ini files.
Can you suggest the solution for this?

Thanks!

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re: Siemens S7-1500 - How to access nodes under the ServerInterfaces folder

Post by Support Team »

Hi,

not knowing the Siemens PLC in detail, but my assumption is that they do NOT change the nodeID on PLC-restart. The only part that may change is the namespace index, and that is allowed. You should store the numeric nodeID and you should store the namespace URL table in your client-side ini file. With that you can check if the namespace URL shows up on same index after restart or not (in case it has changed, you can on the fly replace with the new index). If the complete URL dose not exist anymore, all the noes will not exist anymore anyways.

However, the nodeID itself may change when the PLC is reprogrammed or loaded with new different or updated PLC program. But that would be same if the nodeID would have been a string. If the interface was changed in the PLC, it will of course be different in the corresponding UA Server.

Same as with every programming language, if you change the signature of a function, it will be a breaking change in the API, and you must change the invoker side as well.
Best regards
Unified Automation Support Team

Post Reply