Event Functions

Customize default model Initialize and terminate methods

Model dynamic start up and shut down behavior by adding custom routines to the default model initialize and terminate methods. During simulation, control when the methods execute with events. Create functions to reinitialize (reset) blocks with initial values.


expand all

Initialize FunctionExecutes contents on a model initialize event
Reset FunctionExecutes contents on a model reset event
Terminate FunctionExecute contents on a model terminate event
Event ListenerAdd event port to a subsystem block
State ReaderRead a block state
State WriterWrite to a block state
Parameter WriterWrite to a model instance parameter
Resettable Subsystem Subsystem whose block states reset with external trigger
ResetAdd reset port to subsystem


Initialize, Reset, and Terminate Functions

Using Initialize, Reset, and Terminate Functions

Set the state of a block with an initialize function-call event. Save the state of a block with a terminate function-call event.

Create Test Harness to Generate Function Calls

Schedule initialize, reset, and terminate function-call events.

Initialize and Reset Parameter Values

Use the Parameter Writer block to change model instance parameter values.

Initialize, Reset, and Terminate Function Limitations

List of unsupported blocks and features.

Resettable Subsystems

Use Resettable Subsystems

Create a subsystem that resets all block states with a trigger signal.

Featured Examples