La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.
Fonctions Simulink
Vous pouvez utiliser les fonctions Simulink® pour définir des fonctions accessibles dans la hiérarchie de modèle Simulink. Une fonction Simulink calcule un ensemble de sorties en fonction des entrées fournies et du comportement implémenté de la fonction. Vous pouvez utiliser les fonctions Simulink pour :
Spécifier le prototype de fonction, qui comprend le nom de la fonction, les arguments en entrée et en sortie, par exemple
y = f(u)
.Implémenter le comportement de la fonction dans l’environnement Simulink en utilisant un bloc Simulink Function, une fonction exportée depuis un diagramme Stateflow® ou un bloc S-Function.
Appeler et réutiliser votre fonction dans l’ensemble de la hiérarchie de modèle.
Pour plus d’informations, consultez Simulink Functions Overview.
Blocs
Rubriques
Comprendre les fonctions Simulink
- Simulink Functions Overview
Use Simulink functions to define functions that are accessible in the Simulink model hierarchy. - Define a Simulink Function in a Model
Define a Simulink function using a Simulink Function block, an exported Stateflow function, or an S-Function block. - Call a Simulink Function from a Model
Call a Simulink function using a Function Caller block, a Stateflow chart, a MATLAB Function or MATLAB System block, an S-Function block, or an event action of a SimEvents® block. - Scoped, Global, and Port-Scoped Simulink Function Blocks Overview
Specify visibility and access of Simulink Function blocks. - Simulink Function Blocks in Referenced Models
Add and access functions in model components.
Fonctions Simulink à portée limitée
- Scoped Simulink Function Blocks in Subsystems
Limit the scope of a function to a subsystem. - Scoped Simulink Function Blocks in Models
Limit the scope of a function to a model. - Resolve Error: Block Is Unable to Call The Scoped Simulink Function
Troubleshoot block unable to call the function error in Simulink.
Fonctions Simulink limitées aux ports
- Model Client and Server Components Using Function Ports
Use function ports to model client and server components in a service-oriented architecture. - Service Interfaces Overview (System Composer)
Create client and server ports, author service interfaces, and simulate service-oriented communication.
Informations connexes
- Model Service-Oriented Communication Between Sensors (System Composer)
- Simulate Asynchronous Services for Vehicle Headlight Management (System Composer)
- Trigger Simulink Components with Discrete Events in SimEvents (SimEvents)
- Configure AUTOSAR Client-Server Communication (AUTOSAR Blockset)
- Model AUTOSAR Adaptive Service Communication (AUTOSAR Blockset)
- Generate Reentrant Code from Simulink Function Blocks (Embedded Coder)