Matlab executable throws error in opc.ua.Client
조회 수: 5 (최근 30일)
이전 댓글 표시
I used MATLAB Compiler (2022b) to deploy a small algorithm that grabs data over the matlab opc-ua interface. So i used the icomm\opc...On the computer where i have all the toolboxes the executeable can be run without throwing an error. But when i run it on another computer, where i installed the 2022b runtime i get the following error-stack:
file: C:\Programm Files\MATLAB\MATLAB Runtime\R2022b\mcr\toolbox\icomm\opc\opc\+opc\+ua\Client.m
name: Client.Client
line: 386
I tried it on severals pc´s, only when there is also a matlab license of the toolbox containing the opc-ua it works.
Can someone please give me a hint how i can solve the problem.
댓글 수: 4
Steven Lord
2024년 9월 8일
Can you show the code for the method in which you create the opc-ua connection?
답변 (2개)
Image Analyst
2024년 9월 8일
편집: Image Analyst
2024년 9월 8일
Try including that file explicitly in your compilation, something like
mcc yourapp.m -a " C:\Program Files\MATLAB\MATLAB Runtime\R2022b\mcr\toolbox\icomm\opc\opc\+opc\+ua\Client.m"
but actually you must change the path to what it is on your computer, not the target computer, so it will find it.
댓글 수: 4
Image Analyst
2024년 9월 9일
I don't know what that thing is. It's not something that shows up as an applet inside MATLAB is it? Does it have it's own GUI? Because I think applets on the Apps tab of the tool ribbon cannot be included in a standalone executable. Otherwise I'd try to recompile with the latest R2024a and try that. If that doesn't work, call tech support.
Stefanie Schwarz
2024년 9월 16일
The error in line 386 of "opc.ua.Client" indicates that there might be an issue with resolving the OPA UA endpoint hostname. See the following MATLAB Answer for more info:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!