Borrar filtros
Borrar filtros

OPC UA - Connect MATLAB as Client to an OPC UA Server

20 visualizaciones (últimos 30 días)
Suria Reddy
Suria Reddy el 26 de Sept. de 2019
Editada: Shubham el 25 de Sept. de 2023
I want to connect MATLAB as Client to an OPC UA Server . The OPC UA Server is hosted by the software FillControl by PRIAMUS.
I can connect the Server with the UaExpert Client from Unified Automation and read my measurement data from the nodes.
So far it works.
But now I want to use MATLAB as Client and read the measured data from FillControll Software directly via OPC UA into MATLAB.
How can i configure the server acces data in MATLAB?
  • Endpoint URL(s): opc.tcp://
  • User: ******
  • Password: ********
Is it possible to make the connection in MATLAB or do I need an Local Discovery Service (LDS)?
  2 comentarios
Suria Reddy
Suria Reddy el 26 de Sept. de 2019
If I try to connect to the first server found on the localhost, I get the error message below.
sInfo = opcuaserverinfo('localhost');
uaClient = opcua(sInfo(1));
Warning: Some endpoints could not be retrieved:
PRIAMUS FillControl OpcUa Server: A low level communication error occurred. Ensure that server host is reachable.
> In (line 66)
In opcuaserverinfo (line 27)
Reyhane Mokhtarname
Reyhane Mokhtarname el 24 de Sept. de 2020
Dear Suria
I have the same problem, did you find any solution for that?

Iniciar sesión para comentar.

Respuestas (2)

Timo Schmid
Timo Schmid el 6 de Oct. de 2019
I do have the exact same problem.
Please let me know as soon as you found a solution.

Shubham el 29 de Ag. de 2023
Editada: Shubham el 25 de Sept. de 2023
In MATLAB, you can establish a connection to an OPC UA server using the ICOMM Toolbox. Here's an example of how you can do it:
% Create an OPC UA client object
obj = opcua(serverUrl);
% Connect to the OPC UA server with optional username and password
connect(obj, username, password);
In this code snippet, URL of your OPC UA server. The "opcua" function creates an OPC UA client object, and the "connect" function establishes a connection to the server. You can provide an optional "username" and "password" if your server requires authentication.
For more detailed information on using the OPC Toolbox in MATLAB, you can refer to the official documentation:





Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by