Real-Time Workshop    

The S-Function Target


S-functions are an important class of target for which Real-Time Workshop can generate code. The ability to encapsulate a subsystem into an S-function allows you to increase its execution efficiency and shield its internal logic from inspection and modification. Here we describe the properties of S-function targets and demonstrate how to generate them. For further details on the structure of S-functions, see Writing S-Functions in the Simulink documentation.
Introduction
Overview of the S-function target and its applications
Creating an S-Function Block from a Subsystem
How to extract a subsystem from a model and use it to generate a reusable S-function component; a step-by-step demonstration
Tunable Parameters in Generated S-Functions
How to declare tunable parameters in generated S-functions and how they differ from those in other targets
Automated S-Function Generation
Step-by-step instructions for automatically generating an S-function from a subsystem
Restrictions
Limitations constraining the use of the S-function target
Unsupported Blocks
Blocks not supported by the S-function target
System Target File and Template Makefiles
Control files used by the S-function target



  Compiler Options Introduction