ECU Calibration. CANape 7.0 At a Glance ENGLISH

ECU Calibration ENGLISH CANape 7.0 – At a Glance CANape 7.0 – At a Glance CANape 7.0 At a Glance Vector Informatik GmbH, Ingersheimer Str. 24, D...
Author: Ralph Joseph
65 downloads 2 Views 2MB Size
ECU Calibration

ENGLISH

CANape 7.0 – At a Glance

CANape 7.0 – At a Glance

CANape 7.0 At a Glance

Vector Informatik GmbH, Ingersheimer Str. 24, D-70499 Stuttgart Phone +49 711 80670-0, Fax +49 711 80670-111, [email protected], www.vector-worlwide.com

Copyright © 2008 – Vector Informatik GmbH

1/32

CANape 7.0 – At a Glance >> Contents 1. Introduction ...................................................................................................................................... 3 1.1. Online Calibration with ASAM Standards ................................................................................. 4 1.2. Proprietary Online Calibration .................................................................................................. 6 1.3. Controller Specific Interfaces.................................................................................................... 6 1.4. Offline Calibration ..................................................................................................................... 7 2. New Features in CANape 7.0 .......................................................................................................... 8 2.1. Multi Recorder Concept ............................................................................................................ 8 2.2. Stop-Trigger, Events ................................................................................................................. 9 2.3. FIBEX Explorer for FlexRay ................................................................................................... 10 2.4. ODX Viewer ............................................................................................................................ 10 2.5. Visualize Stateflow Models in CANape .................................................................................. 11 2.6. Visualize Measurement Results in the Model Explorer .......................................................... 11 2.7. FlexRay................................................................................................................................... 12 2.8. Seed&Key for Vector Data Logger ......................................................................................... 12 2.9. Integration of OBD device ...................................................................................................... 12 2.10. Handling of Map-File-Structures ........................................................................................... 13 2.11. Driver Assistant ECU Development for Park Assistant ........................................................ 13 3. CANape Overview ......................................................................................................................... 14 3.1. The CANape Family ............................................................................................................... 14 3.1.1. CANape Base Product .................................................................................................... 14 3.1.2. CANape Options ............................................................................................................. 15 3.1.3. CANgraph........................................................................................................................ 15 3.1.4. CANdito ........................................................................................................................... 15 3.1.5. CANditoFlash .................................................................................................................. 16 3.1.6. ASAP2 Tool Set: Create, Update and Merge A2L files................................................... 16 3.1.7. ASAP2 Lib: Function Library for Reading ASAP2 Files .................................................. 16 3.1.8. ASAP2 File Editor: Create and Visualize ECU Description Files .................................... 16 3.2. Overview Use Cases .............................................................................................................. 16 3.3. Interfaces between CANape and ECUs ................................................................................. 17 3.4. Integration of analog/digital measurement systems ............................................................... 18 4. Use Cases...................................................................................................................................... 19 4.1. ECU Measurement and Calibration over CAN, FlexRay and LIN .......................................... 19 4.2. CAN, FlexRay and LIN Signal Measurement ......................................................................... 20 4.3. GPS Integration ...................................................................................................................... 20 4.4. Audio and Video Integration ................................................................................................... 21 4.5. Measurement of Analog and Digital Signals .......................................................................... 22 4.6. CANape as a Data Logger ..................................................................................................... 23 4.7. XCP Bypassing ....................................................................................................................... 23 4.8. Model-Based Development .................................................................................................... 24 4.9. Diagnostics ............................................................................................................................. 24 4.10. Flash Programming .............................................................................................................. 25 5. Some Special Features.................................................................................................................. 27 5.1. MATLAB/Simulink/CANape Combination ............................................................................... 27 5.1.1. Exporting Measurement Data into MATLAB Format....................................................... 27 5.1.2. Exporting Parameter files into an M-File ......................................................................... 27 5.1.3. Exporting A2L + Parameter files into an M-File .............................................................. 28 5.1.4. Control CANape from MATLAB ...................................................................................... 28 5.1.5. Visualize and navigate in Simulink/Stateflow Models ..................................................... 29 5.1.6. Run Simulink Models as DLLs in the CANape Environment .......................................... 29 5.1.7. Using Panels and Scripts in CANape.............................................................................. 31 5.2. Calibration Data Management ................................................................................................ 31 5.3. Automatic Offline Analyzing.................................................................................................... 32

Copyright © 2008 – Vector Informatik GmbH

2/32

CANape 7.0 – At a Glance 1. Introduction This document gives you general information about measurement and calibration of ECUs. The technical details are based on CANape, Version 7.0 (Released in July 2008). Section 1: “Introduction” has details about the basic concepts of ECU measurement & calibration. Section 2: “New Features in CANape 7.0”, briefly describes its most important new features. Section 3: “CANape Overview” provides information about the CANape product family, and the CANape Options. Section 3.2: “Overview Use Cases”, briefly describes the different use cases of CANape. More detailed information about the use cases can be found in Section 4 “Use Cases”. There are a great many special features in CANape. In Section 5 “Some Special Features” some of the most important features of CANape are picked. Please visit the Download-Center of the Vector Homepage (English or German) and download a demo version of CANape and satisfy yourself about the functionality of CANape. In the download center you will find additional CANape presentations, technical articles, too. If you need any assistance, please contact Vector or do not hesitate to contact the author: [email protected]

Copyright © 2008 – Vector Informatik GmbH

3/32

CANape 7.0 – At a Glance 1.1. Online Calibration with ASAM Standards CANape is the most used tool to calibrate ECUs online with ASAM standards. Communication between the calibration tool and the ECU is necessary to establish Read- / Write-Access to the internal memory of the ECU. The entire communication is based on the ASAM Interface model.

Online calibration is based on an address-oriented read-/write access into the memory of the ECU. The MC (Measurement and Calibration) tool sends requests like "give me the content of the memory address xyz" or "set the content of the memory address xyz to the value abc". A protocol driver in the ECU, a physical connection between the tool and the ECU, and a description file (A2L) that maps the object names and the addresses are necessary for calibration.

Copyright © 2008 – Vector Informatik GmbH

4/32

CANape 7.0 – At a Glance ‰

Read / write access to the ECU memory

‰

Modify the parameters „on the fly“

‰

Watch the „response“ (reaction) of the ECU

‰

Evaluate the effects by T

Analysing the bus messages

T

Analysing analog/digital sensor signals

T

Analyse ECU-internal variables (see Measurement Data Acquisition) T

Input and output value of the control algorithm

T

Sensor input values

The protocols are either CCP (CAN Calibration Protocol) or XCP (Universal Measurement and Calibration Protocol). Vector offers: > free download of a CCP driver source code > free download of the XCP basic driver (scope of operation is equivalent to the CCP code) > complete embedded ECU stack including a CCP or professional XCP driver > support in setting up a calibration approach for your projects > solutions for generating the A2L files The benefits of these solutions are: > The protocols are standards. Drivers and tools are available from different vendors. There is no dependence on any tool vendor. You are free to choose the tool chain. > For example, XCP can be used on different hardware interfaces, like: CAN, Ethernet, USB, FlexRay, Lin, SPI/SCI, etc. High Speed access in the early development phase of a fast interface is possible with the same protocol used in the serial phase with e.g. XCP on CAN. > ECU connection is possible, even to an integrated ECU (e.g. the transmission ECU in the oil sump) Disadvantages of the solution: > Much time and effort for protocol implementation > Controller resources. That means flash- and RAM-memory is necessary (~1 – 3kByte ROM, and the necessary RAM depends on the amount of measurement data). > Controller load (e.g. measurement data collection, bus communication) > Please send your questions, additional requirements or further information to the author or visit Vector’s contact page.

Copyright © 2008 – Vector Informatik GmbH

5/32

CANape 7.0 – At a Glance 1.2. Proprietary Online Calibration CANape offers the standardized way to do measurement and calibration, but there are other ways as well. One way may be equivalent to the standard based online calibration, using A2L files to describe the relationship between the names of the objects and their addresses. The big difference is the connection between the ECU and the measurement and calibration tool. There are solutions on the market with special hardware connectors to the address and data buses of the controller. The biggest benefit is that you can realize higher bandwidth than with CCP on CAN. But you also need instrumentation in the embedded code and resources at run time. In serial ECUs or in integrated ECUs you normally cannot use this solution.

Please be aware of the connection between the measurement and calibration tool and the ECU. In the case of a proprietary protocol, the possible tool chain depends on this protocol. Another financial aspect is the re-use of the hardware adapters on the ECU. These adapters are different from controller to controller. A project with a new controller may mean that you have to buy the complete hardware interfaces again. Another topic is the development of the chip vendors. Memory is becoming more and more integrated in the controller chip itself, so there is no way to get direct access to the address and data buses of this internal memory. The solutions are new controller interfaces, like Nexus, JTAG, etc. The 'trace' or 'debugging" interfaces offer access to the internal information of the controller. But please take care anyway when using these interfaces. Connecting these interfaces to the PC tool should be standard-based. The best protocol for measurement and calibration is XCP. With Ethernet as the physical connection (XCP on Ethernet) you are free to choose the tool chain.

1.3. Controller Specific Interfaces To offer its customers a high performance connection to the controller, Vector has developed a new hardware family to connect the controller with the PC via the trace or debug interfaces, like Nexus, JTAG, etc. The connection to the PC is realized with XCP on Ethernet. The hardware family is called 'VX' and it offers flexible handling of different controllers and debugging / trace interfaces.

Copyright © 2008 – Vector Informatik GmbH

6/32

CANape 7.0 – At a Glance

These solutions are now ready for the general market. But because of the fact that the controller interfaces are different from controller to controller, Vector can't offer a solution for every chip vendor. Please feel free to contact us directly: Send an email to the author or visit Vector’s contact page. Other solutions are available on the market to connect CANape to the controller via debugging interfaces (e.g. solutions from Compact Dynamics and iSYSTEM).

1.4. Offline Calibration To calibrate ECUs offline, means to modify the parameter set of the ECU software by flash programming. The new flash file can be generated via CANape without the necessity of new compiling and linking. CANape 'knows' the position of the object in the binary file because of the MAP file content. In a hex file window the user can jump to the right memory address in the hex file and change the content. CANape can flash the new content with CCP, XCP, KWP2000 or UDS. If the content of the binary file is changed with a new compiler / linker run, CANape is just used as a flash tool.

Copyright © 2008 – Vector Informatik GmbH

7/32

CANape 7.0 – At a Glance 2. New Features in CANape 7.0 Here is a list of some of the new features of CANape 7.0. There are a lot more.

2.1. Multi Recorder Concept CANape now offers the possibility to use the recorder functionality multiple times instead of just one time. For example, you could use one recorder to store the data permanently and another recorder to store it only when it is triggered. The recorders can be used completely independently. Using its own commands: Start, Stop, Trigger, each recorder has its own measurement data files, ...

Signal names, measurement rate, .. Video / audio Functions Global variables Matlab / Simulink models Visualize data

Trigger

Recorder 1

Store data MDF_1

AVI_1

Signal names, measurement rate, .. Video / audio Functions Global variables Matlab / Simulink models Visualize data

Trigger

Recorder n

Store data MDF_n

Copyright © 2008 – Vector Informatik GmbH

AVI_n

8/32

CANape 7.0 – At a Glance 2.2. Stop-Trigger, Events Up to CANape 6.5 only Start Triggers were supported, but in 7.0 Vector also added the possibility to use Stop-Triggers for each recorder. For that Vector also added a new Event concept. Events might be signal-, system- or keyboard-based.

Copyright © 2008 – Vector Informatik GmbH

9/32

CANape 7.0 – At a Glance 2.3. FIBEX Explorer for FlexRay The FIBEX Explorer visualizes the FlexRay data bases.

2.4. ODX Viewer Vector also delivers the ‘EffectiveODX Viewer’ to visualize the ODX diagnostic data bases in a convenient way.

Copyright © 2008 – Vector Informatik GmbH

10/32

CANape 7.0 – At a Glance 2.5. Visualize Stateflow Models in CANape Up to CANape 6.5 to the user could visualize Simulink models in CANape. Now Stateflow models are supported, too. It is more than just visualizing. The CANape Model Explorer offers the possibility to completely navigate / search etc. model objects. The user does not need a MATLAB/Simulink license.

2.6. Visualize Measurement Results in the Model Explorer The values can be shown directly in the Model Explorer at measurement run time.

Copyright © 2008 – Vector Informatik GmbH

11/32

CANape 7.0 – At a Glance 2.7. FlexRay Again Vector added a lot of functionality for FlexRay and XCP on FlexRay, e.g.: > Dynamic bandwidth distribution for XCP on FlexRay > Handle measurement of e.g. 1ms raster of ECU signals with 5ms FlexRay cycle time > Support of FlexRay bus logging into BLF files > FlexRay Trace: Display of Transport Layer > BLF and MDF files, e.g. from CANalyzer or CANoe, can be used for offline evaluation in CANgraph or CANape

2.8. Seed&Key for Vector Data Logger Seed&Key algorithms can be generated in the function editor of CANape. The algorithms can be used in the Vector data loggers (e.g. Multilog, GL1000) to make it possible to access ECU-internal data via CCP and XCP.

2.9. Integration of OBD device A new device type is available in CANape 7.0. Just add an OBD device to have access to all OBD defined information.

Copyright © 2008 – Vector Informatik GmbH

12/32

CANape 7.0 – At a Glance 2.10. Handling of Map-File-Structures If the structures are itemized in the MAP file, CANape can handle structures like a parameter or measurement object out of the MAP file. Drag&Drop

Structures can be handled like other objects ‰

Drag & Drop

‰

Visualization

‰

..

2.11. Driver Assistant ECU Development for Park Assistant With the Option Advanced Multimedia, CANape offers the developers of driver assistant ECUs a lot of functionality. In CANape 7.0 Vector added help for the developers of park assistant systems. They now can visualize the history of a car parking manoeuvre.

Copyright © 2008 – Vector Informatik GmbH

13/32

CANape 7.0 – At a Glance 3. CANape Overview 3.1. The CANape Family The CANape Family consists of the following tools: > CANape + Options > CANgraph > CANdito > CANditoFlash > ASAP2 Tool-Set > ASAP2 Lib > ASAP2 Editor

3.1.1. CANape Base Product CANape base product comprises everything you normally need for measurement, calibration, diagnostic, flash and analyzing purposes. Measurement and calibration of ECU internal values/parameters: > CCP (CAN Calibration Protocol) on CAN and Ethernet > XCP (Universal Calibration Protocol) on CAN, on FlexRay, on LIN, on Ethernet, on USB, on RS232, on SPI/SCI, on DLL (integrate user-defined protocols) Measurement of bus information: > CAN > FlexRay > LIN Measurement of analog / digital data via: > 3rd party measurement hardware vendors, like CSM, Etas, IMC, Ipetronik, National Instruments, .. > Vector measurement hardware: IOcab, CANextender Measurement of environmental information: > Video measurement via cameras with DirectX Interfaces > Audio measurement via camera or microphone > GPS information with GPS receivers, based on NMEA protocol Diagnostics: > Keyword 2000 on K-Line > Keyword 2000 on CAN > UDS on CAN > in a Service Pack of CANape 7.0 Diagnostics and Flashing on FlexRay will be supported > CANape can handle Vector’s own diagnostic description format CDD, as well as ODX CANape delivers the following data base editors: > A2L Editor (to view, generate, split, merge, compare and update A2L Files) > CANdb++ Editor for CAN description files in DBC format Copyright © 2008 – Vector Informatik GmbH

14/32

CANape 7.0 – At a Glance > > > >

FIBEX Explorer for FlexRay data bases LIN Viewer for LIN data bases Diagnostic Viewer for diagnostic description format CDD Diagnostic Viewer for diagnostic description format ODX

MATLAB/Simulink Integration: > Visualize Simulink models in CANape without the need of a MATLAB/Simulink license > Generate DLLs out of MATLAB/Simulink models running in the CANape context (e.g. for XCP Bypassing) > Control CANape via M-file scripts out of MATLAB > Export measurement files into MATLAB format > Export Parameter files into MATLAB Format Calibration Data Management (CDM): > CANape contains a CDM Studio to visualize, control, merge, etc. parameter files in different formats > Flashing code and/or data into ECUs: CANape can be used to flash via CCP and XCP, KWP2000 and UDS. Different flash processes can be realized with the internal script language. It's a kind of data driven flashing. One tool can carry out every flash job! CANape also supports the flash standard ODX-F! Miscellaneous: > Generate User-specific GUI via an integrated Panel Editor > C-like script language to calculate algorithms and to control CANape

3.1.2. CANape Options Advanced Multimedia: this Option helps to develop driver assistance ECUs. It visualizes the sensor signals as graphic objects in a “bird’s eye view” and on the video stream. This allows the user to see the objects detected by the sensors. GPS: GPS information may be measured without this option. To visualize the position / route it is necessary to use the option (Europe, USA and Japan are available).

3.1.3. CANgraph CANgraph is the standalone offline analyzing tool for measurement data. It contains exactly the same offline functionality as CANape. It can be used not only for analyzing CANape-specific data, but CANalyzer, CANoe, data logger measurement files and many more can be analyzed as well. The Option GPS and Advanced Multimedia can also be used in combination with CANgraph to offer a very price attractive way of analyzing measurement data.

3.1.4. CANdito CANdito is, like CANgraph, a 'little brother’ of CANape. It contains all the diagnostic-specific features of CANape, but no measurement and calibration via the CCP or XCP protocol.

Copyright © 2008 – Vector Informatik GmbH

15/32

CANape 7.0 – At a Glance 3.1.5. CANditoFlash As described under the topic “Flash”, CANape and CANdito are flash engines for data-driven flash processes. Flash scripts developed in CANape or CANdito can be used to flash ECUs with CANditoFlash. It is the smoothest way to migrate into ODX-F based flashing to standardize your flash process.

3.1.6. ASAP2 Tool Set: Create, Update and Merge A2L files In CANape you can update and merge ASAP2 files manually. The ASAP2 Tool Set can be used to do this automatically. The ASAP2 Tool Set consists of three different programs: The ASAP2 Creator to generate A2L fragments out of C Code comments, the ASAP2 Updater and the ASAP2 Merger for updating and for merging ASAP2 files respectively. The ASAP2 Updater updates the address and data type information of an ASAP2 file using a linker map file. The ASAP2 Merger merges several ASAP2 files into a common ASAP2 file.

3.1.7. ASAP2 Lib: Function Library for Reading ASAP2 Files ASAP2 Lib is a function library for reading the ASAP2 files of all released versions, including the current version 1.51. The library has been developed for the C programming language, and can be embedded in applications.

3.1.8. ASAP2 File Editor: Create and Visualize ECU Description Files ECU calibration that is performed with a measurement and calibration system such as CANape requires an ECU description file in ASAP2 format. The ASAP2 Editor is the right solution for creating and visualizing such standardized ASAP2 ECU description files. This is the standalone version of the A2L editor which is part of every CANape license.

3.2. Overview Use Cases For more detailed information about the use cases, please take a look at Section 4 “Use Cases”. ECU measurement & calibration: Calibrate ECUs via different protocols, like CCP, XCP via CAN, FlexRay and LIN CAN/LIN/FlexRay signal measurement: CANape imports data description files, like DBC, LDF and FIBEX to measure and interpret the content of the messages. GPS recording: Parallel and time synchronized, the GPS-based position can be measured and the position can be shown on the map (available for Europe, USA, and Japan)

Copyright © 2008 – Vector Informatik GmbH

16/32

CANape 7.0 – At a Glance

Multimedia recording audio & video: Time synchronized to all the other values, CANape stores video and audio data in an AVI file. This is especially important for the development of driver assistance solutions. Data logging: CANape can be used as a complete standalone data logger. That means: After booting the PC (e.g. industrial design) CANape starts automatically with the pre-defined measurement configuration. No interaction with a user is necessary. XCP Bypassing: CANape is a complete and powerful XCP bypassing coordinator. CANape and the laptop may be used as a complete rapid prototyping environment. Model based Development: In combination with MATLAB/Simulink, CANape is a development platform. CANape can be used e.g. as a running environment for model-based code and for showing the content of the model in CANape itself. Diagnostics: CANape supports KWP2000 and UDS on CAN and KWP2000 on K-Line as a complete diagnostic tester. Flash Programming: With the integrated programming language, CANape can flash program and / or data via diagnostic routines or via CCP and XCP. Includes support of ODX-F based flashing.

3.3. Interfaces between CANape and ECUs CANape supports standard interfaces like CAN, LIN and FlexRay to monitor the data and to communicate via different protocols (KWP2000, UDS, CCP and XCP) on these bus systems. But it is also possible to use interfaces like NEXUS, JTAG, AUD, Dual Ported RAM and others for measurement and calibration purposes.

Copyright © 2008 – Vector Informatik GmbH

17/32

CANape 7.0 – At a Glance

3.4. Integration of analog/digital measurement systems CANape supports a lot of different hardware measurement systems. With the open "XCP on DLL Interface", Vector is able to integrate, together with the customers, any other protocol or measurement hardware into CANape, without the need to change anything in CANape itself. That makes the solution fast and convenient.

Copyright © 2008 – Vector Informatik GmbH

18/32

CANape 7.0 – At a Glance 4. Use Cases 4.1. ECU Measurement and Calibration over CAN, FlexRay and LIN There are two different ways to calibrate an ECU: Offline and Online calibration OFFLINE Calibration means: The content of an ECU program is changed by flashing a new file into the flash memory. To do that, the flash file has to be changed. CANape supports this calibration method by making it possible to modify the flash file. The Linker MAP file with the address information is necessary. Because CANape can flash via CCP, XCP, KWP2000 on K-Line, KWP2000 on CAN and UDS on CAN, the changed file can be flashed directly into the ECU with CANape. ONLINE Calibration means: Modification of the parameters in the memory ”on the fly”. to make this possible, a connection between the calibration tool and the memory must be established. The most common way is via a protocol like CCP or XCP to realize the read / write access to the memory. These protocols are ASAM standards.

CANape offers: > CCP on CAN and Ethernet > XCP on CAN, FlexRay, Ethernet, USB, RS232, SPI, SCI, LIN 1.3 and 2.0, and with the ”XCP on DLL” interface, every protocol or interface can be integrated into CANape.

Copyright © 2008 – Vector Informatik GmbH

19/32

CANape 7.0 – At a Glance 4.2. CAN, FlexRay and LIN Signal Measurement To analyze bus signals, CANape reads the description files of the buses: > CAN, described by a DBC file > FlexRay, described by a FIBEX file > LIN, described by an LDF file > Diagnostic data, described by a CDD or ODX file Regarding the description files, CANape contains the following editors / viewers in every license: > CANdb++ Editor for the DBC Files > LIN Viewer for LDF Files > FIBEX Explorer for FIBEX Files > CANdelaStudio Viewer for CDD Files > ODX Viewer for ODX Files

4.3. GPS Integration Connect an NMEA-based GPS receiver to CANape (e.g. via USB) and integrate the receiver as a device into the project. The GPS signals (coordinates, time, speed ...) can be measured and shown like any other signal in the different measurement windows. With the Option GPS for CANape, the position can be shown on the maps. The maps are available for USA, Europe and Japan.

Copyright © 2008 – Vector Informatik GmbH

20/32

CANape 7.0 – At a Glance 4.4. Audio and Video Integration CANape offers the integration of video cameras and audio inputs to store video and audio data streams in AVI files. The AVI file is time synchronized to measurement file of all the other signals. One possible use case for this would be a voice recording of driver comments.

It is especially necessary for the development of driver assistance systems for the developer to be able to visualize the sensor results. What objects did the radar sensor detect? In what ways can we visualize the results of lane- or park-assistant systems? With the Option Advanced Multimedia you can transform sensor information into graphical objects. For example, the vehicle detected in front of the driver’s car is shown as a rectangle. These objects are superimposed over the video stream and in a bird’s eye view.

Copyright © 2008 – Vector Informatik GmbH

21/32

CANape 7.0 – At a Glance

To optimize the development of video sensor systems and to save test drives, CANape can simulate video streams. A previous measurement can be used to simulate a video stream and replay CAN data. This allows you to reproduce any driving situations in the lab. The ECU can be calibrated at specific times during the replay of video and measurement data .

4.5. Measurement of Analog and Digital Signals With CANape the direct measurement of analog and digital signals is possible. Vector’s own measurement equipment as well as 3rd party products are supported. CANape offers an open interface based on the XCP standard. The “XCP on DLL” driver can be used to transform any interface or protocol into XCP. This allows for a company’s own protocol to be integrated into CANape. Additionally, support for 3rd party vendor measurement equipment can also be added (see Section 3.4). Copyright © 2008 – Vector Informatik GmbH

22/32

CANape 7.0 – At a Glance 4.6. CANape as a Data Logger When it is integrated on an industrial PC, CANape is a powerful standalone data logger. Interaction with a user is not necessary. When the PC is powered on, CANape automatically starts the previously defined measurement job. Vector offers complete solutions, including for an industrial PC.

4.7. XCP Bypassing CANape is used as a Bypassing Coordinator. Bypassing based on the XCP protocol is a standardized way to simplify the development process. A function that has not yet been integrated in the ECU can be calculated on another hardware platform. In the case of CANape, the function can be generated by Simulink and a DLL is generated with The Mathworks’ Real-Time Workshop and the Compiler and Linker. The input values are measured, taken out of the ECU, calculated in the function running as a DLL in the CANape context, and the results are sent back into the ECU via the XCP STIM mechanism. Communication flow for a bypassing use case:

Generating the DLL is easy. Just use the 'CANape Target' as the generation target in Real-Time Workshop. The CANape Target is part of the 'MATLAB Integration Packet' in CANape.

Copyright © 2008 – Vector Informatik GmbH

23/32

CANape 7.0 – At a Glance 4.8. Model-Based Development CANape can be used in the very early stages of the model-based development process. There are a couple of different ways to combine CANape and MATLAB/Simulink. For example, the user can generate C code with the Real-Time Workshop out of the model directly for CANape. The “CANape Target” is part of every CANape license. After compiling a linking, the model runs as a DLL in the CANape context. That meansthat no additional Rapid Prototype Hardware is necessary. Here is an overview of the possible ways to integrate MATLAB/Simulink/CANape into a tool chain: > Export measurement data into the MATLABformat > Export parameter files into the MATLAB format > Export A2L and parameter files into the MATLAB format > Control CANape with MATLAB M-Files and CANape-API > Show Simulink Models in CANape Explorer > Run Simulink Models as DLLs together with CANape > Run Simulink Models as DLLs together with CANoe > Run Simulink Models as MEXW32 together with CANape > Run Simulink Models as EXE on Win 32 OS > Run Simulink Models on xPC Target For some more details, please take a look at Section 5.

4.9. Diagnostics CANape as a complete diagnostic tester: CANape supports KWP2000 on K-Line, KWP2000 and UDS on CAN. The description files can be CDD files (Vector format, generated with the authoring tool CANdelaStudio) or ODX. In the second Service Pack of CANape 7.0, Vector will offer diagnostics and flashing on FlexRay. With the “Diagnostic Console” and a “Fault Memory Window”, the user has full access to all diagnostic data and services.

Copyright © 2008 – Vector Informatik GmbH

24/32

CANape 7.0 – At a Glance

4.10. Flash Programming CANape is a complete flash engine via CCP, XCP, KWP2000 and UDS: CANape can flash data and program code via these protocols. When it uses the diagnostic protocols KWP2000 and UDS, CANape can perform every flash process with the internal script language of CANape. Even ODX-F based flashing is supported by CANape. Flashing on FlexRay with diagnostic protocols will be available in the second Service Pack of CANape 7.0.

Copyright © 2008 – Vector Informatik GmbH

25/32

CANape 7.0 – At a Glance

Copyright © 2008 – Vector Informatik GmbH

26/32

CANape 7.0 – At a Glance 5. Some Special Features 5.1. MATLAB/Simulink/CANape Combination 5.1.1. Exporting Measurement Data into MATLAB Format The measurement format most commonly used with CANape is MDF. CANape can export the measurement data into different formats. CANape can also be used to export the data into the MAT file format.

5.1.2. Exporting Parameter files into an M-File After calibrating the parameters with CANape, you can export the parameter data into an M-file. After running the M-file in MATLAB, the parameters in the MATLAB Workspace are set to the new values. %CANape Parameter ExportV1.0 par_info.date ='2008-05-16' par_info.name ='Andreas Patzer' par_info.department ='PMC' par_info.comment ='Test of Parameterset Export' %Begin Copyright © 2008 – Vector Informatik GmbH

27/32

CANape 7.0 – At a Glance Curve1 = [ 1 2 3 4 5 6 8 12]; %[]@CANAPE_ORIGIN@Curve1 Curve2 = [ 11 12 13 14 15 16 18 22]; %[]@CANAPE_ORIGIN@Curve2 Curve3 = [ 21 22 23 24 25 26]; %[]@CANAPE_ORIGIN@Curve3 KF1 = [ 0 0 0 0 0 0 1 2 0 0 0 0 0 0 2 3 0 0 0 0 1 1 2 3 0 0 0 1 1 2 3 4 0 1 1 2 3 4 5 7 1 1 1 2 4 6 8 9 1 1 2 4 5 8 9 10 1 1 3 5 8 9 10 10]; %[]@CANAPE_ORIGIN@KF1

5.1.3. Exporting A2L + Parameter files into an M-File Defining A2L parameters in the MATLAB Workspace might be difficult if a large number of parameters and measurement signals had to be generated from scratch. CANape offers the possibility of exporting the A2L content into an M-file format. To set the default values, a parameter file is necessary, too. This feature is very useful, especially for migrating hand written code with existing A2L databases into the model-based development process. Name, Min, Max, Type, .. Value

A2L

After Run M-file in Matlab CDM

Export via

Studio Templates PAR

M

TestWord_200 = ASAP2.Signal; TestWord_200.Min = 0.000000; TestWord_200.Max = 255.000000; TestWord_200.DocUnits = '‘; TestWord_200.StorageClass = 'ExportedGlobal‘; TestWord_200.Description = '‘; TestWord_200.DataType = 'uint16‘; TestWord_200.SampleTime = [-1]; TestWord_200.InitialValue = '9508';

5.1.4. Control CANape from MATLAB CANape contains an interface called “CANape API” which provides services to other programs for accessing an ECU/bus at run time for measurement and calibration purposes. The main purpose of the CANape API is to use the functionality of CANape from other programs like MATLAB.

Copyright © 2008 – Vector Informatik GmbH

28/32

CANape 7.0 – At a Glance Matlab M-File

CANape API

CANape CCP, XCP CAN, LIN, FlexRay, ..

ECU 1

ECU 2

ECU n

5.1.5. Visualize and navigate in Simulink/Stateflow Models CANape offers the possibility to visualize Simulink/Stateflow models directly in CANape. The user can navigate in the model and has access to the A2L objects by selecting the model elements. The visualization of the model is intended for use by the application engineer, who does not require a Simulink license to visualize it in CANape.

5.1.6. Run Simulink Models as DLLs in the CANape Environment C code can be generated from the model with The Mathworks’ Real-Time Workshop. With CANape Target, the code is directly generated for a DLL running in the CANape environment. The user maps the IO ports of the model DLL with signals in CANape.

Copyright © 2008 – Vector Informatik GmbH

29/32

CANape 7.0 – At a Glance

One of the use cases is e.g. Bypassing with the standard protocol XCP.

There are more possible ways to run model code, like > Running the model in CANoe > Running the model in Simulink > Running the model on Rapid Prototyping Hardware And in every case, CANape can be used to do measurement and calibration with the model at run time.

Copyright © 2008 – Vector Informatik GmbH

30/32

CANape 7.0 – At a Glance 5.1.7. Using Panels and Scripts in CANape The user can generate their own GUI with the integrated panel editor. That’s very useful, if users like to have a specially designed GUI for their use case. CANoe users can reuse their panels in CANape and vice versa. Cross-device functions and scripts can be defined with the CANape Function Editor. Such a function can be an arithmetic or algebraic formula in which variables function as place holders for real signals or parameters. The user can generate automation processes for CANape using scripts. These scripts can be used in different cases, like at the start of the measurement, at the end, or to do the automatic offline analyzing of measurement files, etc.

5.2. Calibration Data Management The process of adapting software functions that are implemented by an ECU or a network of ECUs to an individual vehicle, the so-called calibration process, increasingly requires the support of a data management system. The complexity and scope of the program and data sets to be managed is growing enormously, not just because of the greater number of variants, but also because of the rising functional density and greater number of parameters to be calibrated. CANape has an integrated Calibration Data Manager (CDM Studio) as a working place solution for managing the parameter files. CANape supports a lot of different formats, like DCM, Hex, PaCo, CDF 2.0, ...

Copyright © 2008 – Vector Informatik GmbH

31/32

CANape 7.0 – At a Glance For groups, teams or complete companies, Vector offers a data-based solution called “eASEE.CDM”. Like a classic engineering data management system, the user can manage all data objects in versions, variants and configurations and make them available for global organizations in a readily usable format. Furthermore, it offers special functionalities for calibration data management. This includes offline editing of parameters, merging of data sets and automatic generation of ECU programs.

5.3. Automatic Offline Analyzing CANape offers many library functions to do complex offline analyzing of measurement data. CANape can be used to automatically analyze gigabytes of data. Nevertheless the user’s own C functions or Simulink models can be added as additional libraries to fulfill the individual needs of the users.

Copyright © 2008 – Vector Informatik GmbH

32/32

Your Contact Germany and all countries, not named below Vector Informatik GmbH Vector Consulting Services GmbH Ingersheimer Str. 24 70499 Stuttgart GERMANY Tel.: +49 711 80670-0 Fax: +49 711 80670-111

Vector CANtech, Inc. Suite 550 39500 Orchard Hill Place Novi, Mi 48375 USA Tel.: +1 248 449 9290 Fax: +1 248 449 9704

France, Belgium, Luxembourg

Japan

Vector France 168, Boulevard Camélinat 92240 Malakoff FRANCE Tel.: +33 1 4231 4000 Fax: +33 1 4231 4009

Vector Japan Co., Ltd. Seafort Square Center Bld. 18F 2-3-12 Higashi-shinagawa, Shinagawa-ku Tokyo 140-0002 JAPAN Tel.: +81 3 5769 7800 Fax: +81 3 5769 6975

Sweden, Denmark, Norway, Finland, Iceland

Korea

VecScan AB Theres Svenssons Gata 9 41755 Göteborg SWEDEN Tel.: +46 31 764 7600 Fax: +46 31 764 7619

United Kingdom & Ireland

V 1.1 7/2009 - PMC_CANape_At_a_Glance

USA, Canada, Mexico

Vector GB Limited Rhodium, Central Boulevard Blythe Valley Park Solihull, Birmingham West Midlands, B90 8AS United Kingdom Tel.: +44 121 50681-50 Fax: +44 121 50681-66

www.vector.com

Vector Korea IT Inc. Daerung Post Tower III, 508 182-4 Guro-dong, Guro-gu Seoul 152-790 REPUBLIC OF KOREA Tel.: +82 2 2028 0600 Fax.: +82 2 2028 0604