Why does the code generated using the 'Build subsystem...' with Real-Time Workshop 5.1 (R13SP1) use the default step size instead of the specified step size?

The code generated using the 'Build subsystem...' with Real-Time Workshop 5.1 (R13SP1) uses the default step size instead of the specified step size.
The default step size is (Tstop - Tstart) / 50.
This problem only occurs if the solver is set to fixed-step, subsystem contains only continuous time blocks with inherited sample times, and the subsystem does not contain a continuous state.

 Respuesta aceptada

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This is a bug in Real-Time Workshop 5.1 (R13SP1) in the way that subsystems are built with fixed-step solvers.
To work around this issue, try adding a 'dummy' discrete state to the model, or specify a discrete step size for all of the blocks. As an example of a dummy state, connect a Ground to a Unit-delay to a Terminator then set the sample time of the Unit Delay block.

Más respuestas (0)

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Centro de ayuda y File Exchange.

Productos

Versión

R13SP1

Community Treasure Hunt

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

Start Hunting!

Translated by