Documentation

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 the 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. Here, the Callback Button block at the bottom of the Dashboard subsystem in the model has been configured to update the diagram on the release of the mouse button when you click the block.

You do not need to start a simulation for the Callback Button to react to your input. Just select and then click the Callback Button to run the initialization code. Double-click the Callback Button block to view and edit its parameters, including the press and click scripts.

See Also

Callback Button

Control a Parameter Value with Callback Button Blocks

Was this topic helpful?