User manual MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5
Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!
If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Lastmanuals provides you a fast and easy access to the user manual MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5. We hope that this MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5 user guide will be useful to you.
Lastmanuals help download the user guide MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5.
You may also download the following manuals related to this product:
MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5 REFERENCE (1363 ko)
MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5 GETTING STARTED GUIDE (923 ko)
Manual abstract: user guide MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5
Detailed instructions for use are in the User's Guide.
[. . . ] Real-Time Workshop® Embedded CoderTM 5 User's Guide
How to Contact The MathWorks
Web Newsgroup www. mathworks. com/contact_TS. html Technical Support
www. mathworks. com comp. soft-sys. matlab suggest@mathworks. com bugs@mathworks. com doc@mathworks. com service@mathworks. com info@mathworks. com
Product enhancement suggestions Bug reports Documentation error reports Order status, license renewals, passcodes Sales, pricing, and general information
508-647-7000 (Phone) 508-647-7001 (Fax) The MathWorks, Inc. 3 Apple Hill Drive Natick, MA 01760-2098
For contact information about worldwide offices, see the MathWorks Web site. Real-Time Workshop® Embedded CoderTM User's Guide © COPYRIGHT 20022010 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied only under the terms of the license agreement. [. . . ] Note The Real-Time Workshop Embedded Coder file packaging differs slightly (but significantly) from the file packaging employed by the GRT, GRT malloc, and other nonembedded targets. For more information, see the Real-Time Workshop documentation.
18-2
Code Modules
Real-Time Workshop Embedded Coder File Packaging File
model. c or . cpp
Description Contains entry points for code implementing the model algorithm (for example, model_step, model_initialize, and
model_terminate).
model_private. h
Contains local macros and local data that are required by the model and subsystems. This file is included in the model. c file as a #include statement. You do not need to include model_private. h when interfacing handwritten code to the generated code of a model. Declares model data structures and a public interface to the model entry points and data structures. Also provides an interface to the real-time model data structure (model_M) with accessor macros. model. h is included in the subsystem . c or . cpp files of the model. If you are interfacing your handwritten code to generated code for one or more models, include model. h for each of those models.
model. h
model_data. c or . cpp
(conditional)
model_data. c or . cpp is conditionally generated. It contains
the declarations for the parameters data structure, the constant block I/O data structure, and any zero representations for the model structure data types. If these data structures and zero representations are not used in the model, model_data. c or . cpp is not generated. These structures and zero representations are declared extern in model. h. Provides forward declarations for the real-time model data structure and the parameters data structure. Function declarations of reusable functions might need these declarations. Also provides type definitions for user-defined types used by the model. Defines data types, structures, and macros required by Real-Time Workshop Embedded Coder generated code. Most other generated code modules also require these definitions. If the Generate an example main program option is on, this file is generated. (This option is on by default. ) See "Generate an example main program".
model_types. h
rtwtypes. h
ert_main. c or . cpp
(optional)
18-3
18
Generating Code Modules
Real-Time Workshop Embedded Coder File Packaging (Continued) File
autobuild. h
Description If the Generate an example main program option is off, this file is generated. (See "Generate an example main program". )
autobuild. h contains #include directives required by the static version of the ert_main. c main program module. Because the static ert_main. c is not created at code generation time, ert_main. c includes autobuild. h to access model-specific data
(optional)
structures and entry points. For more information, see "Static Main Program Module" on page 31-16.
model_capi. c or . cpp model_capi. h
(optional)
Provides data structures that enable a running program to access model signals, states, and parameters without external mode. To learn how to generate and use the model_capi. c or . cpp and . h files, see "Interacting with Target Application Data Using the C API" in the Real-Time Workshop documentation.
You can customize the generated set of files in several ways: · File packaging formats: Specify the number of source files generated for your model. [. . . ] This step is optional.
cgvSim. addPostLoadFiles({[cgvModel '_init. m']});
5 Specify a location where the object writes all output data and metadata
files for execution. This step is optional.
cgvSim. setOutputDir('cgv_output');
6 Execute the model.
result1 = cgvSim. run(); *** handling PostLoad file rtwdemo_cgv_init. m Start CGV execution of model rtwdemo_cgv, ComponentType topmodel, . . . connectivity sim, InputData rtwdemo_cgv_data. mat End CGV execution: status completed
7 Get the output data associated with the input data.
outputDataSim = cgvSim. getOutputData(1);
8 For the next mode of execution, SIL, repeat steps 27.
cgvSil = cgv. CGV( cgvModel, 'Connectivity', 'sil');
40-5
40
Verifying Numerical Equivalence of Results with Code Generation Verification API
cgvSil. addInputData(1, [cgvModel '_data']); cgvSil. addPostLoadFiles({[cgvModel '_init. m']}); cgvSil. setOutputDir('cgv_output'); result2 = cgvSil. run();
At the MATLAB command line, the result is:
*** handling PostLoad file rtwdemo_cgv_init. m Start CGV execution of model rtwdemo_cgv, ComponentType topmodel, . . . connectivity sil, InputData rtwdemo_cgv_data. mat ### Starting Real-Time Workshop build procedure for model: rtwdemo_cgv ### Successful completion of Real-Time Workshop build procedure for . . . [. . . ]
DISCLAIMER TO DOWNLOAD THE USER GUIDE MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5 Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... In any way can't Lastmanuals be held responsible if the document you are looking for is not available, incomplete, in a different language than yours, or if the model or language do not match the description. Lastmanuals, for instance, does not offer a translation service. Click on "Download the user manual" at the end of this Contract if you accept its terms, the downloading of the manual MATLAB REAL-TIME WORKSHOP EMBEDDED CODER 5 will begin.