| Target Language Compiler | ![]() |
The TLC Wrapper
TLC is able to handle port inputs and outputs via the following functions.
%assign u = LibBlockInputSignal(0, "", "", 0) %assign y = LibBlockOutputSignal(0, "", "", 0)
Copy the wrapsfcn_assign.tlc file to wrapsfcn.tlc and try to create the inlined S-function wrapper.
Note that this also requires you to add the following options to the model's parameters.
set_param('wrapper/S-Function', 'SFunctionModules', 'wrapfcn');
Use the SFunctionModules parameter to inform the RTW build process that it needs to compile and link with wrapfcn.c. See the Simulink book Writing S-Functions for more information about S-function modules.
| Exercise | Solution | ![]() |