developing inline s-function driver block
5 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I'm developing inline s-function driver block. I have created the .c .tlc and .mex32 files, and I also created the necessary library. And I put all this files in Matlab path. But when I want to generate C files with RTW appears this error:
Error using ==> rtwgen --> Error in S-function myModel/model_DI': S-Function 'model_DI' does not exist.
If I put all the files in the WORK folder I don't have this problem but after I can't pass information from Model to generate files through function MdlRTW because then I have this error:
Error using ==> rtwgen Error in mdlRTW of S-function myModel/model_DI'. This function wrote 0 run-time parameters where as it has registered 4 run-time parameters.
Thanks in advance
0 件のコメント
採用された回答
Kaustubha Govind
2011 年 11 月 11 日
Did you add the S-function and corresponding TLC to a directory under the $matlabroot/toolbox folder by any chance? If yes, you may need to run "rehash toolboxcache" for MATLAB to recognize new folders under this directory structure. (Although it is recommended that you place your files outside of the MATLAB installation root, because it could get wiped during upgrades or at un-install) Once you have done that, run "which model_DI" to make sure that MATLAB finds the MEX-file.
Regarding the error about parameters - could you include some code snippets about how you're registering your run-time parameters and how you use them in your mdlRTW function?
2 件のコメント
Kaustubha Govind
2011 年 11 月 14 日
Answered on your new question: http://www.mathworks.com/matlabcentral/answers/21172-passing-information-parameters-from-simulink-to-embedded-code-generated
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Block Libraries についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!