Writing a TLC file

15 views (last 30 days)
Zachary
Zachary on 15 Jun 2012
I have a S-function that needs to be inlined, so I need to be able to write a tlc file. I already have a c file for this s-function and I was wondering if there was at least a semi-simple way to begin transfering this code to a tlc format. (At least I think that's what needs to happen). If not, where can I find a decent tutorial that can get me started on how to write tlc files because I know this is not going to be an easy process. Thanks!

Accepted Answer

Guy Rouleau
Guy Rouleau on 15 Jun 2012
I would start with the documentation page "Inlining S-Functions with TLC":
Another approach, if you have the algorithm written in C, is to use the S-Function Builder block or the Legacy Code Tool to wrap your code with an S-Function. Those 2 features can generate a TLC file automatically to inline the s-function.
  2 Comments
TAB
TAB on 18 Jun 2012
"Legacy code tool" is the best option for integrating external code.
Below links could be useful for you
External Code Integration : http://www.mathworks.com/help/toolbox/rtw/ug/br52_85.html
Integrate External Code Using Legacy Code Tool : http://www.mathworks.com/help/toolbox/rtw/ug/bq4fyia.html#bq4f0vq
Integrating Existing C Functions into Simulink Models with the Legacy Code Tool : http://www.mathworks.com/help/toolbox/simulink/sfg/bq4g1es-1.html#bq4g1es-17
sai kamal sreeja veepuri
sai kamal sreeja veepuri on 12 Jan 2018
After generating the sfunction using legacy tool, when I was trying to build the model, it complains that it cannot find tlc file. How do I include tlc file?

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!