xpcimports.h not found error when compiling a Simulink Model with s function

5 次查看(过去 30 天)
Hi!
I get an "Could not find include file xpcimports.h" error when I try to compile a model that includes in C written s functions.
Basically the Model runs well in simulation without any error. If I compile it (without any xpc-blocks) i get a an .exe file without problems aswell.
As soon as I include a xpc target scope the mentioned error appears. I tried to change RTW system target file from grt.tlc to xpctarget.tlc as I found in another question, which does not solve my problem.
I tried to compile on 32bit-Matlab R2010b (win 7 pc) as well as R2009b (win xp pc) each with Microsoft Visual Studio Compiler Vs.8.
I have also tried to add the xpcimports.h manually into the sfunction header files but it did not work either.
Is there something basic i miss? and place to define the sfunction within matlab/simulink to compile them correctly?
The sfunction I am trying to use has already been used by a former colleague, I just do not get it compiling.
If you miss any information or have any idea or hint, I would appreciate any response.
best regards Nicolas
EDIT: Example problem: 1. take as an example model with s functions: open_system([matlabroot '/toolbox/simulink/simdemos/simfeatures/sfcndemo_runtime.mdl']); 2. save under new name in current matlab folder 3. add xpctarget scope block --> running simulation works --> compiling does not work misses xpcimports.h
what did i miss to do?

回答(1 个)

Sebastian
Sebastian 2011-12-23
Please try to run any of the shipping demos in xPC Target, e.g.
>> xpctank
Does this build fine? According to the reproduction steps you mentioned still the step to configure the model for xpctarget.tlc is missing.
Then try to add an S-function block to the xpctank demo model. Does it still build fine?

类别

Help CenterFile Exchange 中查找有关 Model Preparation for Real-Time Simulation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by