While I am not a strong proponent of using the GOTO and FROM blocks in Simulink Models, I do want to point out that if you
choose to use these blocks in your model, Markus Baranyai’s submission makes it convenient to apply some of the best practices
surrounding the use of GOTO and FROM blocks.
Signal Management Challenges Can Be Addressed With The Wise GOTO Block
Signal management in Simulink can be challenging if there are signals traveling across the Simulink model diagram, or there
are lots of crossing signal lines. The GOTO and FROM blocks attempt to relieve this challenge, but end up introducing challenges
of their own. There are some best practices that can be employed to make GOTO and FROM blocks more usable. This is where Markus’s
MATLAB Central submission provides a lot of value. It enforces best practices by applying the same
to both the GOTO and FROM block:
Enhance Simulink Block Behavior With Callback Functions
Many users are unaware that the behavior of blocks within Simulink can be enhanced through the use of block or model callback
functions. These are functions that are executed when certain events occur. In the case of this entry, Markus takes advantage
of the NameChangeFcn, which is a function that is called when the name of the block changes.
For more on block callback functions, please see the following our documentation page on the topic.