MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Podręcznik Użytkownika Strona 267

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 386
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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.
Przeglądanie stron 266
1 2 ... 262 263 264 265 266 267 268 269 270 271 272 ... 385 386

Komentarze do niniejszej Instrukcji

Brak uwag