MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guia do Utilizador Página 1

Consulte online ou descarregue Guia do Utilizador para Software MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER. MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER User`s guide Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 130
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - Real-Time Workshop

Real-Time Workshop® For Use with Simulink ®Getting StartedVersion 6

Página 2 - How to Contact The MathWorks:

1 What Is Real-Time Workshop?1-4- The flexible scripting capabilities of the Target Language Compiler enable you to fully customize generated code.- E

Página 3 - Contents

3 Working with Real-Time Workshop3-44External mode supports communication via TCP/IP, serial, and custom transport protocols. The MEX-file name field

Página 4

Quick Start Tutorials3-457 Click Apply to save the Interface settings.8 Save the model.9 In the Real-Time Workshop pane, click Build to generate code

Página 5

3 Working with Real-Time Workshop3-46The top three buttons are for use after the target program has started. The two lower buttons open separate dialo

Página 6

Quick Start Tutorials3-474 Make sure that the External Signal & Triggering dialog is set to the defaults as shown:-Select all check box is selecte

Página 7 - Workshop?

3 Working with Real-Time Workshop3-48Click Close, and then close the External Mode Control Panel.For information on the options mentioned above, see “

Página 8

Quick Start Tutorials3-496 Open Scope blocks A and B. At this point, no signals are visible on the scopes. When you connect Simulink to the target pro

Página 9 - Capabilities and Benefits

3 Working with Real-Time Workshop3-50Part 4: Tuning ParametersYou can change the gain factor of either Gain block by assigning a new value to the vari

Página 10 - 1 What Is Real-Time Workshop?

Quick Start Tutorials3-51Tutorial 6: Generating Code for a Referenced ModelThe Model block, introduced in Version 6 of Simulink, enables an existing S

Página 11 - Extensible make process

3 Working with Real-Time Workshop3-524 Right-click any of the three highlighted blocks and select Create Subsystem from the pop-up context menu. You c

Página 12

Quick Start Tutorials3-53The border of the vdpmult subsystem thickens to indicate that it is now atomic. An atomic subsystem executes as a unit rather

Página 13 - VERIFICATION

Introducing Real-Time Workshop1-5• Target support- Turnkey solutions for rapid prototyping substantially reduce design cycles, allowing for fast turna

Página 14

3 Working with Real-Time Workshop3-548 Open the Configuration Parameters dialog from the Simulation menu or by typing Ctrl+E.The next four steps bypas

Página 15 - Toolboxes

Quick Start Tutorials3-55In this exercise you only supply the first two calling arguments (a model name and a target directory) and no return argument

Página 16

3 Working with Real-Time Workshop3-56Code for model reference simulation targets is placed in the slprj/sim subdirectory. Generated code for GRT, ERT,

Página 17 - Installing Real-Time Workshop

Quick Start Tutorials3-57This instructs the vdptop_converted model (and later its executable) to log time and output data to MAT-files for each time s

Página 18

3 Working with Real-Time Workshop3-586 Use the Model Explorer to inspect the newly created build directory, vdptop_converted_grt_rtw, in your current

Página 19 - Microsoft Visual C/C++

Quick Start Tutorials3-59To view a model’s generated code in Model Explorer, the model must be open. To open a file in a text editor, click a filename

Página 20

3 Working with Real-Time Workshop3-6011 A Model Explorer node named Code for vdpmult also appears under the node Code for vdptop_converted. Expand thi

Página 21

Quick Start Tutorials3-61/* Output and update for referenced model: 'vdpmult'*/void mr_vdpmult(const real_T *rtu_0, const real_T *rtu_1, rea

Página 22

3 Working with Real-Time Workshop3-62Working with Project DirectoriesWhen you view generated code in Model Explorer, the files listed in the Contents

Página 23 - Help and Documentation

Quick Start Tutorials3-63

Página 24

1 What Is Real-Time Workshop?1-6• Annotation of the generated code using the Description block property.• Control over naming and storage class for pa

Página 25

3 Working with Real-Time Workshop3-64

Página 26

Glossary-1 Glossaryapplication modulesWith respect to Real-Time Workshop program architecture, these are collections of programs that implement functi

Página 27 - Building an Application

Glossary-2expression foldingCode optimization technique that minimizes the computation of intermediate results at block outputs and the storage of su

Página 28 - 2 Building an Application

GlossaryGlossary-3host system Computer system on which you create and may compile your real-time application. Also referred to as emulation hardware.i

Página 29 - Real-Time Workshop Workflow

Glossary-4part of a Simulink model, it is by default noninlined unless you write your own .tlc file that inlines it.nonreal-time Simulation environme

Página 30

GlossaryGlossary-5simulation targetSet of code files generated for a model which is referenced by a Model block. Simulation target code is generated i

Página 31

Glossary-6virtual block Connection or graphical block, for example a Mux block, that has no algorithmic functionality. Virtual blocks incur no real-t

Página 32

Index-1IndexBblock target file 2-17build directorycontents of 2-27f14 example 3-18naming convention 2-26build processsteps in 2-15Ccode formatdefiniti

Página 33

IndexIndex-2subsystem.c 2-24subsystem.h 2-24generic real-time (GRT) target 3-4tutorial 3-9Hhostand target 3-3Mmake utility 2-13components 3-3MAT-files

Página 34

IndexIndex-3system target file 3-4TLC scripts 2-17template makefileintroduction to 3-5tutorialsbuilding generic real-time program 3-9code generation 3

Página 35 - Generating Code

Introducing Real-Time Workshop1-7Spiral Design ProcessWhen you work with tools from The MathWorks, your model represents your understanding of your sy

Página 36

IndexIndex-4

Página 37 - Save the Model Configuration

1 What Is Real-Time Workshop?1-8can verify that an algorithm works on a real-world rapid prototyping system. The spiral process lends itself naturally

Página 38

Introducing Real-Time Workshop1-9Roles of MathWorks Products in Software DevelopmentEarly in the design process, you use MATLAB and Simulink to help y

Página 39 - Automatic Program Building

1 What Is Real-Time Workshop?1-10Real-Time Windows Target or the xPC Target. With a rapid prototyping target, you connect your model to your physical

Página 40

Installing Real-Time Workshop1-11Installing Real-Time WorkshopYour platform-specific MATLAB installation documentation provides all the information yo

Página 41 - The Build Process

1 What Is Real-Time Workshop?1-12Third-Party Compiler Installation on WindowsMost Real-Time Workshop targets create an executable that runs on your wo

Página 42

Installing Real-Time Workshop1-13• Replace %INTELC71% with the root directory of the Intel Compiler installation.LCCThe freeware LCC C compiler is shi

Página 43 - Code Generation

How to Contact The MathWorks:www.mathworks.com Webcomp.soft-sys.matlab [email protected] Technical [email protected] Product

Página 44

1 What Is Real-Time Workshop?1-14If the WATCOM environment variable is not defined, you must define it to point to where you installed your Watcom com

Página 45

Installing Real-Time Workshop1-15On UNIX. On UNIX, the Real-Time Workshop build process uses the default compiler. The cc compiler is the default on a

Página 46

1 What Is Real-Time Workshop?1-16Real-Time Workshop DemosA good way to familiarize yourself with Real-Time Workshop is by browsing through its suite o

Página 47

Help and Documentation1-17Help and DocumentationReal-Time Workshop software is shipped with this Getting Started guide. Users of this book should be f

Página 48

1 What Is Real-Time Workshop?1-181 In the MATLAB window, click Desktop -> Help, Help -> Full product family help, or click the ? icon on the too

Página 49

Help and Documentation1-19You can customize output from Real-Time Workshop at the block, target, and makefile levels. For advanced uses, you may have

Página 50

1 What Is Real-Time Workshop?1-20

Página 51

2Building an ApplicationThis chapter expands the high-level discussion of code generation and the build process given in Chapter 1, “What Is Real-Tim

Página 52

2 Building an Application2-2Real-Time Workshop WorkflowThe typical workflow for applying Real-Time Workshop to the application development process inv

Página 53

Real-Time Workshop Workflow2-3ConfigurationNo YesDoneAdjust Configuration SettingsRun Model Advisor RequiresTuning?Generate CodeCode OK? Map Applicat

Página 54

iContents1What Is Real-Time Workshop?Introducing Real-Time Workshop . . . . . . . . . . . . . . . . . . . . . . 1-2Components and Features . . .

Página 55

2 Building an Application2-4Mapping Application Requirements to Configuration OptionsThe first step to applying Real-Time Workshop to the application

Página 56

Real-Time Workshop Workflow2-5• What is the highest priority for your application — traceability, efficiency, extra safety precaution, or some other c

Página 57 - Workshop

2 Building an Application2-6OptimizationBlock reduction optimizationClear Clear Set No impact SetImplement logic signals as Boolean data (vs. double)N

Página 58

Real-Time Workshop Workflow2-7Hardware ImplementationNumber of bitsNo impact No impact Target specificNo impact 8, 16, 32, 32Real-Time WorkshopGenerat

Página 59 - Code Formats

2 Building an Application2-8* Backward compatibility with previous release.Setting Configuration OptionsOnce you have mapped your application requirem

Página 60 - The Generic Real-Time Target

Real-Time Workshop Workflow2-9Although you can use the Model Advisor to improve model simulation, it is particularly useful for identifying aspects of

Página 61 - Template Makefiles

2 Building an Application2-10• You want to inspect the generated code. Is Real-Time Workshop generating what you expect?• You need to integrate custom

Página 62 - Configuration Parameters

Real-Time Workshop Workflow2-11For a more detailed discussion of the build process, see “Automatic Program Building” on page 2-13 and “The Build Proce

Página 63

2 Building an Application2-125 Click Apply.The name of the active configuration in the Model Hierarchy pane changes to the name you typed.6 Save the m

Página 64 - The f14 Demonstration Model

Automatic Program Building2-13Automatic Program BuildingReal-Time Workshop builds programs automatically for real-time applications in a variety of ho

Página 65 - Working and Build Directories

ii ContentsThe Build Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15Model Compilation . . . . . . . . . . . .

Página 66 - Setting Program Parameters

2 Building an Application2-14A high-level M-file command controls the Real-Time Workshop build process. By default, Real-Time Workshop issues the comm

Página 67 - SingleTasking

The Build Process2-15The Build ProcessReal-Time Workshop generates C code only or generates the C code and produces an executable image, depending on

Página 68

2 Building an Application2-16report contents vary depending on the target, but all reports feature clickable links to generated source files. The foll

Página 69

The Build Process2-17• Computes work vector sizes, such as those used by S-functions. (For more information about work vectors, refer to the Simulink

Página 70

2 Building an Application2-18Note Real-Time Workshop executes all user-written S-function target files, but optionally executes block target files fo

Página 71

The Build Process2-19During the final stage of processing, Real-Time Workshop invokes the generated make file, model.mk, which in turn compiles and li

Página 72

2 Building an Application2-20This stage is optional, as illustrated by the control logic in the preceding figure. You might choose to omit this stage,

Página 73

The Build Process2-21How Automatic Program Building Is ControlledCustomGenerateMakefileClick BuildButtonCreateExecutable?No InvokeYesGenerateCodeTempl

Página 74

2 Building an Application2-22Files and Directories Created by the Build ProcessThe following sections discuss• “Files Created During Build Process” on

Página 75 - Tutorial 2: Data Logging

The Build Process2-23| rt_nonfinite.c| modelsources.txt| f14_dt.h|+---tlc| This directory contains TLC files generated during the build| process. Thes

Página 76

iiiIndex

Página 77

2 Building an Application2-24- Exported Stateflow machine parented data- Model data structures, including rtM- Model entry point functions•model_priva

Página 78

The Build Process2-25• model.exe (on PC) or model (on UNIX), generated in current directory, not in build directoryExecutable program file created und

Página 79

2 Building an Application2-26• model_dt.hC header file used for supporting External Mode. Declares structures that contain data type and data type tra

Página 80 - Build button, type

The Build Process2-27• Project directory—slprjA subdirectory within your working directory. When models referenced via Model blocks are built for simu

Página 81 - Tutorial 3: Code Verification

2 Building an Application2-28Shared Utilities Directory in the Build Process” in the Real-Time Workshop User’s Guide documentation.

Página 83

2 Building an Application2-30

Página 84

3Working with Real-Time WorkshopThis chapter provides an overview of the ideas and technology behind Real-Time Workshop, and hands-on exercises to he

Página 85

3 Working with Real-Time Workshop3-2Basic Real-Time Workshop ConceptsEven if you have experience in building real-time systems, you may find it helpfu

Página 86 - Setting Up the Model

Basic Real-Time Workshop Concepts3-3Target and HostA target is an environment—hardware or operating system—on which your generated code will run. The

Página 88 - Click Apply

3 Working with Real-Time Workshop3-4The Generic Real-Time TargetReal-Time Workshop provides a generic real-time development target. The GRT target pro

Página 89

Basic Real-Time Workshop Concepts3-5Template MakefilesReal-Time Workshop uses template makefiles to build an executable from the generated code. The R

Página 90

3 Working with Real-Time Workshop3-64 Finally, make is invoked. make compiles and links a program from the generated code, as instructed in the genera

Página 91

Quick Start Tutorials3-7Quick Start TutorialsThis section provides hands-on experience with the code generation, program building, data logging, code

Página 92 - 3 Click Apply

3 Working with Real-Time Workshop3-8Compilers” on page 1-14 for more information on supported compilers and compiler installation.The f14 Demonstratio

Página 93 - HTML Code Generation Reports

Quick Start Tutorials3-9Tutorial 1: Building a Generic Real-Time ProgramThis tutorial walks through the process of generating C code and building an e

Página 94

3 Working with Real-Time Workshop3-10Note When a model contains Model blocks (which enable one Simulink model to include others), special project dir

Página 95

Quick Start Tutorials3-11Mode: SingleTaskingThe Solver pane with the modified parameter settings is shown below. Note the tan background color of the

Página 96 - Part 1: Setting Up the Model

3 Working with Real-Time Workshop3-12Selecting the Target ConfigurationNote The steps in this section do not require you to make changes. They are in

Página 97

Quick Start Tutorials3-134 From the list of available configurations, select Generic Real-Time Target (as shown above) and then click OK.Note The Sys

Página 98 - Fixed-step, and

1What Is Real-Time Workshop?This guide begins with a high-level overview of Real-Time Workshop®, describing its purpose, its component parts, its maj

Página 99

3 Working with Real-Time Workshop3-145 Select the Debug tab of the Real-Time Workshop dialog. The options displayed here control build verbosity and d

Página 100 - MEX-file arguments

Quick Start Tutorials3-156 Select the Symbols tab of the Real-Time Workshop dialog. The options on this pane control the look and feel of generated co

Página 101 - 8 Save the model

3 Working with Real-Time Workshop3-167 Select the Comments tab of the Real-Time Workshop dialog. The options displayed here control the types of comme

Página 102

Quick Start Tutorials3-178 Make sure that the Generate code only option is not selected, and save the model.Building and Running the ProgramThe Real-T

Página 103 - X in the Block column

3 Working with Real-Time Workshop3-18The content of many of the succeeding messages depends on your compiler and operating system. The final message i

Página 104 - Return

Quick Start Tutorials3-19f14rtw_grt_rtw contains these generated source files:The build directory also contains other files used in the build process,

Página 105 - A = 2 and B = 3

3 Working with Real-Time Workshop3-20To configure data logging, you use the Data Import/Export pane of the Configuration Parameters dialog. The proces

Página 106 - Part 4: Tuning Parameters

Quick Start Tutorials3-21enables Real-Time Workshop to generate code that logs the simulation time to the MAT-file with a related name, as you will se

Página 107 - Quick Start Tutorials

3 Working with Real-Time Workshop3-228 Verify that the simulation time and outputs have been saved to the workspace.whos *out Name Size

Página 108

Quick Start Tutorials3-23Part 2: Data Logging from Generated CodeIn the second part of the exercise, you build and run a Real-Time Workshop executable

Página 109

1 What Is Real-Time Workshop?1-2Introducing Real-Time WorkshopReal-Time Workshop® is an extension of capabilities of Simulink® and MATLAB® that automa

Página 110

3 Working with Real-Time Workshop3-244 Click Apply to register your changes.5 Generate code and build an executable: Click the Build button, type Ctrl

Página 111

Quick Start Tutorials3-25Tutorial 3: Code VerificationIn this tutorial, you verify the answers computed by code generated from the f14rtw model by com

Página 112

3 Working with Real-Time Workshop3-26The Stick Input signal to the scope block is logged to the array Stick_input during simulation. The generated cod

Página 113

Quick Start Tutorials3-273 Use the whos command to observe that the array variables Stick_input, Pilot_G_force, and Angle_of_attack have been saved to

Página 114

3 Working with Real-Time Workshop3-28!f14rtwThe executing program writes the following messages to the console.** starting the model ** ** created f14

Página 115 - Dialog pane

Quick Start Tutorials3-29Comparing Numerical Results of the Simulation and the Generated ProgramYour Simulink simulations and the generated code shoul

Página 116

3 Working with Real-Time Workshop3-30Tutorial 4: A First Look at Generated CodeIn this tutorial, you examine code generated from a simple model to obs

Página 117

Quick Start Tutorials3-315 Click the Solver tab and enter the following parameter values on the Solver pane:Solver options: set Type to Fixed-step. Se

Página 118

3 Working with Real-Time Workshop3-322 Click Apply.3 Click the Real-Time Workshop node and click the Generate code button.4 Because the Generate code

Página 119

Quick Start Tutorials3-335 The generated code is in the build directory, example_grt_rtw. The file example_grt_rtw\example.c contains the output compu

Página 120

Introducing Real-Time Workshop1-3embedded target products extend and tailor Real-Time Workshop code to run in a growing suite of microprocessor enviro

Página 121 - Glossary

3 Working with Real-Time Workshop3-34 example_P.SineWave_Phase) + example_P.SineWave_Bias; example_B.gain_out = example_B.sin_out * example_P.Gain

Página 122 - Glossary-2

Quick Start Tutorials3-35You will observe the effects of expression folding later in this tutorial. Not performing expression folding allows you to se

Página 123 - Glossary-3

3 Working with Real-Time Workshop3-36 sin(example_P.SineWave_Freq * example_M->Timing.t[0] + example_P.SineWave_Phase) + example_P.SineWave_B

Página 124 - Glossary-4

Quick Start Tutorials3-374 Click the Generate code button.5 As before, Real-Time Workshop generates code in the example_grt_rtw directory.6 Edit examp

Página 125 - Glossary-5

3 Working with Real-Time Workshop3-38Enabling this option causes Real-Time Workshop to produce an HTML file for each generated source file, plus a sum

Página 126 - Glossary-6

Quick Start Tutorials3-39you can navigate to identify the settings of every option in place at the time that the HTML report was generated.You can ref

Página 127

3 Working with Real-Time Workshop3-40The example presented uses the generic real-time target, and does not require any hardware other than the compute

Página 128

Quick Start Tutorials3-414 Define and assign two variables A and B in the MATLAB workspace as follows:A = 2; B = 3;5 Open Gain block A and set its Gai

Página 129

3 Working with Real-Time Workshop3-428 From the File menu, choose Save As. Save the model as ext_example.mdl.Part 2: Building the Target ExecutableIn

Página 130

Quick Start Tutorials3-432 Click the Data Import/Export tab, and clear the Time and Output check boxes. In this exercise, data is not logged to the wo

Comentários a estes Manuais

Sem comentários

Seiwa Sprzęt wodny podręczniki użytkownika

Lista Seiwa Sprzęt wodny produkty zawierają 22 instrukcje obsługi do modeli 14. Wszystkie podręczniki użytkownika w formacie pdf są dostępne do pobrania lub obejrzenia online.

Kliknij na poniższy alfabet, aby przejść do pełnej listy modeli zaczynających się od tej litery

Modele Rodzaj dokumentu
Explorer 3(v.7.0)
Instrukcja Użytkownika   Seiwa Explorer 3(v.7.0) User Manual, 8 strony
Instrukcja Użytkownika   Seiwa Explorer 3(v.7.0) Benutzerhandbuch, 8 strony
Instrukcja Użytkownika   Seiwa Explorer 3(v.7.0) Manuel d'utilisation, 8 strony
FT70 multi-touch
Instrukcja Użytkownika     Seiwa FT70 multi-touch User Manual, 2 strony
Marlin(v.16.31)
Instrukcja Użytkownika   Seiwa Marlin(v.16.31) User Manual, 12 strony
Radar tuning
Instrukcja Użytkownika   Seiwa Radar tuning User Manual, 14 strony
Seawave 12 MKII
Instrukcja Użytkownika   Seiwa Seawave 12 MKII Manual del usuario, 114 strony
Starfish 2nd Edition
Instrukcja Użytkownika   Seiwa Starfish 2nd Edition User Manual, 118 strony
Instrukcja Użytkownika   Seiwa Starfish 2nd Edition Manuale d'uso, 120 strony
Instrukcja Użytkownika   Seiwa Starfish 2nd Edition Benutzerhandbuch, 121 strony
SW AP01
Instrukcja Użytkownika   Seiwa SW AP01 User Manual, 52 strony
SW AP03
Instrukcja Użytkownika   Seiwa SW AP03 User Manual, 49 strony
Instrukcja Użytkownika   Seiwa SW AP03 Manuale d'uso, 36 strony
SW RP03
Instrukcja Użytkownika   Seiwa SW RP03 User Manual, 10 strony
SW RP05
Instrukcja Użytkownika   Seiwa SW RP05 User Manual, 6 strony
SW RP07
Instrukcja Użytkownika   Seiwa SW RP07 User Manual, 7 strony
SW701i SW701e
Instrukcja Użytkownika   Seiwa SW701i SW701e User Manual, 153 strony
Instrukcja Użytkownika   Seiwa SW701i SW701e Manuale d'uso, 157 strony
Instrukcja Użytkownika   Seiwa SW701i SW701e Benutzerhandbuch, 159 strony
Tigershark Plus
Instrukcja Użytkownika   Seiwa Tigershark Plus Manuale d'uso, 128 strony
Instrukcja Użytkownika   Seiwa Tigershark Plus User Manual, 109 strony