Download Real-Time Workshop
Transcript
Writing S-Functions for Real-Time Workshop 10 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Classes of Problems Solved by S-Functions . . . . . . . . . . . . . Types of S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Files Required for Implementation . . . . . . . . . . . . . . 10-3 10-3 10-4 10-7 Writing Noninlined S-Functions . . . . . . . . . . . . . . . . . . . . . 10-8 Writing Wrapper S-Functions . . . . . . . . . . . . . . . . . . . . . . . 10-9 MEX S-Function Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9 TLC S-Function Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13 The Inlined Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-18 Writing Fully Inlined S-Functions . . . . . . . . . . . . . . . . . . . 10-19 Multiport S-Function Example . . . . . . . . . . . . . . . . . . . . . . . 10-20 Writing Fully Inlined S-Functions with the mdlRTW Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S-Function RTWdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Direct-Index Lookup Table Algorithm . . . . . . . . . . . . . The Direct-Index Lookup Table Example . . . . . . . . . . . . . . Writing S-Functions That Support Expression Folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Categories of Output Expressions . . . . . . . . . . . . . . . . . . . . Acceptance or Denial of Requests for Input Expressions . . Utilizing Expression Folding in Your TLC Block Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-21 10-22 10-22 10-24 10-46 10-47 10-52 10-56 Writing S-Functions That Specify Sample Time Inheritance Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-62 Writing S-Functions That Support Code Reuse . . . . . . . 10-65 Writing S-Functions for Multirate Multitasking Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-66 Rate Grouping Support in S-Functions . . . . . . . . . . . . . . . . 10-66 ix
Related documents
Real-Time Workshop User's Guide
Real-Time Workshop®
Writing S-Functions
Real-Time Workshop User`s Guide
MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS User`s guide
MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER User`s guide
MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER User`s guide
Color Transformation Language User Guide and
PROYECTO FIN DE CARRERA - J. Manuel Gomez-de
Real-Time Workshop Release Notes