92136v00 Tips and Tricks Smart Signal Routing in Simulink

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

See more articles and subscribe at mathworks.com/newsletters.

Tips and Tricks: Smart Signal Routing in Simulink


With smart signal routing, Simulink® automatically finds the shortest path that has the fewest 90-degree turns, without overlapping other
blocks or text. Not only that, but as you draw the signal line, Simulink shows you exactly what the path will look like before you release
the mouse button. You get real-time feedback, and there are no surprises.

Simulink model with smart signal routing enabled. Smart signal routing automatically finds a "smart" path from block to block.

Custom Signal Paths

Smart signal routing has significantly improved the automatic signal routing algorithms used in Simulink; however, there are still times
when you want to draw a signal path yourself so as to precisely determine the shape of the line. Smart signal routing can help here, as
well. This is how it works: Draw a signal line. To create a bend in the line, release the mouse button. Three blue arrows appear, one
pointing straight ahead, one left, and one right. Choose the direction that you want the signal line to follow, and repeat the process until
you’ve completed the path.

Custom signal path created using smart signal routing. Custom signal paths give you precise control over the shape of the signal line.

1
Minimum Disturbance

Part of the "smartness" of the smart signal routing algorithm is that it operates on the principle of minimum disturbance—that is, it
changes the shape of existing signal lines as little as possible as you make changes to the model. This is especially important when you
have taken the time to create a custom signal path; you do not want that entire path to get redrawn when another block is moved.

In some cases, tiny kinks can appear in the signal line, especially if the model was created in Simulink R2012b or earlier. In those
instances, simply move the connected blocks. This automatically removes the kinks, giving you a cleaner-looking model.

Products Used Learn More


▪ Simulink ▪ Video: Smart Signal Routing 1:36
▪ Guy and Seth on Simulink

See more articles and subscribe at mathworks.com/newsletters.

Published 2013
92136v00

mathworks.com
© 2013 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks 2
for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

You might also like