Custom Libraries
Ablock libraryis a collection of blocks that you can use in a Simulink®模型。您可以从内置的Simulink库创建块的实例,并且可以为创建的块实例制作自定义库。金宝app
You can access the built-in libraries from the Simulink Library Browser. However, you cannot modify these libraries. For more information on built-in libraries, see块库. To enable others to create custom blocks, you can create your own block library and add it to the Library Browser.
Creating your own libraries is a useful componentization technique for:
Providing frequently used, and seldom changed, modeling utilities
Reusing components in a model or in multiple models
要了解如何使用自定义库与其他Simulink组件化技术进行比较,请参见金宝appComponent-Based Modeling Guidelines.
When you add blocks from a custom library to a model, the block you add becomes alinked block. A linked block connects to the library block by way of alibrary link. The library block is theprototype block, and the linked block in the model is aninstanceof the library block.
The linked block looks and acts like the library block. However, if you change the library block, you must update the link on the instances. Changing an instance can also require additional steps. To learn how linked blocks work, seeLinked Blocks.
Blocks
Subsystem | Group blocks to create model hierarchy |
Functions
Tools
Library Browser | 在模型中查找并添加块 |
Objects
LibraryBrowser.LBStandalone |
显示,隐藏,大小和位置金宝appLibrary Browser |
Model Checks
Topics
Library Browser
- Create Custom Library
将块和注释添加到自定义库并定义库结构。 - Component-Based Modeling Guidelines
Consider componentization for large models and multiuser development teams. - Add Libraries to the Library Browser
Create a library, add it to the library browser, and customize library order.
Library Links
- Linked Blocks
Explore linked blocks, parameterized links, and self-modifiable linked subsystems. - Display Library Links
Identify link status using the link badge. - Disable or Break Links to Library Blocks
禁用库链接。 - Lock Links to Blocks in a Library
Prevent unintentional disabling of library links. - 还原残障链接
Restore library links and link inconsistency. - Restore Parameterized Links
当您更改蒙版子系统链接块的子块的参数值时,会创建一个参数化链接。 - Control Linked Block Programmatically
使用MATLAB®commands to manage linked blocks. - Fix Unresolved Library Links
Fix unresolved references to library blocks. - Parameterized Links and Self-Modifiable Linked Subsystems
Modify a parameter value or structure of linked Subsystem block. - Create a Self-Modifiable Library Block
Example showing a self-modifiable linked subsystem. - Maintain Compatibility of Library Blocks Using Forwarding Tables
Map old and new library blocks using forwarding tables.