Creating a Sublibrary in the Plug-in Library

<< Click to Display Table of Contents >>

Navigation:  Waijung Blockset > Block References > Plug-in Blockset >

Creating a Sublibrary in the Plug-in Library

Previous pageReturn to chapter overviewNext page

To create a Sublibrary in the Plug-in Library of a specific target follow the following steps:

1.Use Windows explorer or other similar program, create a folder under the required plug-in folder. For example, to create "My Lib" Sublibrary for STM32F4 Target create a folder named "My Lib" under "waijungroot\targets\stm32f4_target\stm32f4\plugin" directory. The folder name will be used as the name of your Sublibrary that appears in the Simulink Library Browser Tree.
2.Create a Simulink Library and save the library file in the folder created in 1. above.

IMPORTANT!!! The library file must be created from the Simulink Library Browser as shown below (otherwise the library will not appear in the Simulink Library Browser).

newsimulinklibrary

For this example, under "waijungroot\targets\stm32f4_target\stm32f4\plugin\My Lib"
IMPORTANT!!! Unlike the folder name above,  your Simulilnk Library model file name (*.mdl or *.slx files) must not contain any space characters.
 
During this steps you can add as many blocks as the content of the Sublibrary.
All related blocks and files must be saved under the Sublibrary folder.
For this example, under "waijungroot\targets\stm32f4_target\stm32f4\plugin\My Lib"

3.After you have added all required blocks to the library file, run waijung.updatePlugin('targetname') where targetname is the name of your target. For example for STM32F4 target, the command will be:
 
waijung.updatePlugin('stm32f4')
 
Waijung will automatically create a Sublibrary with all its content available under Plug-in Library for you.
 
The pictures below summarize required file contents and structure.

File structure

sublibraryfilestructure

Content of mylib.mdl

sublibrarycontent

Results

After running waijung.updatePlugin('stm32f4') at the Matlab Command Windows.

sublibraryexample