Using Simulink     Search    Help Desk 

Common Block Parameters

This table lists the parameters common to all Simulink blocks, including block callback parameters, which are described in "Using Callback Routines". Examples of commands that change these parameters follow this table.

Common Block Parameters 

Parameter
Description
Values
Name

Block's name

string

Type

Simulink object type (read-only)

'block'

Parent

Name of the system that owns the block

string

BlockType

Block type

text

BlockDescription

Block description

text

Description

User-specifiable description

text

InputPorts

Array of input port locations

[h1,v1; h2,v2; ...]

OutputPorts

Array of output port locations

[h1,v1; h2,v2; ...]

CompiledPortWidths

Structure of port widths

scalar and vector

Orientation

Where block faces

{right} | left | down | up

ForegroundColor

Block name, icon, outline, output signals, and signal label

{black} | white | red | green | blue | cyan | magenta | yellow | gray | lightBlue | orange | darkGreen

BackgroundColor

Block icon background

black | {white} | red | green | blue | cyan | magenta | yellow | gray | lightBlue | orange | darkGreen

DropShadow

Display drop shadow

{off} | on

NamePlacement

Position of block name

{normal} | alternate

FontName

Font

{Helvetica}

FontSize

Font size

{10}

FontWeight

Font weight

(system-dependent) light | {normal} | demi | bold

FontAngle

Font angle

(system-dependent) {normal} | italic | oblique

Position

Position of block in model window

vector [left top right bottom]
not enclosed in quotes

ShowName

Display block name

{on} | off

Tag

User-defined string

' '

UserData

Any MATLAB data type (not saved in the mdl file)

[ ]

Selected

Block selected state

on | {off}

CloseFcn

Close callback

MATLAB expression

CopyFcn

Copy callback

MATLAB expression

DeleteFcn

Delete callback

MATLAB expression

InitFcn

Initialization callback

MATLAB expression

LoadFcn

Load callback

MATLAB expression

ModelCloseFcn

Model close callback

MATLAB expression

NameChangeFcn

Block name change callback

MATLAB expression

OpenFcn

Open callback

MATLAB expression

ParentCloseFcn

Parent subsystem close callback

MATLAB expression

PreSaveFcn

Pre-save callback

MATLAB expression

PostSaveFcn

Post-save callback

MATLAB expression

StartFcn

Start simulation callback

MATLAB expression

StopFcn

Termination of simulation callback

MATLAB expression

UndoDeleteFcn

Undo block delete callback

MATLAB expression

LinkStatus

Link status of block.

none |resolved | unresolved | implicit

AttributesFormat
String

Specifies parameters to be displayed below block in a block diagram

string

These examples illustrate how to change these parameters.

This command changes the orientation of the Gain block in the mymodel system so it faces the opposite direction (right to left).

This command associates an OpenFcn callback with the Gain block in the mymodel system.

This command sets the Position parameter of the Gain block in the mymodel system. The block is 75 pixels wide by 25 pixels high. The position vector is not enclosed in quotes.



[ Previous | Help Desk | Next ]