SinkAutoConnect

版本 1.7.0.1 (1.4 KB) 作者: Mike Anthony
Automatically connects single-inport blocks when block is dropped over a line in Simulink.
644.0 次下载
更新时间 2016/9/1

查看许可证

编者注: 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.

引用格式

Mike Anthony (2024). SinkAutoConnect (https://www.mathworks.com/matlabcentral/fileexchange/28656-sinkautoconnect), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Scopes and Data Logging 的更多信息
致谢

启发作品: AutoConnect

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.7.0.1

Updated license

1.7.0.0

Updated to fix bugs, work in the MoveFcn callback, and work for sink blocks with multiple inports (like the XY Graph).

1.5.0.0

Bug fixes and equivalent capability for MoveFcn callback

1.4.0.0

10/20/2010 Added:
1. Bug fix for when copying a block not onto a line.
2. Equivalent capability for MoveFcn callback

1.3.0.0

Added Copyright comment in SinkAutoConnect.m

1.1.0.0

Removed instructions on how to alter the built-in Simulink library blocks.

1.0.0.0