C Caller Block with Simulik Real time R2022b

조회 수: 3 (최근 30일)
Daniel Vicca
Daniel Vicca 2022년 10월 15일
댓글: Daniel Vicca 2022년 10월 17일
Hello,
I have a problem when I try building a model with C caller block in it for Simulink Real Time target (slrealtime.tlc).
The function implemented in the C code is "not declared" even if the same model is built successfully with the old simulink real time slrt.tlc (R2019a). As soon as I remove the C caller Block the exe file is generated for my Hardware in the loop machine.
P.S. I had the same problem with R2021a release but it works when I try builing the model for a generic target (grt.tlc)
Anybody has any idea how to fix it?
Thank you for your help
Regards
Daniel

답변 (1개)

Dimitri MANKOV
Dimitri MANKOV 2022년 10월 17일
Hi Daniel,
Have you checked these suggestions when updating to R2020b and later? There's a number of differences in Simulink Real-Time between R2020a & earlier and R2020b & later which need to be taken into account in your code.
I hope this is helpful!
Dimitri
  댓글 수: 1
Daniel Vicca
Daniel Vicca 2022년 10월 17일
Hi Dimitri,
thank you for your answer. Yes you are right, many things changed from the previuos release. I just fixed this problem:
I had to rename the file extension of the file called by the C Caller Block from .c to .cpp and everything works as before ( with the old simulink real time).....It seems like the C++ compiler of the new Simulink Real time doesn't accept the .c extension file....it is weird but that was I have experienced.
I hope this can be helpfull to somebody else
Regards
Daniel

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

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by