TLC debugging without Simulink Coder (RealTime Workshop)

조회 수: 2 (최근 30일)
MIchael
MIchael 2011년 12월 28일
답변: Juan Reyes 2016년 6월 30일
Dear All,
I would like to debug a TLC file for an S-Function, written in C. However, I don't have the Simulink Coder (Real-Time Workshop) at hand. It would help me a lot if I could implement a standard output function, such as 'stdout' in C, but this seems not possible in TLC.
I also tried to run my model in Rapid Accelerator mode without a TLC file, but the results are different from those at Normal Mode. I suspect this is because of the missing TLC file (with user code wrapping)?
I would be glad if someone could give me a hint.
Cheers,
Michael

답변 (2개)

Kaustubha Govind
Kaustubha Govind 2011년 12월 29일
It's not easy to guess what's going wrong with the available information - something about the way the S-function is written probably causes this. You can add printf statements to the TLC file, so that they are produced in the generated code if you need to print debugging information.

Juan Reyes
Juan Reyes 2016년 6월 30일
Just to make it clear. Do you have your own .tlc file? if yes, try this in your tlc.
{
%selectfile STDOUT
### Your desired print.
%closefile STDOUT
}

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by