File Exchange

image thumbnail

SinkAutoConnect

version 1.7.0.1 (1.38 KB) by Mike Anthony
Automatically connects single-inport blocks when block is dropped over a line in Simulink.

1 Download

Updated 01 Sep 2016

View Version History

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Unlike SISO block in Simulink, blocks that have a single inport and no outport (Scope, Display, To File, To Workspace) do not autoconnect if dragged over a line in a model. Placing a call to this function in the CopyFcn callback of any single-inport block will cause the block to automatically connect when the block is dropped over a line in a Simulink model. This is similar to the built-in behavior of SISO blocks (ie gain, unit delay, etc) in Simulink. These blocks, when dropped on a line, automatically connects the inport and outport. With this function, in this case of a single-inport block, the block is moved just below the line and the inport is automatically connected.
This can be made the default behavior for these blocks by creating a custom library containing the desired blocks and adding the call to this function in the CopyFcn callback of the library blocks.

Cite As

Mike Anthony (2020). SinkAutoConnect (https://www.mathworks.com/matlabcentral/fileexchange/28656-sinkautoconnect), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: AutoConnect

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!