OPC UA fails to connect in Simulink but connects in Matlab

조회 수: 5 (최근 30일)
Shahab
Shahab 2023년 9월 20일
댓글: Srijith Vijay 2024년 3월 13일
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?

답변 (3개)

Sivapriya Srinivasan
Sivapriya Srinivasan 2023년 9월 25일
편집: Sivapriya Srinivasan 2024년 3월 1일
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 2024년 3월 1일
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 2024년 3월 12일
hello,I got the same problem,how do you solve it at last?thank you
  댓글 수: 1
Srijith Vijay
Srijith Vijay 2024년 3월 13일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Unified Architecture에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by