Simscape ファイルの展開
ブロック線図での Simscape™ ファイルの使用
テキストのコンポーネント ファイルをカスタム Simscape ブロックに変換して、ブロック線図に配置します。Simscape Component ブロックを使用すると、Simscape コンポーネント ファイルをモデルのブロックにすばやく変換できます。また、Simscape コンポーネントのカスタム ブロック ライブラリを作成すると、こうしたモデルを組織全体で共有できるようになります。これらの 2 つの手法に関する詳細については、Simscape コンポーネント ファイルからのカスタム ブロックの生成を参照してください。
Simscape ブロック
| Simscape Component | Deploy Simscape language component as custom block in model diagram |
関数
sscbuild | Build custom library from collection of Simscape files (R2024b 以降) |
ssc_build | (To be removed) Build custom library from collection of Simscape files |
sscmirror | Create protected mirror of library of Simscape files (R2024b 以降) |
ssc_mirror | (To be removed) Create protected mirror of library of Simscape files |
sscprotect | Generate Simscape protected files from source files (R2024b 以降) |
ssc_protect | (To be removed) Generate Simscape protected files from source files |
sl_postprocess | Make postprocessing customizations when building custom block library |
sscclean | Clean all derived files generated by library build process (R2024b 以降) |
ssc_clean | (To be removed) Clean all derived files generated by library build process |
ssc_update | Update Simscape component files to use new syntax |
simscape.dependency.file | Check dependencies for single file |
simscape.dependency.lib | Check dependencies for library namespace |
simscape.dependency.model | Check dependencies for model |
subsystem2ssc | Convert subsystem containing Simscape blocks into equivalent Simscape file or files |
トピック
カスタム コンポーネントの展開の基本的な手法
- Simscape コンポーネント ファイルからのカスタム ブロックの生成
テキストのコンポーネント ファイルを Simscape ブロックに変換する方法。 - Selecting Component File Directly from Block
Quickly deploy a single component file. - Deploy a Component File in Block Diagram
This example shows how you can quickly transform a Simscape component file into a block in your model. - Switch Between Different Source Components
This example shows how you can try out several variants of a component in your model by pointing the Simscape Component block to different component files. - Prototype a Component and Get Instant Feedback
This example shows how you can interactively modify the component source and get instant feedback on the resulting block implementation. - Create Custom Block by Modifying a Library Block
This example shows how you can start with a Foundation library block, modify the source to create a custom block, and deploy the custom block in a model.
ブロック線図でのカスタム ブロックの表示
- Customizing the Block Name and Appearance
How to customize the block name, names of parameters, variables, and ports, and the block icon. - Customize Block Display
This example shows a complete component file with annotation and the resulting library block and dialog box. The image file,custom_spring.svg, is located in the same folder as the component file. This example is an illustration of basic techniques described in Customizing the Block Name and Appearance. - Use Advanced Techniques to Customize Block Display
This example shows how you can use block layout annotation and enumerations to improve usability of a custom block.
カスタム ブロック ライブラリ
- Building Custom Block Libraries
Generate a custom block library from a namespace of Simscape component files. - Customizing the Library Name and Appearance
Namespace names must be valid MATLAB® identifiers. The top-level namespace always generates a library model with the namenamespace_name_lib. However, library configuration files let you provide descriptive library names and specify other customizations for sublibraries, generated from subfolders in the namespace hierarchy. - カスタム ブロック ライブラリの作成
この例は、Simscape コンポーネント ファイルを含む名前空間を、名前と外観がカスタマイズされたサブライブラリを含むカスタム ブロック ライブラリに変換する方法を示しています。 - When to Rebuild a Custom Library
You need to rebuild the custom Simscape libraries: - Checking File and Model Dependencies
How to use Dependency Analyzer to analyze a model and determine its model dependencies.
ケース スタディ
- Case Study — Basic Custom Block Library
How to build your own library of custom blocks based on component files. - Case Study — Electrochemical Library
How to create a new custom domain and build a complete library of custom blocks based on that domain.