MATLAB For Beginners: 20-Minute Video Training Course. (Grab The Training Course and The Cheat Sheet for FREE)

       

Let’s start with a model containing a Subsystem linked to a library called “myPersonalLibrary.slx”:

As you can see, it is not possible for someone who doesn’t know the model to determine whether the block Subsystem is linked. In this article we will see three ways to get this information by:

  • Moving something
  • Opening the library to which this block is linked
  • Making it visible for everyone

 

Move Something

If you go inside a library block and try to move a block, you should not be able to do it because you can have a lot of blocks pointing to the same library block in your model. If you modify this block, you will have now  modified every block pointing to the block in “myPersonalLibrary.slx.” This explains why you need to “disable” a library block if you need to modify it, it acts as a safety net. Explaining how to modify a block is, however, beyond the scope of this article, and will be explained later.

All you need to know here is that moving a block is not possible in a library block that is not disabled (i.e. that is not ready to be modified). You can just try to move a block inside Subsystem:

Open an Item’s Linked Library

This method is mostly used for a block that we think is linked to a library block. If we want to make sure this is the case, we also want to know to which library it is linked. We can answer both question by these steps: 

  1. Click on the desired block
  2. CTRL+L

If the block is not linked, nothing happens; otherwise, the linked library is opened:

Make the Item Visible

The easiest way to know if a block is linked (and the one I recommend) is to display all library links by adding a small lock at the bottom left corner of every linked block:

  1. Click on the drop-down menu Display
  2. Go to Library Links
  3. Check All (by default, you should have Disabled already checked)

Here is what it looks like after:


Leave a Reply