Custom block libraries¶
In this example, we will explore the possibilities of creating and applying custom block libraries.
First of all, let's create an Engee library file.
Then open it. It is important to note that each created subsystem in this case will be treated as a separate block of our user library. If a subsystem without input and output ports contains a set of subsystems inside it, then such a subsystem will be perceived as a subcategory of our library.
In this example, the task is to create a block that will allow division by a given constant. The figures below show the internal structure of this block and its mask parameters.
Once the library creation process is complete, we can save it and load it into the Library tab in the Model Editor.
After that our blocks will appear in the Library tab and we can apply them to any model.
Let's create a test model and halve the input signal with our block. To do this, let's add a sine wave block and our division by constant block.
The results of our test model show that the block has halved the amplitude of the input signal.
Conclusion¶
In this example, we have looked at the possibilities of creating and applying custom libraries in our everyday work with models.