For those of you who have developed electrical circuit schematics, you are no doubt familiar with the concept of “line hops”. You apply these to distinctly demonstrate that two wires that may cross on the schematic do not represent an electrical connection.
Josef applies the same concept to Simulink diagrams.
Simulink does distinctly show when two signal lines are connected by the use of a “solder joint”. Many people who develop electrical schematics apply this syntax as well to signify an electrical connection.
However, it is possible to have two signal lines meet, to look like a line crossing, but do not actually cross, making it difficult to distinguish which path goes where.
The use of line hops would prevent confusion in cases like this. Having said that, you should probably avoid these types of potential confusing diagrams in the first place.
In the latest version of Simulink in Release R2012b, the new line routing algorithms are much better at avoiding these types of potentially confusing depictions. For this example I had to explicitly modify the lines so they appear to cross.
Josef relies on the default grid size used when drawing out Simulink signal lines as a means to distinguish between line hops and other types of line crossings. That way it is possible to:
- Toggle line hops “on” and “off”
- Prevent the creation of line hops on top of existing line hops
He applies the use of the MATLAB application programming interface (API) for Simulink to determine what lines exist in Simulink, their respective coordinates on the Simulink diagram, and to apply the line hops to the existing Simulink signals.
If you would like to leave any comments regarding this post, please click here.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.