Executes contents on a model reset event
The Reset Function block is a preconfigured subsystem block created from an Initialize block that executes on a model reset event.
The Reset Function block is not in the Simulink® Library Browser.
To create a Reset Function block:
Add an Initialize block.
Open the Event Listener block within
the Initialize block. From the Event drop-down
One parameters appear.
By default, the Event name is
Reset. You can change the name of a reset
event by editing this text box.
Rename the block from
Initialize Function to
The Reset Function block includes an Event
Listener block with Event set to
a Constant block with Constant value set
0, and a State Writer block.
Replace the Constant block with source blocks that generate the state value for the State Writer block.
For a list of unsupported blocks and features, see Initialize, Reset, and Terminate Function Limitations.
A model can potentially have multiple Reset Function blocks with each block having a different Event name. Each of these reset events appear in the generated code as a different function.