Using Simulink    

Working with Block Libraries

Libraries enable users to copy blocks into their models from external libraries and automatically update the copied blocks when the source blocks change. Using libraries allows users who develop their own block libraries, or who use those provided by others (such as blocksets), to ensure that their models automatically include the most recent versions of these blocks.

Terminology

It is important to understand the terminology used with this feature.

Library - A collection of library blocks. A library must be explicitly created using New Library from the File menu.

Library block - A block in a library.

Reference block - A copy of a library block.

Link - The connection between the reference block and its library block that allows Simulink to update the reference block when the library block changes.

Copy - The operation that creates a reference block from either a library block or another reference block.

This figure illustrates this terminology.

Simulink Block Library

Simulink comes with a library of standard blocks called the Simulink block library. See Starting Simulink for information on displaying and using this library.

Creating a Library

To create a library, select Library from the New submenu of the File menu. Simulink displays a new window, labeled Library: untitled. If an untitled window already appears, a sequence number is appended.

You can create a library from the command line using this command:

This command creates a new library named 'newlib'. To display the library, use the open_system command. These commands are described in Model Construction Commands in the online Simulink reference.

The library must be named (saved) before you can copy blocks from it. See Adding Libraries to the Library Browser for information on how to point the Library Browser to your new library.

Modifying a Library

When you open a library, it is automatically locked and you cannot modify its contents. To unlock the library, select Unlock Library from the Edit menu. Closing the library window locks the library.


  Look-Up Table Editor Creating a Library Link