Main Content

Stateflow-Programmierschnittstelle

Erstellen und Bearbeiten von Diagrammelementen an der MATLAB®-Eingabeaufforderung

Erstellen und bearbeiten Sie Stateflow®-Diagramme programmatisch. Fügen Sie Ihrem Diagramm neue Objekte hinzu, greifen Sie auf Eigenschaften zu und bearbeiten Sie diese, legen Sie Positionen fest, kopieren und fügen Sie Objekte ein, und ändern Sie die Vergrößerungsstufe des Stateflow-Editors.

Funktionen

alle erweitern

sfnewCreate Simulink model that contains an empty Stateflow block
sfrootWurzel der Stateflow Hierarchie
sfclipboardClipboard object
sfgcoSelected objects in chart
Stateflow.findMatchingPortIdentify matching entry or exit port (Seit R2021b)

Objekte

alle erweitern

Diagramm-, Block- und Maschinenobjekte

Stateflow.ChartGraphical representation of a finite state machine
Stateflow.StateTransitionTableChartTabular representation of state machine for modal logic
Stateflow.TruthTableChartTabular representation of state machine for decision logic
Stateflow.EMChartStateflow interface to MATLAB Function block
Stateflow.MachineContainer for Stateflow blocks in a Simulink model

Grafische Objekte

Stateflow.AnnotationAnnotation in chart, state, box, or function
Stateflow.AtomicBoxAtomic box in chart, state, box, or function
Stateflow.AtomicSubchartAtomic subchart in chart, state, or box
Stateflow.BoxBox in chart, state, box, or function
Stateflow.EMFunctionMATLAB function in chart, state, box, or function
Stateflow.FunctionGraphical function in chart, state, box, or function
Stateflow.JunctionConnective or history junction in chart, state, box, or function
Stateflow.PortEntry or exit port in state or atomic subchart (Seit R2021b)
Stateflow.SimulinkBasedStateSimulink based state in chart, state, or box
Stateflow.SLFunctionSimulink function in chart, state, box, or function
Stateflow.StateState in chart, state, or box
Stateflow.TransitionTransition in chart, state, box, or function
Stateflow.TruthTableTruth table function in chart, state, box, or function

Nicht grafische Objekte

Stateflow.DataData in chart, state, box, or function
Stateflow.EventEvent in chart, state, or box
Stateflow.MessageMessage in chart, state, or box

Zwischenablage- und Editor-Objekte

Stateflow.ClipboardClipboard to copy and paste Stateflow objects
Stateflow.EditorGraphical aspects of a chart or state transition table

Objekt-Funktionen

alle erweitern

Navigieren in der Hierarchie

findIdentify specified objects in hierarchy
getChildrenIdentify children of object
getParentIdentify parent of object
getReferencesIdentify references to symbol name
commentedByIdentify objects that implicitly comment out a graphical object
defaultTransitionsIdentify default transitions in specified object
innerTransitionsIdentify inner transitions with specified source
outerTransitionsIdentify outgoing transitions with specified source
sinkedTransitionsIdentify transitions with specified destination
sourcedTransitionsIdentify transitions with specified source

Zugriff auf und Bearbeitung von Eigenschaften

dialogOpen properties dialog box
exportAsStructExport contents of state transition table as structure array
renameReferencesRename symbol and update references to symbol name
setImageInsert image into annotation

Steuern der Anzeige

viewDisplay object in editing environment
highlightHighlight graphical object
fitToViewZoom in on graphical object
zoomInZoom in on Stateflow chart
zoomOutZoom out on Stateflow chart

Zuordnung von Symbolen in atomaren Unterdiagrammen und Simulink-basierten Zuständen

getMappingForSymbolGet mapping for symbol in atomic subchart, atomic box, or Simulink based state
setMappingForSymbolSet mapping for symbol in atomic subchart, atomic box, or Simulink based state
clearMappingForSymbolClear mapping for symbol in atomic subchart, atomic box, or Simulink based state
disableMappingForSymbolDisable input event in atomic subchart or box

Kopieren und Einfügen von Objekten

copyCopy array of objects to clipboard
pasteToPaste objects in clipboard to specified container object

Umwandlung von Diagrammen und Zustandsübergangstabellen

convertToChartConvert state transition table to Stateflow chart
convertToSTTConvert Stateflow chart to state transition table

Themen