developing inline s-function driver block
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Kaustubha Govind
am 11 Nov. 2011
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 Kommentare
Kaustubha Govind
am 14 Nov. 2011
Answered on your new question: http://www.mathworks.com/matlabcentral/answers/21172-passing-information-parameters-from-simulink-to-embedded-code-generated
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Target Language Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!