How do I make a Signal Builder block in Simulink start from t = 0 when the simulation time is not t = 0?

14 views (last 30 days)
How do I make a Signal Builder block in Simulink start from t = 0 when the simulation time is not t = 0?
I would like to use a Signal Builder block to generate a signal from within an enabled subsystem. I would like the Signal Builder block to start at t=0 when the block is enabled though. Currently, when the Signal Builder block is enabled at, say t = 5 seconds, the Signal Builder block starts out partway through the sequence I constructed. Is there a way to make this start at t=0 whenever the subsystem is enabled? Is there an alternate way to do this?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Apr 2017
The ability to make the Signal Builder block start from t = 0 when it is enabled and the simulation time is not t = 0 is currently not available in Simulink. This is a limitation of all Simulink sources, not just the Signal Builder block.
Currently, to work around this issue, you can manually construct a solution in a similar manner as follows:
1. Export the Signal Builder data to the workspace (File\Export to Workspace) and save it to a .mat file
2. Use the data as parameters in a lookup table block.
3. In the enabled subsystem use an integrator with resettable states fed by a constant 1 to record the time since the block was enabled.
4. Feed the integrator output into the lookup table block.

More Answers (0)

Categories

Find more on Schedule Model Components in Help Center and File Exchange

Products


Release

R13SP1

Community Treasure Hunt

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

Start Hunting!