最新のリリースでは、このページがまだ翻訳されていません。 このページの最新版は英語でご覧になれます。

Simscape ファイルの配布

ブロック線図での Simscape™ ファイルの使用

テキストのコンポーネント ファイルをカスタム Simscape ブロックに変換して、ブロック線図に配置します。Simscape Component ブロックを使用すると、Simscape コンポーネント ファイルをモデルのブロックにすばやく変換できます。また、Simscape コンポーネントのカスタム ブロック ライブラリを作成すると、こうしたモデルを組織全体で共有できるようになります。これらの 2 つの手法に関する詳細については、Generating Custom Blocks from Simscape Component Filesを参照してください。

Simscape ブロック

Simscape ComponentDeploy Simscape language component as custom block in model diagram

関数

ssc_buildBuild custom library from collection of Simscape files
ssc_mirrorCreate protected mirror of library of Simscape files
ssc_protectGenerate Simscape protected files from source files
sl_postprocessMake postprocessing customizations when building custom block library
ssc_cleanClean all derived files generated by library build process
ssc_updateUpdate Simscape component files to use new syntax
simscape.dependency.fileCheck dependencies for single file
simscape.dependency.libCheck dependencies for library package
simscape.dependency.modelCheck dependencies for model
subsystem2sscConvert subsystem containing Simscape blocks into equivalent Simscape file or files

例および操作のヒント

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 a Custom Block Library

This example illustrates how you can convert a package of Simscape component files into a custom block library, containing sublibraries with customized names and appearance. It summarizes the techniques described in Organizing Your Simscape Files, Converting Your Simscape Files, and Customizing the Library Name and Appearance.

Customize Block Display

The following shows a complete example of a component file with annotation and the resulting library block and dialog box. The image file, custom_spring.jpg, is located in the same folder as the component file. This example is an illustration of all the techniques described in Customizing the Block Name and Appearance.

Case Study — Basic Custom Block Library

Capacitor library

Case Study — Electrochemical Library

Electrochemical library

概念

Generating Custom Blocks from Simscape Component Files

How to Turn a Component File into a Block

Selecting Component File Directly from Block

How to Turn a Component File into a Block

Building Custom Block Libraries

How to Generate a Library of Custom Blocks

When to Rebuild a Custom Library

You need to rebuild the custom Simscape libraries:

Customizing the Library Name and Appearance

Package names must be valid MATLAB® identifiers. The top-level package always generates a library model with the name package_name_lib. However, library configuration files let you provide descriptive library names and specify other customizations for sublibraries, generated from subdirectories in the package hierarchy.

Customizing the Block Name and Appearance

How to Customize the Block Name

Checking File and Model Dependencies

Using Manifest Tools