Main Content

La traduzione di questa pagina non è aggiornata. Fai clic qui per vedere l'ultima versione in inglese.

Interfaccia programmatica di Stateflow

Creare e modificare elementi del grafico dal prompt dei comandi di MATLAB®

Creare e modificare i grafici Stateflow® in modo programmatico. Aggiungere nuovi oggetti al grafico, accedere e modificare le proprietà, impostare le posizioni, copiare e incollare gli oggetti e modificare il livello di ingrandimento dell'Editor di Stateflow.

Funzioni

espandi tutto

sfnewCreate Simulink model that contains an empty Stateflow block
sfrootRoot della gerarchia di Stateflow
sfclipboardClipboard object
sfgcoSelected objects in chart
Stateflow.findMatchingPortIdentify matching entry or exit port (Da R2021b)

Oggetti

espandi tutto

Grafico, blocco e oggetti macchina

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

Oggetti grafici

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 (Da 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

Oggetti non grafici

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

Appunti e oggetti dell'Editor

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

Funzioni oggetto

espandi tutto

Navigazione nella gerarchia

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

Accesso alle proprietà e loro modifica

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

Display di controllo

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

Mappatura dei simboli nei grafici secondari atomici e negli stati basati su Simulink

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

Copia e incolla di oggetti

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

Conversione di grafici e tabelle di transizione di stato

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

Argomenti

Esempi in primo piano