Why do I get a build error when generating code from an S-Function block created from a Subsystem containing Simscape and SimDriveline blocks?

I am working on a Simulink model which has an S-Function block that was built from a subsystem with SimDriveline blocks. This was done by right-clicking the subsystem and selecting 'Code Generation -> Generate S-Function'.
This S-Function block runs fine when simulating the model. When I try to generate code from this model, though, I get the following error:
Missing file drive_std.h: No such file or directory.
I tried including this header file in the Configuration Parameters, but this only led to other missing files.

 채택된 답변

In Simulink 7.9 (R2012a), S-function Target is supported with SimMechanics models or subsystems, but not with Simscape software. Converting a SimMechanics subsystem to an S-function block allows you to run a model with Simulink alone.
There are no workarounds.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

릴리스

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by