Customs block API creation using TFL

Hi,
I have created API for all individual arithmatic block like ADD,SUB etc..
I like to know can we able to create the customs block like combination of ADD and SUB for 3 inputs for that i will write an respective API. Is it possible to do this in TFL
Please help!!!
Thanks and Regrads, Nithin

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2012 年 5 月 18 日

0 投票

TFL is used to replace operators like +, -, etc. or basic math functions like sin, cos, etc. It appears that you need to build a custom block, for which, you can create a new Simulink block by writing an S-Function. You can provide a TLC file to call into your API - see Inlining S-functions to find out how the TLC file is used for generating code from the S-function.

3 件のコメント

NithinRaj
NithinRaj 2012 年 5 月 19 日
Currently i'm using TLC only to generate the code for my Custom block. But problme is there are lots of constrain there are to take care of those block if i use this TFL i feel will be more better .
NithinRaj
NithinRaj 2012 年 5 月 19 日
And also one more Constrain is i may not no how many be exits in my desing model, how to replace that also.. If I use it in TFL way, no need to consider about the usage of customs block in model.
Kaustubha Govind
Kaustubha Govind 2012 年 5 月 21 日
Unfortunately, as I explained earlier, I don't think TFL will solve the issue of replacing functions other than the ones listed in the documentation. Perhaps you can talk a little more about the constraints you are facing with the S-function+TLC approach? Sorry, I don't understand your second comment about not knowing the number of exit points. Perhaps you can start a new question and specify examples to help us understand the issue better.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

製品

タグ

質問済み:

2012 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by