Main Content

Custom Code and Hand Coded Blocks using the S-function API

This library launches examples of different types of Simulink® S-functions. Simulink S-functions allow you to extend Simulink with new hand coded blocks, interface to custom external code, and create live interfaces to other programs. Use this example to access models containing S-functions in the C, C++, M, and Fortran.

Each example contains a model that exercises an S-function block and a link for editing the S-function code. You can also access the main S-function file by using the Edit button on the S-function block dialog In some of the models, use Look Under Mask to access the S-function. Additionally, the S-function Builder block is a masked version of the S-function block. The block includes an editor that builds an S-function out of a core algorirthm.

By default, the S-function Builder also creates a TLC file for use with Simulink® Coder™ and Embedded Coder™.

See Also

|

Related Topics