Universität Stuttgart Institut für Automatisierungs- und Softwaretechnik Prof. Dr.-Ing. M. Weyrich Laboratory Course Industrial Automation Experiment Nr. 6 Introduction to the FlexRay bus system Brief User Guide CANoe Room 1.126
Kurzanleitung CANoe V 1.1 2 Table of contents TABLE OF CONTENTS... 2 1 CANOE... 3 1.1 INTRODUCTION... 3 2 CANOE-FENSTER... 4 2.1 SIMULATION STEUP... 4 2.2 MEASUREMENT SETUP... 4 2.3 TRACE... 5 2.4 DATA... 5 2.5 GRAPHICS... 5 2.6 STATE-TRACKER... 6 2.7 WRITE... 6 2.8 STATISTICS MONITOR... 6 3 DESKTOP CONCEPT... 7 3.1 WINDOW MANAGEMENT... 7 4 SETTING UP THE ENVIRONMENT... 9 4.1 CREATING A CONFIGURATION... 9 4.2 ADDING A DATABASE... 9 4.3 CONFIGURING THE FLEXRAY INTERFACE... 10 4.3.1 Mode... 10 4.3.2 Options... 11 4.3.3 Key Slots... 11 4.4 FILTER... 11 4.5 SYSTEM VARIABLES... 13 4.6 PANEL KONFIGURATION... 14 4.7 MAKRO AUTOMATION SEQUENCE... 14 4.8 OPENING CAPL... 15 4.9 CONTROLLING MEASUREMENT AND SIMULATION... 15 4.10 DATA LOGGER... 15 5 SENDING MESSAGES... 16 5.1 NODE PANEL... 16 5.2 PANEL DESIGNER... 17 5.3 CAPL PROGRAMM... 17 LITERATUR... 18
Kurzanleitung CANoe V 1.1 3 1 CANoe 1.1 Introduction CANoe is a software tool by Vector Informatik GmbH for developing, testing and analyzing of control unit networks, as well as single control units. It supports network designers, development and testing engineers in the development process. [Vect11] Figure 1.1 CANoe [Vect11] In CANoe, FIBEX and AUTOSAR databases of a cluster can be imported. In the configuration panel, an overview over the measurement-, simulation- and test-setup is provided. Using the trace panel, the communication of the bus system can be viewed an analyzed. The recorded data can be analyzed in the analysis panel, using several statistics and graphics. Unlike CANalyzer, CANoe is not just able to measure and simulate, but can also be used for testing. It can provide a rest bus simulation, but can also participate actively on the bus. To use CANoe, an interface for the used bus system is needed. In our case, we use the FlexRay interface VN3600. It also includes the necessary hard- and software licences, which are needed to use the full functionality of the software tools. In the simulation setup in CANoe, the interface is represented by a cluster block, and can be configured by right-clicking it. HINT: If you are unable to find the necessary help in this document, please use the program help, which can be accessed with the F1 key.
Kurzanleitung CANoe V 1.1 4 2 CANoe-Fenster 2.1 Simulation steup Figure 2.1 Simulationsaufbau window The simulation setup ( Simulationsaufbau ) of the system can be shown via the simulation setup window. It provides an overview on all used network nodes, interactive generators, replay blocks, databases, and used hardware interfaces. 2.2 Measurement setup Figure 2.2 Messaufbau window The dataflow of the setup is shown in the measurement setup window ( Messaufbau ). Statistics-, trace-, data-, graphics-, logging- and state-track-windows can be added, as well as a FlexRay cluster monitor. These windows enable settings and analysis of measurements.
Kurzanleitung CANoe V 1.1 5 2.3 Trace Figure 2.3 Trace window In the trace window, bus activity can be logged an analyzed. With the help of filters, messages can be isolated in the trace window. Using filter blocks, messages can be isolated in the measurement window. 2.4 Data Figure 2.4 Daten window The data ( Daten ) window can be used to display signals, environment- and system-variables as physical data. 2.5 Graphics Figure 2.5 Grafik window The graphics window ( Grafik ) can be used to display signals, environment- and systemvariables in graphical form.
Kurzanleitung CANoe V 1.1 6 2.6 State-Tracker Figure 2.6 State-Tracker window The state-tracker window is used to analyze bit values and states of signals, environment- and system-variables. 2.7 Write Figure 2.7 Write window The write window has two functions, first it can be used to display all CAPL messages, which are generated using the write() command, second it shows all system messages for the current measurement. 2.8 Statistics monitor Figure 2.8 Statistics window The statistics window can be used to display various information on Frames, Syntax, PDUs, Bus Load, POC-States, Offset- and Rate-Correction during the measurement. An additional statistics window can be used to display bus activity in an histogram.
Kurzanleitung CANoe V 1.1 7 3 Desktop concept The desktop concept in CANoe is used for organizing the windows. When opening a new configuration, the user has the following desktops availible: Trace Write- and Trace windows Configuration Measurement and Simulation setup Analysis FlexRay Statistics-, Data- and Graphics-window To add a new desktop, the user must right-click on an existing desktop. In the menu, Neu Desktop anlegen (create new desktop) has to be selected. 3.1 Window Management Existing windows can be moved to another desktop by right-clicking the title bar of the window, and selecting Verschiebe nach (move to). To add new windows to a desktop, you can either use the Ansicht -menu (view), or rightclick on the bus in the measurement setup.
Kurzanleitung CANoe V 1.1 8 New panels are by default standard windows, and can be assigned to the current desktop by selecting MDI-Fenster (mdi window).
Kurzanleitung CANoe V 1.1 9 4 Setting up the environment 4.1 Creating a configuration To create a new configuration, it is necessary to select Datei Konfiguration neu... (File / new configuration). A dialog box will open, see Figure 4.1. In our case, the FlexRay.tcn pattern is chosen. Figure 4.1 CANoe configuration pattern In the simulation setup, the flex ray interface can bee seen after selecting the pattern. 4.2 Adding a database The FIBEX database of the demonstrator can be found in the path E:\FAPRA_FlexRay\Vorlage\IAS_Gokart.xml. In the simulation setup, it can be added by richt-clicking Datenbasen (database), see Figure 4.2. Now, the simulation environment knows all cluster parameter (bus speed, cycle duration etc.) of the IAS go-cart. The received signals on the bus can now be resolved, and used in a CAPL program.
Kurzanleitung CANoe V 1.1 10 Figure 4.2 Simulationsaufbau - Datenbasen In CANoe, the FIBEX database can be displayed using the FIBEX Explorer. The FIBEX Explorer is described in a separate document. 4.3 Configuring the FlexRay interface By double-clicking the FlexRay interface in the simulation setup, the network hardware configuration dialog is opened. 4.3.1 Mode If you want to observe the Wakeup/Startup procedure of the FlexRay cluster, the interface needs to be in asynchronous mode. If the interface is in synchronous mode, data is only shown if it is connected to an already working bus, i.e. after the Startup procedure. Figure 4.3 FlexRay Netzwerk-Hardware-Konfiguration - mode During the lab experiment, the Synchronous/Asynchronous mode can be used. It provides a mixture of both modes. It can be selected in the configuration dialog, see Figure 4.3.
Kurzanleitung CANoe V 1.1 11 4.3.2 Options If there are no Wakeup Nodes in the cluster, the FlexRay interface needs to send the Wakeup Pattern, in ordert o start the communication on the bus. As shown in Figure 4.4, a defined number of Wakeup Patterns can be sent at the start of a measurement automaticly. The settings can be defined manualy, or be filled in form data of the FIBEX database by pressing Defaults. Figure 4.4 FlexRay Netzwerk-Hardware-Konfiguration Optionen 4.3.3 Key Slots The FlexRay interface is also able to send Startup Frames, which is necessary for a Pont-to- Pont connection with a single interface. Figure 4.5 FlexRay Netzwerk-Hardware-Konfiguration - Key Slots 4.4 Filter Filters can be used in the measurement setup.. By right-clicking desired filter can be added (see Table 4.1). a menu opens, and the
Kurzanleitung CANoe V 1.1 12 Table 4.1CANoe Filter Filterblock Type Description / Event filter all protocols DF Pass through filter SF Blocking filter Event filter FlexRay FlexRay Frame / Node / Eventfilter / Variable filter DU Pass through filter SU Blocking filter Buy double-clicking the desired filter block, the corresponding configuration window opens. There, the filter can be configured. Figure 4.6 Eventfilter - Konfigurationsfenster Figure 4.7 FlexRay - Konfigurationsfenster
Kurzanleitung CANoe V 1.1 13 Figure 4.8 Variablenfilter - Konfigurationsfenster 4.5 System variables System variables can be used to model internal simulation values. They help with development, testing and analyzing. Unlike environment variables, they don t need a database, and can be defined via the menu Konfiguration Systemvariablen (configuration / system varaibles). The parameters of the variable can be set in the system variable configuration ( Systemvariablen-Konfiguration ), as seen in Figure 4.9. Figure 4.9 Systemvariablen Konfiguration
Kurzanleitung CANoe V 1.1 14 4.6 Panel Konfiguration Using the CANoe menu Konfiguration Panel Konfiguration (configuration / panel configuration), panels which already exist can be added to the active configuration, or be removed from it. 4.7 Makro automation sequence Makros can be used for automated and reliable tests. They can be recorded and played back using the macro-recorder (see Figure 4.10). Also, logged system variables in *.asc files can be played back. Using the CANoe menu Konfiguration Makro the automation configuration can be opened and configured. Figure 4.10 Makro - Automatisierungssequenz Konfiguration Recording and playing back of makros always takes place at the start of a measurement.
Kurzanleitung CANoe V 1.1 15 4.8 Opening CAPL To open the CAPL program of a node, the left symbol of the ECU in the Simulation setup has to be clicked. 4.9 Controlling measurement and simulation The measurement can be started and stopped via the menu. Measurement-Start: Measurement-Stop: 4.10 Data logger In the measurement setup, a logging block can be activated. It records all data during a measurement, e.g. bus communication, system variables, error codes etc. To log a specify signal or variable, a filter has to be used.
Kurzanleitung CANoe V 1.1 16 5 Sending messages 5.1 Node panel The simplest way to alter signals on the FlexRay bus is to add the desired ECU to the simulation setup, by right-clicking on the bus. Then, by clicking the right button on the ECU, the node panel is displayed (see Figure 5.1). The desired values of the signal can be changed, and is transmitted to the bus using the update button. Figure 5.1 Knoten Panel - IAS Kart - FR_FSU3
Kurzanleitung CANoe V 1.1 17 5.2 Panel Designer The panel designer can be used to make customized panels with various functions, like transmitting messages or displaying of signals and system variables.. (1) List of all signals, messages, and nodes (2) CANoe Panel preview (3) Toolbox Vector Standard component overview (4) Properties of selected component (5) Description of selected component Figure 5.2 Knoten Panel - IAS Kart - FR_FSU3 The selected component can be taken from the toolbox via drag&drop, and put on the workspace (see Figure 5.2). kann die gewünschte Komponente per drag&drop auf die Arbeitsfläche gezogen werden. After that, a signal or system variable can assigned to that component, and it can be altered during the simulation. The Panel Designer can be opened via the menu: 5.3 CAPL Programm CAPL is described in a separate document.
Kurzanleitung CANoe V 1.1 18 Literatur [Vect11] Vector Informatik GmbH: www.vector.com, Stand 02/2011