필터 지우기
필터 지우기

Simulink Real Time : xPCLoadApp() : Error : Could not load model Mdl: 2

조회 수: 2 (최근 30일)
hugo chivard
hugo chivard 2018년 6월 6일
답변: Pablo Romero 2018년 12월 20일
Hello,
I'm actually working on a project of HIL simulation and I have to use the C++ API of Simulink Real-Time. Every function of this API work except xPCLoadApp() and I don't understand why...
I'm trying to load my application on a Speedgoat Baseline S. This application is named Mdl.mldatx and this file is placed in my current folder.
Then, I'm using this C++ code :
xPCInitAPI();
targetPort = xPCOpenTcpIpPort("192.168.7.1", "22222");
xPCLoadApp(port, "nopath", "Mdl");
cout << xPCGetLastError() << endl;
When I execute this code I've code the number code 900 corresponding to the error message "Malformed message" and I don't understand what it means. Moreover I've got the error message, put in attachment, on the target screen.
Thanks for your help !

답변 (1개)

Pablo Romero
Pablo Romero 2018년 12월 20일
Hi Hugo,
I recommend you to use the MATLAB API for C++ to work with Simulink Real-Time and Speedgoat. Thus, you will not only be restricted to the SLRT API but also to any other MATLAB function via the same API.
Hope this helps.
Pablo

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by