OPC UA fails to connect in Simulink but connects in Matlab

5 Ansichten (letzte 30 Tage)
Shahab
Shahab am 20 Sep. 2023
Kommentiert: Srijith Vijay am 13 Mär. 2024
I am trying to access an Allen-Bradley PLC through OPC. The server (factoryview linx) is on a remote computer. I was able to connect to the server using Matlab commands but when I try to use Simulink "Industrial Communication" OPC Config block, I am getting the following error.
Does anybody have an idea how to fix this?

Antworten (3)

Sivapriya Srinivasan
Sivapriya Srinivasan am 25 Sep. 2023
Bearbeitet: Sivapriya Srinivasan am 1 Mär. 2024
Hi Shahab,
I understand that you are receiving an error indicating that the Simulink OPC Config block is unable to retrive the server list
This error message arises when the simulink model does not have necessary permissions to access the OPC Server
To resolve this issue you can try the following steps:
1.Make sure that the user running the Simulink model has the required permissions to access the OPC server.
2.Verify that the firewall settings on both the computer running the Simulink model and the remote computer hosting the OPC server allow communication over the required network ports
3.Since you mentioned that you were able to connect to the server using MATLAB commands, try using the same commands within a MATLAB script or command window to verify that the connection can be established successfully. This will help isolate the issue and confirm that the problem lies specifically with the Simulink OPC Config block.
Hope this helps!

Srijith Vijay
Srijith Vijay am 1 Mär. 2024
Hi Shahab,
Just a heads up, the "OPC Config" section in the Industrial Communication Toolbox is only compatible with the OPC DA protocol. Could you check on which OPC protocol the PLC is using? Is it OPC DA or OPC UA?
If you're working with OPC UA, you should be able to use the OPC UA MATLAB APIs within a MATLAB function block for PLC interactions in Simulink. This is because, as of R2023b, we don't have OPC UA blocks for Simulink.
But if it's OPC DA that's being used, make sure the DCOM settings are set as per the instructions on this page: Set Up Industrial Communication Toolbox Software for OPC - MATLAB & Simulink.

liang sen
liang sen am 12 Mär. 2024
hello,I got the same problem,how do you solve it at last?thank you
  1 Kommentar
Srijith Vijay
Srijith Vijay am 13 Mär. 2024
Hello Liang, to try to help you further, could you share more ino on your workflow?
  • What OPC UA server are you connecting to?
  • Are you using OPC DA or OPC UA communication?
  • Have you tried discovering/connecting to the server using the MATLAB APIs?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by