Introduction
See...
For...
Developing S-Functions How to write MATLAB C-MEX S-functions (noninlined S-functions).
Note the following references in this guide:
• “S-Function Callback Methods — Alphabetical List” the Simulink
software invokes these methods w hen simulating a model with
S-functions. Real-Time Workshop use s the same methods in
generated real-time a pp l ications.
• “S-Function SimStruct Functions — Alphabetical List” Contains
detailed descriptions of the function s that access the fields of an
S-function’s simulation data structure (
SimStruct). S-function
callback methods use these functions to store and retrieve
information a bout an S-f u ncti on.
Real-Time Workshop
®
Target Language
Compiler
How to write target language compiler (TLC) files to inline S-function
drivers. This is an optional reference and depends on whether or not
youchoosetoinlineyourdriver.
Real-Ti
me Workshop
User’s G
uide
Overall description of Real-Time Workshop fundamentals, and
guidelines on understanding I/O boards and low-level programming
for drivers for those boards.
MathWorks Consulting
You can
alternatively contact the MathWorks Consulting Services Group
about
the fee-based creation of a driver for your board.
Source Code
You c
an examine the source code for existing xPC Target device drivers as a
refe
rence for your custom drivers. Refer to the follo wing directory:
matlabroot\toolbox\rtw\targets\xpc\target\build\xpcblocks
Note In this directory, you might notice that some drivers u se outdated xPC
Target driver functions. For the current functions to use, see “xPC Target
Exported Functions” on page 1-6.
1-5
Comments to this Manuals