필터 지우기
필터 지우기

How to create a TLC file for my S Function?

조회 수: 8 (최근 30일)
David
David 2023년 6월 14일
댓글: Saba Hajhassan 2023년 7월 17일
My goal here is to use the embedded coder to convert my Simulink code to embedded C. However, when I try to do so with the Quick Start option, the embedded coder throws an error at me for an algebraic loop because the Mean block is not inline or something.
To resolve this issue, I replaced the Mean block with an S Function block. I already compiled my C script with the legacay_code matlab function, and MEX completed successfully.
But when I run the embedded coder now, it tells me my S Function is missing a TLC file.
How can I create a TLC file? Surely I don't need to write one from scratch......is there not a tool to generate one automatically based on my C code? Thanks

답변 (1개)

Shubh Pareek
Shubh Pareek 2023년 6월 15일
Have you tried this command ?, for creating the 'TLC' file.
legacy_code('sfcn_tlc_generate', specs)
Some refferences/resources -
  댓글 수: 1
Saba Hajhassan
Saba Hajhassan 2023년 7월 17일
I have the same problem, I have simulink model and inside this simulink model, there is a ''S-Function'' block which reads .m (matlab file). I want to build this simulink model in OPAL RT but I get the Error that I have to create a TLC file of the S-Function.
How exactly should I try this legacy command? Just in the Commadn Window of the code?
Could you please help me with that?

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

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by