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

9 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 2 de Nov. de 2022
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).

Más respuestas (0)

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by