{"id":1242,"date":"2012-10-11T16:08:19","date_gmt":"2012-10-11T21:08:19","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/?p=1242"},"modified":"2012-10-11T16:08:19","modified_gmt":"2012-10-11T21:08:19","slug":"smart-signal-routing","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2012\/10\/11\/smart-signal-routing\/","title":{"rendered":"Smart Signal Routing"},"content":{"rendered":"<p><em>This week guest blogger <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/24668\">Michael Carone<\/a> is here to talk about improvements to signal routing in Simulink R2012b.<\/em><\/p>\r\n\r\n<p><strong>Smart Signal Routing<\/strong><\/p>\r\n\r\n<p>Has this ever happened to you: You have two blocks that you connect together and the signal line doesn\u2019t show up where you want it to go?  It overlaps a block or some text in the model, and then you have to move sections of the signal around in order to get it just right.  It can get pretty frustrating \u2013 you start thinking \u201cWhy do I have to spend all this time fiddling around with signal lines just to make my model look good?  Simulink should do this automatically!\u201d<\/p>\r\n\r\n<p><strong>Line routing with an optimal path<\/strong><\/p>\r\n\r\n<p>Well, I have good news!  The new Simulink Editor in R2012b does a much better job of drawing signal lines with one of my favorite new features, smart signal routing.  What\u2019s smart signal routing?  Basically, it means that when you draw a signal line, Simulink will automatically find the \u201coptimal path\u201d so that the new signal line is as short as possible, has minimal 90 degree turns, and doesn\u2019t overlap other blocks and text.  Not only that, as you draw the signal line, Simulink lets you know exactly what the path is going to look like before you release the mouse button.  So there are no surprises!  (in this case, that\u2019s a good thing).<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q3\/smart_signal_routing_1.gif\" alt=\"Line routing with an optimal path\" \/><\/p>\r\n\r\n<p><strong>Drawing custom paths<\/strong><\/p>\r\n\r\n<p>You might be thinking, \u201cAutomatic signal line?  What if I want to create my own signal line paths?\u201d  The good thing is that there\u2019s a new way to create your own custom signal line path too.  Here\u2019s how it works: Draw a signal line like you normally would.  Then release the mouse button when you want to create a bend in the line.  You\u2019ll see three blue arrows appear: one to keep going straight and two to make a left or right turn.  Choose the arrow that you want and repeat until you\u2019ve created your own signal path.  Here\u2019s a little video to show how this works:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q3\/smart_signal_routing_2.gif\" alt=\"Drawing custom paths\" \/><\/p>\r\n\r\n<p><strong>Minimum disturbance<\/strong><\/p>\r\n\r\n<p>Now what\u2019s neat about this new signal line is that it won\u2019t get blown away if you move some blocks around as you continue building up the model.  Part of the smartness of the smart signal routing algorithm is to know when to leave a signal alone.  It\u2019s what we call \u201cminimum disturbance.\u201d  In other words, the signal lines that already exist will be disturbed as little as possible as you move blocks around.  Here\u2019s another clip to show how this works:<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2012Q3\/smart_signal_routing_3.gif\" alt=\"Minimum disturbance\" \/><\/p>\r\n\r\n<p><strong>Conclusion<\/strong><\/p>\r\n\r\n<p>Smart signal routing is just one of the many features added to the new Simulink Editor to make modeling easier.<\/p>\r\n\r\n<p><strong>Now it's your turn<\/strong><\/p>\r\n\r\n<p>Have you tried out the new Simulink Editor yet?  What do you think of the new smart signal routing algorithm?  Let us know by leaving a <a href=\"https:\/\/blogs.mathworks.com\/seth\/?p=1242&#comment\">comment here<\/a>!\r\n","protected":false},"excerpt":{"rendered":"<p>This week guest blogger Michael Carone is here to talk about improvements to signal routing in Simulink R2012b.\r\n\r\nSmart Signal Routing\r\n\r\nHas this ever happened to you: You have two blocks that you... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2012\/10\/11\/smart-signal-routing\/\">read more >><\/a><\/p>","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[33,16],"tags":[441,290],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/1242"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=1242"}],"version-history":[{"count":19,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/1242\/revisions"}],"predecessor-version":[{"id":1443,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/1242\/revisions\/1443"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=1242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=1242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=1242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}