当前位置:网站首页>How Simulink adds modules to the library browser

How Simulink adds modules to the library browser

2022-06-13 09:04:00 mydate()


Tips : The following is the main body of this article , The following cases can be used for reference

One 、 newly build Library

1、 Create empty Library modular

1) stay Simulink Create an empty interface Library modular

 Insert picture description here

 Insert picture description here

2、 edit Library

1) edit Library Logical and save as slx file
 Insert picture description here

Two 、 Add to Library Browser

1、 add to Library The script command for

1) open Mtalab Help document for , Search for Slblock>>Add Library to the Library Browser
 Insert picture description here
2) Copy Slblocks Script command

 Insert picture description here

function blkStruct = slblocks
% This function specifies that the library 'mylib'
% should appear in the Library Browser with the 
% name 'My Library'

    Browser.Library = 'mylib';
    % 'mylib' is the name of the library

    Browser.Name = 'My Library';
    % 'My Library' is the library name that appears
    % in the Library Browser

    blkStruct.Browser = Browser;

2、 New script file

1) stay Mtalab Create a new script file in the interface , And fill in the code above
2) Edit the Library Module name (Slx file ) And in Library Browser The name shown above
 Insert picture description here

3) Save script file


3、 Import Library modular

1) stay Library Browser To the left of the list , The right choice Refresh Library Browser Or press F5 to update Library list

 Insert picture description here
2) Automatically refresh to Library list
 Insert picture description here

To sum up, complete Simulink Library The addition of ;

原网站

版权声明
本文为[mydate()]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/164/202206130853214305.html