正在加载图片...
Processing S-Function Parameters Examples of M-File S-Functions 27 Simple M-File S-Function Example 27 Example- Continuous State S-Function Example- Discrete State S-Function 2-12 Example- Hybrid System S-Function 2-14 Example- Variable Sample Time S-Function Writing s-Functions in C 3 Introduction 3-2 Creating C MEX S-Functions Building S-Functions Automatically 3-5 S-Function Builder Dialog Box 3-8 Setting the Include Path Example of a Basic C MEX S-Function Defines and includes ..327 Callback Implementations Simulink/Real-Time Workshop Interface 3-29 Building the Timestwo Example 330 Templates for C S-Functions 3-3 S-Function Source File Requirements 3-31 The insTruct Compiling c s-Functions ..3-34 How Simulink interacts with C s-Functions Process view Data view Writing Callback Methods Converting Level 1 C MEX S-Functions to Level 2ii Contents Processing S-Function Parameters . . . . . . . . . . . . . . . . . . . . . 2-6 Examples of M-File S-Functions . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Simple M-File S-Function Example . . . . . . . . . . . . . . . . . . . . . . 2-7 Example - Continuous State S-Function . . . . . . . . . . . . . . . . . . 2-9 Example - Discrete State S-Function . . . . . . . . . . . . . . . . . . . . 2-12 Example - Hybrid System S-Function . . . . . . . . . . . . . . . . . . . 2-14 Example - Variable Sample Time S-Function . . . . . . . . . . . . . 2-17 3 Writing S-Functions in C Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2 Creating C MEX S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3 Building S-Functions Automatically . . . . . . . . . . . . . . . . . . . . 3-5 S-Function Builder Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Setting the Include Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23 Example of a Basic C MEX S-Function . . . . . . . . . . . . . . . . . 3-25 Defines and Includes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27 Callback Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-27 Simulink/Real-Time Workshop Interface . . . . . . . . . . . . . . . . . 3-29 Building the Timestwo Example . . . . . . . . . . . . . . . . . . . . . . . . 3-30 Templates for C S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31 S-Function Source File Requirements . . . . . . . . . . . . . . . . . . . 3-31 The SimStruct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-33 Compiling C S-Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-34 How Simulink Interacts with C S-Functions . . . . . . . . . . . . 3-35 Process View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-35 Data View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-39 Writing Callback Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-43 Converting Level 1 C MEX S-Functions to Level 2 . . . . . . . 3-44
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有