MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guide de l'utilisateur Page 267

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 386
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 266
Implementing Device Drivers
10-9
- Reading values from an I/O device and assigning these values to the
block’s output vector
y (ifitisanADC)
- Writing values from the block’s input vector
u,toanI/Odevice(ifitisa
DAC)
Terminating the program (e.g., zeroing the DAC outputs)
Required Functions
The S-function API requires you to define these functions:
Functions called during initialization
mdlInitializeSizes
mdlInitializeSampleTimes
mdlInitializeConditions
Function called to calculate block outputs
mdlOutputs
Function called to reset the hardware when the program terminates
mdlTerminate
The sections that follow describe how to implement these functions.
S-Function File Format
S-functions also require certain defined values and include files. The diagram
on the next page illustrates the format of a device driver S-function.
Vue de la page 266
1 2 ... 262 263 264 265 266 267 268 269 270 271 272 ... 385 386

Commentaires sur ces manuels

Pas de commentaire