s function usage error- code generation
3 ビュー (過去 30 日間)
古いコメントを表示
My s function is build with SfunctionBuilder block from already existing c source code & tlc file is also generated for it. It takes two nubers as input & output the sum of two numbers.
void add(unsigned char *ip_1,unsigned char *ip_2,unsigned char *result)
{
*result = *ip_1 + *ip_2;
}
I have integrated a matlab s-function in my model. I am getting following error while generating code, for the model.
Error: Simulink Coder Error in block: "one_mdl_extention/One Model/S-Function Builder", block type "S-Function": Block output output_1 uses custom storage class, level 2 but the compliance level of this block is only 1; use a different block or a different custom storage class, level 1 or lower
I have made a simple c function & used s-function builder to create s function, now how can i decide it is a level-1 or level-2 s function ?
What is causing this error ? How to resolve this error ?
why my c source code is converted into level-1 s function, by s function builder block ?
0 件のコメント
回答 (1 件)
Varun Bhaskar
2015 年 8 月 27 日
Hi,
There is a bug in Simulink 7.8 (R2011b) in the error message produced when advanced storage classes are used in blocks that do not support advanced storage classes. There are no workarounds. Are you working with R2011b?
2 件のコメント
Yuchen Chen
2017 年 12 月 5 日
Would you mind sharing what you did wrong? I keep seeing this error but could not find any hints anywhere. the wired thing is the error happens pretty randomly, I'm using exactly the same blocks in a couple similar occasions, the error showed several times, but not all the time.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!