User`s guide
Advanced Troubleshooting
12-23
• http://www.mathworks.com/support/solutions/data/31528.html
• Existing xPC Target device driver source code. Refer to the following
directory:
MATLABROOT\toolbox\rtw\targets\xpc\target\build\xpcblocks
• In the include directory of the device driver source code area, pay particular
attention to the following files:
-
io_xpcimport.h
- pci_xpcimport.h
- time_xpcimport.h
Before you consider writing custom device drivers for the xPC Target system,
you should possess
• Good C programming skills
• Knowledge of writing S-functions and compiling those functions as C-MEX
functions
• Knowledge of SimStruct, a MATLAB Simulink C language header file that
defines the Simulink data structure and the SimStruct access macros. It
encapsulates all the data relating to the model or S-function, including block
parameters and outputs.
• An excellent understanding of the I/O hardware. Because of the real-time
nature of xPC Target, you must develop drivers with minimal latency. And
since most drivers access the I/O hardware at the lowest possible level
(register programming), you must have a good understanding of how to
control the board with register information. Indirectly, this means that you
must have access to the register-level programming manual for the device.
• A good knowledge of port and memory I/O access over various buses. You
need this information to access I/O hardware at the register level.