I/O Register Access from S-Functions Limitation
Windows operating
system drivers can access I/O registers only from the real-time kernel
and not from the Simulink software. To prevent drivers from attempting
to access I/O registers from Simulink S-functions, enter code
fragments like the following as appropriate:
#ifndef MATLAB_MEX_FILE
/* we are in RTWin kernel, do board I/O */
#else
/* we are in Simulink, don't do board I/O */
#endif
 | Introduction | | Incompatibility with Win32 API Calls |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit