nodes
Define component nodes, that is, conserving ports of block
Parent Section: component | domain
Syntax
nodes a = namespace_name.domain_name; end
Description
nodes
begins a nodes declaration section, which is terminated by an
end
keyword:
In a component file, this section contains declarations for the component nodes, which correspond to the conserving ports of a Simscape™ block generated from the component file. Each node is defined by assignment to an existing domain. For more information, see Declare Component Nodes.
In a domain file, this section contains declarations for the composite domain nodes. Each node represents a bundle of connections, possibly of different types. For more information, see Composite Domains.
Component Nodes
In a component file, this syntax defines a node, a
, by
associating it with a domain, domain_name
.
namespace_name
is the full path to the domain, starting with
the top namespace folder. For more information on organizing your Simscape files, see Building Custom Block Libraries.
nodes
a = namespace_name.domain_name;
end
You can specify the port label, the way you want it to appear in the block diagram, as a comment:
nodes
a = namespace_name.domain_name; % label
end
where label
is a string corresponding to the port name in the
block diagram. You can use the Side
annotation to specify the
port location on the block icon. For more information, see Customize the Names and Locations of the Block Ports.
You can also declare nodes as resizable arrays of elements that all belong to the same domain type. For more information, see Arrays of Nodes.
Domain Nodes
In a domain file, use the nodes
section to
declare a composite domain as a hierarchy of other, primitive or composite, domains.
A primitive domain is a regular Foundation or custom domain
that is defined by its Through and Across variables. A
composite domain is a textual equivalent of a bus port on
a rigid Simscape Bus block. Composite domain nodes represent a bundle
of connections, possibly of different types.
A composite domain cannot declare inputs, outputs, variables, parameters, or
equations. The only section allowed is
nodes
.
Composite domain nodes can refer to:
Foundation domains.
Primitive custom domains.
Other composite domains.
Restrictions on member nodes inside the nodes
section in a composite domain declaration:
Must be public.
Conditional declarations are not allowed.
Cannot be parameterized. Parameterizing a node in a component file makes this component a source for domain parameter propagation in the network. For more information, see Source Components. In a domain file, such parameterization is meaningless.
In a primitive domain file, the nodes
section
is not allowed.
Examples
Version History
Introduced in R2008b