How to use SIL simulation with a simulink model containing continous blocks.

17 次查看(过去 30 天)
I generated C code from simulink model with embedded coder and tried to verify the C code with SIL maneger.
Then, I get error code(listed at last).
I suppose that the cause of this error is using continus blocks in simulink model.
Is there any way to use continus block when verifing with SIL.
(What does "the SIL or PIL component boundary" mean?)
error:
The model "subsystem" contains a continuous sample time, which is not supported by SIL or PIL simulation mode. To avoid this error you should update the model so that there are no continuous sample times crossing the SIL or PIL component boundary.

采纳的回答

Fangjun Jiang
Fangjun Jiang 2022-11-2
You could run the whole model in SIL or PIL. Or you could select a subsystem, right click, replace it with a SIL or PIL component. This subsystem would be "the SIL or PIL component boundary".
The discrete code to simulate a continuous block depends on the solver. The message says continuous sample time is not supported by SIL or PIL simulation mode. You have to convert some of the continuous blocks (such as Integrator, transfer function, etc) into its descrete version first (discrete integrator, discrete transfer function).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Verification 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by