Compiled s-function blocks with step size less than simulation step size
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Luke
el 12 de Sept. de 2014
Respondida: Luke
el 12 de Sept. de 2014
Hi,
I'm working on a project where I need to use a compiled simulink s-function, which was designed to run with a step size of 0.025s. My 'base' simulation step size is 0.05s. If I try and run the simulation I get the following error:
The sample time period (0.025) specified for block 'mass_spring_comp/Mass-spring-damper/Mass-spring-damper_sfcn' is not an integer multiple of the fixed step size (0.05) specified for model
I've been trying to use rate transition blocks but without success. Is this possible?
I'm working in Simulink 5.1 (no choice about this unfortunately). Unfortunately re-compiling the blocks at the desired sample period isn't an option either. Is there any way I can reuse these blocks?
Thanks - any help is appreciated,
Luke
0 comentarios
Respuesta aceptada
Titus Edelhofer
el 12 de Sept. de 2014
Hi Luke,
sorry, but this won't work. There is no way to have a block with a sample time lower than base sample time. Only way out is the opposite: lower fixed step size to 0.025 and use sample time of 0.05 before and after the s-function.
Titus
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!