| Contents | Index |
After you write the driver S-function and create the S-Function block, optional block mask, and MATLAB file for it, be sure to:
Check the text of each error message for clarity and spelling.
(Optional) Use a coding standard indentation such as four or eight spaces with no tabs.
Copy your new blocks into a custom directory with a unique name.
To enable your new blocks to be viewable in the Simulink Library Browser, see Creating a Custom Driver.
Test the driver for the following:
Run the mex command on the driver to build the driver for simulation and code generation.
Verify the hardware I/O under as many conditions as possible.
![]() | Cross-Block Checking | Sample Driver Mask | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |