OPC UA Endpoints error
3 ビュー (過去 30 日間)
古いコメントを表示
Alex Serrat
2022 年 3 月 23 日
回答済み: MathWorks Industrial Communication Toolbox Team
2023 年 9 月 25 日
I am trying out the Industrial Communication Toolbox in matlab to read the datapoints from an OPC UA server running in my PLC. I used the demoUA_browsing file to test, but it gives me errors. The hostname is the IP address of my Beckhoff PLC (which works).
serverList = opcuaserverinfo('opc.tcp://hostname:4840')
responds with:
serverList =
OPC UA ServerInfo 'TcOpcUaServer@hostname':
Connection Information:
Hostname: 'hostname'
Port: 4840
Endpoints: [0×0 opc.ua.EndpointDescription]
Security Information:
BestMessageSecurity: Unknown
BestChannelSecurity: Unknown
UserTokenTypes: {1×0 cell}
but it is not able to retrieve the endpoints... Due to that when I then run the command:
uaClient = opcua(serverList)
I get the following error:
Error using opc.ua.Client/fetchEndpoints (line 684)
The operation timed out.
Error in opc.ua.Client (line 378)
[~, appName] = this(tI).fetchEndpoints;
Error in opcua (line 43)
uaObj = opc.ua.Client(varargin{:});
Error in demoUA_browsing (line 34)
uaClient = opcua(serverList)
I also have UaExpert to make sure that the communication is okay, and it is able to connect and read/write all the values. Any ideas?
1 件のコメント
Pete
2022 年 8 月 12 日
The server name returned from opc.internal.opcUaDiscovery findserver does not match the address in the original opc url. This can happen when the server url is an ipaddress and the server name is an actual name. For a Windows machine the ipaddress can be mapped to a server name in the file called hosts located in C:\Windows\System32\drivers\etc\. You will add something like:
xxx.xxx.xx.xxx <youropcusservername> # source server
That worked for me to resolve the endpoints.
回答 (1 件)
MathWorks Industrial Communication Toolbox Team
2023 年 9 月 25 日
This issue arises when the OPC UA Server includes certificates with endpoints that cannot be accessed by the client, particularly when the client connects through multiple interfaces.
You can find more info in the below MATLAB Answer:
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!