-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing OPCUA nodes on Siemens S7-1200 using signal names #137
Comments
I have never tried it with an S7-1200... When using UAExpert, the correct string identifier appears in the node details window. That declaration uses the same notation as the link data in the EPICS record: |
Yes, I know. I have tried all the combinations below (longin record), SSA1 is a subscription name set in opcuaSubscription()):
and for the opcuaItem record:
|
Can you share what the "Counter" looks like in the details window of UAExpert? |
Thanks, that made it clear. The EPICS records need to be configured with the NodeId. The names that you are trying to use are the "BrowseName" or "DisplayName" attributes of a node. They form a hierarchical graph that is used when browsing the server - that's what is shown in the "Address Space" view. However, the hierarchical BrowseName is not unique - that's why it can't be used to identify a node.
(Source: https://reference.opcfoundation.org/Core/Part3/v104/docs/5.2.4) I am reluctant to allow using BrowseNames in the EPICS links because of that restriction. Instead, please consider switching your S7-1200 to use string type NodeIds. This seems possible, although not trivial. (https://support.industry.siemens.com/cs/document/109793221/how-do-you-change-the-node-id-identifier-type-of-the-nodes-in-the-s7-1200-opc-ua-server-from-numeric-to-string-?dti=0&lc=en-US) |
Thanks Ralph for a really good explanation. I will try to set-up the string NodeIds in my PLC and will report here on how it worked out. |
Great. I'll be interested to know how it went. |
After changing the identifierType to String (using Method 1 described in https://support.industry.siemens.com/cs/document/109793221/how-do-you-change-the-node-id-identifier-type-of-the-nodes-in-the-s7-1200-opc-ua-server-from-numeric-to-string-?dti=0&lc=en-US I can access the PVs using ns=...;s=... scheme. If there is any advantage of using opcuaItem record instead of "flat" addressing I will dig in further otherwise I will leave it as it is. |
Did you get the user-defined structures working eventually? Siemens says (and we agree) that using structures has a big performance benefit. If you have many data items (thousands and more), updating a single structured node is 10-100x more performant on the PLC side compared to getting the updates using a separate node for each element of the structure. My colleagues are running into the same issue right now (they switched to string node IDs, but structures don't work). |
No, it doesn't work and I haven't spent more time on it. My current application uses a few tenth of data items so it doesn't matter too much now but in the future it would be good to use the more efficient mode of communication. Good luck! |
I've been trying to access OPCUA nodes using the identifierString in INP/OUT record fields (s=...) but always got "BadNodeIdUnknown" error. I've tried different syntax (with and without escaped quotes as shown in "EPICS Support for OPC UA - Cheat Sheet.pdf" and including or omitting the first part of the name: SSA (ns=4,i=1).
I wonder if using identifierString is supported in S7-1200 and I just used the wrong syntax. Accessing the data exposed to the OPC UA server on S7-1200 using identifierIndex works fine so it's not a big problem although I would prefer to use the names instead of numbers to identify the data.
In the PLC the exported data looks like below:
In the UAExpert the same data looks like this:
The text was updated successfully, but these errors were encountered: