Writing S-Functions | ![]() ![]() |
S-Function Module Names for Real-Time Workshop Builds
If your S-function is built with multiple modules, you must provide the build process names of additional modules. You can do this through the Real-Time Workshop template makefile technology, or more conveniently by using the set_param
MATLAB command. For example, if your S-function is built with multiple modules, as in
mex sfun_main.c sfun_module1.c sfun_module2.c
then specify the names of the modules without the extension using the command
set_param(sfun_block,'SFunctionModules','sfun_module1 sfun_module2')
The parameter can also be a variable as in
modules = 'sfun_module1 sfun_module2' set_param(sfun_block,'SFunctionModules','modules')
or a string to be evaluated (this is needed when the modules are valid identifiers).
set_param(sfun_block,'SFunctionModules','''sfun_module1 sfun_module2''')
![]() | Noninlined S-Functions | Writing Wrapper S-Functions | ![]() |