Main Content

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

Sottosistemi

Raggruppare i blocchi in sottosistemi funzionali, creare una gerarchia del modello

Man mano che un modello aumenta di dimensioni e complessità, è possibile semplificarlo raggruppando i blocchi in sottosistemi. Un sottosistema è un insieme di blocchi che vengono raggruppati in un unico blocco Subsystem.

Utilizzando i sottosistemi:

  • Si stabilisce un diagramma a blocchi gerarchico, in cui un blocco Subsystem si trova su un livello e i blocchi che compongono il sottosistema si trovano su un altro.

  • Si mantengono uniti i blocchi funzionalmente correlati.

  • Si riduce il numero di blocchi visualizzati nella finestra del modello.

  • Si stabilisce un’interfaccia con input e output.

Quando si crea una copia di un sottosistema, tale copia è indipendente dal sottosistema sorgente. Per riutilizzare il contenuto di un sottosistema in un modello o in più modelli, si possono considerare sottosistemi referenziati, modelli referenziati o sottosistemi collegati a un blocco in una libreria personalizzata. Per ulteriori informazioni, vedere Explore Types of Model Components.

Un sottosistema può essere virtuale o non virtuale. Un sottosistema virtuale fornisce una gerarchia grafica in un modello. Un sottosistema non virtuale fornisce una gerarchia grafica ed è eseguito come unità all'interno di un modello.

Blocchi

SubsystemGroup blocks to create model hierarchy

Funzioni

espandi tutto

Simulink.BlockDiagram.createSubsystemCreate subsystem containing specified set of blocks
Simulink.BlockDiagram.copyContentsToSubsystemCopy graphical contents from system to empty subsystem
Simulink.BlockDiagram.expandSubsystemReplace subsystem with subsystem contents
Simulink.SubSystem.convertToModelReferenceConvert subsystem to model reference
Simulink.SubSystem.copyContentsToBlockDiagramCopy graphical contents from subsystem to another model
Simulink.SubSystem.deleteContentsDelete contents of subsystem
convertAllSubsystemReferenceBlockToSubsystemConverts all subsystem reference blocks to regular Subsystem blocks (Da R2022a)
convertSubsystemReferenceBlockToSubsystemConverts a subsystem reference block to a regular Subsystem block (Da R2022a)
convertSubsystemToSubsystemReferenceConverts a Subsystem block to subsystem reference (Da R2022a)
getActiveInstancesReturns all the active instances of subsystem references (Da R2022a)
getAllDirtyInstancesReturns child Subsystem block diagrams that are referred in the given block diagram and are also being edited (Da R2022a)
getAllInstances Returns all subsystem reference blocks inside a block diagram (Da R2022a)
getAllReferencedSubsystemBlockDiagrams Returns all the child Subsystem block diagrams for a given block diagram (Da R2022a)
getNearestParentSubsystemReferenceBlock Returns the nearest parent subsystem reference for a block (Da R2022a)
getSystemOwningTheLockReturns the system that has acquired the lock for editing (Da R2022a)
isSystemLocked Checks if the system is locked due to an edit or update to the subsystem reference (Da R2022a)
Simulink.SubsystemReference.generateSignaturesGenerate unit test signatures of subsystem file (Da R2023a)
Simulink.SubsystemReference.getUnitTestNamesReturn names of unit tests of subsystem file (Da R2023a)
Simulink.SubsystemReference.removeSignaturesRemove previously generated unit test signatures of subsystem file (Da R2023a)
Simulink.SubsystemReference.showSignatureDiffDialogForSSOpen dialog to show difference in signatures of two subsystem blocks (Da R2023a)
Simulink.SubsystemReference.showSignatureDiffDialogForUnitTestsDisplay differences in signatures of Subsystem Reference block in model with unit test signatures of subsystem file (Da R2023a)

Strumenti

Advisor di conversione dei riferimenti del modelloConvert subsystems to referenced models
Riquadro dei file referenziatiView, save, and close referenced subsystems and models (Da R2020b)

Argomenti

Sottosistemi

Riferimenti del sottosistema