Documentation Center

  • Trial Software
  • Product Updates

About Block Libraries and Linked Blocks

Block Libraries

A block library is a collection of blocks that serve as prototypes for instances of blocks in a Simulink® model.

Simulink comes with two built-in block libraries: the Simulink block library and the Simulink Coder™ block library. The latter is included with Simulink to support sharing models that contain Simulink Coder blocks. Many additional MathWorks® products and associated block libraries are available. You cannot change a built-in block library in any way.

Benefits of Block Libraries

Block libraries are a useful componentization technique for:

  • Providing frequently-used, and seldom changed, modeling utilities

  • Reusing components repeatedly in a model or in multiple models

For additional information about how libraries compare to other Simulink componentization techniques, see Componentization Guidelines.

Library Browser

Simulink provides a Library Browser that you can use to display block libraries, search for blocks by name, and copy library blocks into models. All installed libraries appear in the Library Browser when you open it. See Populate a Model for information about how to use the Simulink Library Browser.

Linked Blocks

When you copy a block from a library into a model, Simulink creates a linked block in the model, and connects it to the library block using a library link. The library block is the prototype block, and the linked block in the model is an instance of the library block. The linked block appearance and behavior are the same as the library block. For most purposes, you can ignore the underlying link and just think of a linked block as a clone of the library block.

Copying a block from a library to another library or model does not always create a linked block. Library blocks that support linking include subsystems, masked blocks, and charts. However, the block author can choose not to make the copy a linked block by modifying the CopyFcn, as done by the Simulink Subsystem block.

Was this topic helpful?