FAQ 255: Implementing C-Coded S-Functions for RTI

Question

I want to implement a C-coded S-function for use with Real-Time Workshop/Simulink Coder/Real-Time Interface (RTI) and for Simulink simulations. Where can I find an S-function template and examples?

Do I have to compile this S-function to a MEX DLL file? Which MEX compilers are supported and recommended?

I want to include or exclude specific code segments from my S-function for either Simulink simulation or real-time simulation (e.g., to access hardware components of other platforms). How do I do this?

Answer

    " class="ds-tooltip-handler" data-tooltip-content="Download" data-tooltip-position="tc" target="_blank">Download
  • MISSING PDF PDF, English