Main Content

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.

Blocks

Initialize FunctionExecute subsystem on model initialize event
Reset FunctionExecute subsystem on model reset event
Terminate FunctionExecute subsystem on model terminate event
State ReaderRead a block state
State WriterWrite to a block state
Parameter WriterWrite to a model instance parameter

Topics

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.