Generate a shared library for interfacing to a simulator that runs on your development computer. Generate the shared library by using the system target file
Open the example model
rtwdemo_shrlib is a single-rate discrete-time model.
In the model, an 8-bit counter feeding a triggered subsystem is parameterized with constants
Model I/O is
Amplifier subsystem amplifies the input signal by a gain factor
The output signal is updated whenever signal
equal_to_count is true.
The shared library generated from this example can be dynamically loaded from another application.
The example application
rtwdemo_shrlib_app.c includes code for dynamically loading the shared library file.
View the configuration on the Code Generation tab of the Configuration Parameters dialog box by clicking the yellow button in the model.
Build the model and run an example application that uses the generated shared library by double-clicking the blue button in the model.
View the source code by clicking the white buttons in the model.
For more information about using a shared library, see Package Generated Code as Shared Object Libraries.