Main Content

Custom Components

Write Simscape™ files to represent custom components

The Simscape language lets you define custom components as textual files, complete with parameterization, physical connections, and underlying equations. Topics on this page provide detailed information on declaring component parameters, variables, and connections. For other aspects of defining custom components, seeComponent Equations,Discrete Events and Mode Charts, andComposite Components.

To get started with writing custom components, seeCreating Custom Components, which provides an overview of the general workflow. At the bottom of this page, topics listed under Reference Application Components provide complete component examples with detailed explanations that illustrate the techniques used in each case.

Language Syntax

annotations Control appearance ofSimscape块的基础上component
branches Establish relationship between component Through variables and nodes
component Component model keywords
inputs Define component inputs, that is, Physical Signal input ports of block
nodes Define component nodes, that is, conserving ports of block
outputs Define component outputs, that is, Physical Signal output ports of block
parameters Specify component parameters
variables Define domain or component variables

Topics

Basic Techniques

Declarations and Branches

Component Variants

Advanced Techniques

  • Enumerations
    Specify a discrete set of acceptable values for parameters and event variables.
  • Subclassing and Inheritance
    Subclassing allows you to build component models based on other component models by extension.

Reference Application Components