Main Content

Initialize Your Model Using the Callback Button Block

This example shows how to use the Callback Button block to perform initialization routines on your model.

Explore Model

The example model builds on the sldemo_fuelsys featured model. When you open the model, to bind the workspace variables to their Dashboard blocks, you have to update the model diagram. In this example, the Callback Button block at the bottom of the Dashboard subsystem has been configured to update the diagram when you click the block. To view and edit the block parameters, including the ClickFcn and PressFcn functions, press Shift, and then double-click the block.

Click the Update Diagram block to update the diagram. When the model diagram is updated, run the simulation.

See Also

Topics