Why does my generated S-function have incorrect sample times when generated from a subsystem using the Real-Time Workshop?

Why does my generated S-function have incorrect sample times when generated from a subsystem using the Real-Time Workshop?
I have a subsystem which has signals with multiple sample rates for its input. I generate an S-function from the subsystem. I then replace the subsystem with my generate S-function. When I simulate, I receive the following warning:
Warning: Inconsistent sample times. Sample time of signal ([0, 0]) driving input port 5 of block
'untitled1/BusSystem1/BusSystem1_sfcn' differs from the expected sample time at this input port
([1, 0]).

 採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
This has been verified as a bug in the Real-Time Workshop in the way that subsystems with multiple sample rate inputs are generated to S-functions.
Currently, to work around this issue, try using a Bus Selector block which outputs signals with the same sample rate as the input to the subsystem to be compiled. Compile only the single rate subsystem.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

製品

リリース

R13SP1

Community Treasure Hunt

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

Start Hunting!

Translated by