Why does my Real-Time Workshop 6.0 (R14) generated S-function not inherit sample times?

1 view (last 30 days)
I have a model with a subsystem that inherits sample time. When I generate an S-function from this subsystem, the resulting S-function should inherit sample time as well. However, when I use this S-function in another model, it does not inherit its sample time. Instead, it uses the compiled sample time of the original subsystem.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The ability to generate an S-function that uses the compiled sample time of the subsystem is not available in Real-Time Workshop 6.0 (R14).
To work around this problem, do one of the following:
1. Use a Model Reference block instead of an S-function to achieve portability between models.
2. In the Configuration Parameters > Solver pane, set the Periodic sample time consraint parameter to "Ensure sample time independence". The Periodic sample time consraint parameter is available when the Type parameter is set to "Fixed-step".

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!