MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Uživatelská příručka Strana 267

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 386
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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.
Zobrazit stránku 266
1 2 ... 262 263 264 265 266 267 268 269 270 271 272 ... 385 386

Komentáře k této Příručce

Žádné komentáře