Callback Button
Execute MATLAB code using button
- Library:
Simulink / Dashboard
Description
The Callback Button block executes MATLAB® code in response to a click or press of the button. When you press the button, the code executes after a time span that you specify has elapsed or at time intervals that you specify. You can configure the block to execute different code for a click versus for a press.
Double-clicking the Callback Button block does not open its dialog box during simulation or when the block is selected. To edit the block parameters, you can use the Property Inspector or open the block dialog box by:
Double-clicking the block when the block is not selected and the model is not simulating.
Right-clicking the block and selecting Block Parameters from the context menu.
The Callback Button block in the Customizable Blocks library provides the same functionality as this Callback Button block and provides additional capabilities to:
Design the appearance of the block to look like a button in a real system.
Configure the button type as momentary or latch.
Parameters
Model Examples
Block Characteristics
Data Types | |
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Extended Capabilities
Version History
Introduced in R2017b