Uploaded by 2838941824

Getting Started With CANoe.ISO11783

advertisement
Getting Started With CANoe.ISO11783
Version 2.0
2010-04-27
Application Note AN-ION-1-4200
Author(s)
Restrictions
Abstract
Heiko Gschwind
Public Document
This application note describes the first steps for using the CANoe.ISO11783.
Table of Contents
1.0
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
3.0
3.1
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.2.7
3.2.8
4.0
5.0
6.0
Overview ..........................................................................................................................................................2
CANoe.ISO11783 components .......................................................................................................................2
Simulated ECUs ............................................................................................................................................3
Virtual Terminal .............................................................................................................................................3
Task Controller ..............................................................................................................................................4
Trace Window ...............................................................................................................................................5
GNSS Monitor ...............................................................................................................................................6
J1939 Scanner ..............................................................................................................................................6
J1939 Diagnostics Monitor ............................................................................................................................7
Futher components .......................................................................................................................................8
GNSS Simulator..........................................................................................................................................8
GNSS Node Layer ......................................................................................................................................8
CAPL Generator J1939 ..............................................................................................................................8
J1939 Interaction Layer ..............................................................................................................................8
J1939 Test Service Library .........................................................................................................................9
Creating a ISO11783 configuration .................................................................................................................9
Prepare Configration .....................................................................................................................................9
Insert ISO17783 componets .........................................................................................................................9
Virtual Terminal, Task Controller and GNSS Simulator..............................................................................9
J1939 Scanner, GNSS Monitor ..................................................................................................................9
Simulating an ISO11783 Implement ...........................................................................................................9
Prepare database .....................................................................................................................................10
Create CAPL file .......................................................................................................................................10
Modify CAPL file .......................................................................................................................................10
Prepare Simulation Setup.........................................................................................................................11
Start measurement ...................................................................................................................................11
Using Ready-Made Models ...........................................................................................................................12
Additional resources ......................................................................................................................................12
Contacts .........................................................................................................................................................13
1
Copyright © 2010 - Vector Informatik GmbH
Contact Information: www.vector.com or ++49-711-80 670-0
Getting Started With CANoe.ISO11783
1.0 Overview
The J1939-based ISO standard 11783 describes CAN-based communication on open networks for mobile use in
the agricultural sector. ISO11783 is a multi master network based on CAN, whose protocol is harmonized with
J1939. CANoe.ISO11783 can be used to simulate a single ECU or a complete ISO11783 network and it can be
used to test and analyze communication of ECUs and complete ISO11783 networks.
This application note presents the components of CANoe.ISO11783 by means of an example configuration. It also
explains how to create a new CANoe configuration which can be used in an ISO11783 network.
The used screen shots might be slightly different depending on the used version of CANoe.
2.0 CANoe.ISO11783 components
To show the essential components of CANoe.ISO11783 the example ISO11783SystemDemo is used. To open it
call command File | Load Configuration ..., press button [CANoe Demos] and select the configuration
ISO11783SystemDemo_CN.cfg of folder Demo_ISO11783_CN\ISO11783SystemDemo.
A detailed description of the example can be found in the online help (see example configurations in the table of
contents).
All used components are inserted either in the Simulation Setup or the Measurement Setup of the desktop
Configuration.
Figure 1 - Simulation and Measurement Setup
2
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
2.1 Simulated ECUs
In the example a tractor ECU and a sprayer is simulated via two CAPL nodes. Both nodes use the so called node
layer ISO11783DLL.dll which provides ISO11783 specific CAPL functions (see online help for more information on
these functions). The panels Tractor and Sprayer on the desktop Simulation represent the graphical surface of
the two nodes.
Figure 2 - Tractor ECU Panel
2.2 Virtual Terminal
In the middle of the desktop Simulation you can see the Virtual Terminal. After an implement has sent its object
pool to the Virtual Terminal you can control the implement via this terminal. A lot of settings allow you to customize
the Virtual Terminal. Assignment of auxiliaries is done on page Auxiliary Function.
3
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
Figure 3 - Virtual Terminal
2.3 Task Controller
On the desktop Task Controller you can see the task controller window which displays the process variable
dictionary of the sprayer ECU. To read and write process variables the buttons [Get] and [Set] are used.
4
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
Figure 4 - Task Controller
You can also create, modify and delete tasks (treatment zones and process data). During measurement you can
send the values of a treatment zone or a single process value to the implement.
2.4 Trace Window
The Trace Window of CANoe.ISO11738 visualizes the messages of the ISO11783 network. It records bus
activities during measurement. All the received ISO11783 messages are evaluated and displayed as information
lines.
Figure 5 - Trace Window
5
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
2.5 GNSS Monitor
The GNSS Monitor (Global Navigation Satellite System Monitor) on the desktop Simulation displays the waypoints
of the simulated tractor.
Figure 6 - GNSS Monitor
If the measurement was stopped, the function Synchronize windows can be activated with the button
. Then
the global measurement cursor makes simultaneous scrolling in all trace, graphic and GPS windows available.
This allows a direct assignment of the displayed data in all windows.
2.6 J1939 Scanner
With the J1939 Scanner of desktop Analyze active nodes in the ISO11783 network can be displayed and
analyzed.
6
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
Figure 7 - J1939 Scanner
The source addresses of the received parameter groups and the address claiming messages are evaluated by the
J1939 Scanner. From this information the J1939 Scanner detects the active nodes and the state. For selected
nodes more detailed information can be displayed, e.g. the J1939 device name. It is also possible to send Request
and Commanded Address messages.
2.7 J1939 Diagnostics Monitor
The J1939 Diagnostics Monitor on desktop Diagnostics shows the occurrence of error codes that are transmitted
with the diagnostic messages of ISO11783.
7
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
Figure 8 - J1939 Diagnostics Monitor
2.8 Futher components
There are a few other components of CANoe.ISO1783 which or not contained in the example configuration.
2.8.1
GNSS Simulator
The GNSS Simulator window can be used to simulate a GNSS/GPS receiver. After inserting the GNSS Simulator
in the simulation setup you can choose a geometric figure or a position file which is used to determine a path that
will be traced at a variable speed when the simulation is started. GNSS positions thereby generated are transferred
cyclically with configurable messages of the ISO11783 protocol.
2.8.2
GNSS Node Layer
As well as the GNSS Simulator the GNSS node layer can be used to supply other devices on the network with
position data. The node layer provides some additional CAPL functions which allow sending GNSS/GPS positions
easily.
2.8.3
CAPL Generator J1939
With CAPL Generator J1939 you can easily create CAPL files to simulate an ECU (see chapter 3.2.5)
2.8.4
J1939 Interaction Layer
The J1939 Interaction Layer (J1939 IL) provides signal oriented access to the ISO11783 bus. The mapping of the
signals on the TX messages is done accordingly to the configuration in the used database. The J1939 IL manages
the TX messages; RX messages are handled directly by CANoe and can be processed in CAPL. For more
information see the online help
8
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
2.8.5
J1939 Test Service Library
The J1939 Test Service Library extends the Test Feature Set with J1939 specific functions. The functions can be
used in CAPL and XML test modules.
In difference to the standard functions of the Test Feature Set (TSL), the J1939 TSL uses parameter groups and
PGN, and it supports J1939 transport protocols.
3.0 Creating a ISO11783 configuration
This chapter shows the necessary steps to create a new CANoe configuration which can be used in an ISO11783
network.
3.1 Prepare Configration
After starting CANoe we create a new configuration with command File | New Configuration…. In the dialog we
choose the ISO11783 template. The new configuration has three desktops: Setup, Measurement and Diagnostics.
To get knowledge about the possible messages of ISO11783 and to enable the J1939 mode in CANoe you have to
assign an ISO11783 database. You can find it at the example configurations which you can find via command
Configuration | Options… | Application Settings | File Locations | Location of user data – Open. Copy a
database of the folder Demo_ISO11783_CN\Database (e.g. ISO11783_IL4.DBC) to your working folder and add it
by opening the context menu of the Databases collection of the system view window in the Simulation Setup.
3.2 Insert ISO17783 componets
3.2.1
Virtual Terminal, Task Controller and GNSS Simulator
In the Simulation Setup of desktop Setup you have to go to the Interactive Generators collection below the J1939
network object in the system view window and click it with the right mouse button. Select one of the windows in the
context menu that appears. Double clicking the new inserted block opens the associated window.
To use a Virtual Terminal in CANoe there is a second possibility: To design your own Virtual Terminal you can
insert a CANoe panel which is controlled via the Virtual Terminal DLL. In a CAPL program you have to define the
behavior of the Virtual Terminal. For more information see the online help.
3.2.2
J1939 Scanner, GNSS Monitor
In the Measurement Setup of desktop Setup you have to click an existing block with the right mouse button and
select the one of the windows from the popup menu that appears.
3.2.3
Simulating an ISO11783 Implement
The behavior of an implement can be modeled with CAPL. The ISO11783 Node Layer DLL can be integrated to
expand the functional range of CAPL.
Figure 9 - ISO11783 Node Layer DLL
9
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
The ISO11783 Node Layer DLL supports network management, sending and receiving parameter groups and
transport protocols. Furthermore there is an API for managing the communication with a Virtual Terminal and an
API to administer a device description file (ISO11783-10) and to create a process data dictionary which is
automatically transmitted to the Task Controller.
3.2.4
Prepare database
First a node has to be created in the database. To do this you have to open the CANdb++ editor. Insert a new
node, set the node name to Implement and edit its address. Before closing the dialog the attributes has to be set.
Switch to page Attributes, set the value of attribute NodeLayerModules to ISO11783DLL.dll and edit the
attributes starting with ‘NM’ which define the J1939 device name.
To allow creation of a CAPL file with the J1939 CAPL Generator two parameter groups have to be assigned to the
node. To do this copy the parameter groups WSMEM and WSMSTR, open the J1939 Communication Matrix and
paste them to the node Implement.
Save the database and close the editor.
3.2.5
Create CAPL file
To define the behavior of the implement you have to create a CAPL file. You can do this manually or you can use
the J1939 CAPL Generator. For the latter case open the J1939 CAPL Generator, create a new project and insert
all necessary values. Now you have to add the ISO11783 database the project.
Select the node Implement and set checkboxes ECU is Working Set Master, ECU is Bootmaster and Enable
VT support. Set VT Version to 3 and specify the name of the object pool file.
Figure 10 - Setting of the node ‘Implement’
Now you have to call command Project | Generate Code … .In the dialog select the node Implement and press
button [OK]. The Output Window displays the name and location of the generated CAPL file.
3.2.6
Modify CAPL file
If the code has been generated, then the generated CAPL program can be edited further in the CAPL browser. The
code may not be changed arbitrarily in all places if at a later point in time there should be another generation. For
10
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
this there are user areas provided, which are heeded during reading back of the code by the CAPL J1939
Generator for another generation. For more information see the online help.
3.2.7
Prepare Simulation Setup
In the Simulation Setup of desktop Setup you have to go to the Nodes collection and click with the right button to
add a network node. After a right click on the new block you have to select command Configuration… in the
appearing context menu. In the dialog select CANdb name ISO11783_IL4::Implement and with button [File] you
selected the CAPL file which have been generated in the chapter 3.2.5. Close the dialog.
To add a Virtual Terminal open the context menu of the Interactive Generators collection and select command
Insert ISO11783 Virtual Terminal. Double click the new Virtual Terminal node to open the window.
Figure 11 - The simulated implement
3.2.8
Start measurement
Before starting the measurement you have to make the object pool file available which is defined in 3.2.5. If you
now start the measurement then the simulated implement sends an Address Claimed message followed by a
Working Set Master message. Afterwards the object pool is transferred to the Virtual Terminal.
11
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
4.0 Using Ready-Made Models
Several models are delivered with CANoe.ISO11783 which can be integrated into CANoe configurations:
Model
Description
Auxiliary Analog Input
This model simulates an auxiliary input with analog inputs (ISO11783-6).
Auxiliary Key Input
This model simulates an auxiliary input with non latchable keys (ISO11783-6).
Auxiliary Key Input Latchable
This model simulates an auxiliary input with latchable keys (ISO11783-6).
FileServer
This model simulates a file server ECU (ISO11783-13).
Sprayer
This model simulates a sprayer.
Tractor ECU
This model simulates a tractor ECU of classification 2NF (ISO11783-9).
Virtual Terminal
This model simulates a Virtual Terminal (ISO11783-6).
Table 1 - Models for CANoe.ISO11783
The folders of these models are located in the directory Demo_ISO11783_CN/Models of the examples. They
contain database files, CAPL programs, panels, and object pool files. To use them in your own configurations copy
the complete folder and integrate the files into your configuration.
5.0 Additional resources
The following material may provide further useful information:
VECTOR APPLICATION NOTES
AN-AND-1-112
CANoe Tutorial
AN-ION-1-3100
Introduction to J1939
AN-ION-1-4400
Reasons for System Simulation with CANoe.ISO11783
12
Application Note AN-ION-1-4200
Getting Started With CANoe.ISO11783
6.0 Contacts
Germany
and all countries not named below:
Vector Informatik GmbH
Ingersheimer Str. 24
70499 Stuttgart
GERMANY
Phone: +49 711-80670-0
Fax:
+49 711-80670-111
E-mail: info@de.vector.com
France, Belgium, Luxemburg:
United Kingdom, Ireland:
Vector GB Ltd.
Rhodium
Central Boulevard
Blythe Valley Park
Solihull, Birmingham
West Midlands B90 8AS
UNITED KINGDOM
Phone: +44 121 50681-50
E-mail: info@uk.vector.com
China:
Vector Informatik GmbH
Shanghai Representative Office
Suite 605, Tower C,
Everbright Convention Center
No. 70 Caobao Road
Xuhui District
Shanghai 200235
P.R. CHINA
Phone: +86 21 - 6432 5353 ext. 0
Fax: +86 21 - 6432 5308
E-mail: info@vector-china.com
India:
Vector Informatik India Private Ltd.
4/1/1/1 Sutar Icon
Sus Road
Pashan
Pune 411021
INDIA
Phone: +91 9673 336575
E-mail: info@vector-india.com
USA, Canada, Mexico:
Vector CANtech, Inc.
39500 Orchard Hill Pl., Ste 550
Novi, MI 48375
USA
Phone: +1 248 449 9290
Fax:
+1 248 449 9704
E-mail: info@us.vector.com
Japan:
Vector Japan Co. Ltd.
Seafort Square Center Bld. 18F
2-3-12, Higashi-shinagawa,
Shinagawa-ku
Tokyo 140-0002
JAPAN
Phone: +81 3 5769 7800
Fax:
+81 3 5769 6975
E-mail: info@jp.vector.com
Korea:
Vector Korea IT Inc.
#1406, Mario Tower,
222-12 Guro-dong, Guro-gu
Seoul, 152-848
REPUBLIC OF KOREA
Phone: +82 2 807 0600
Fax:
+82 2 807 0601
E-mail: info@kr.vector.com
Vector France SAS
168 Boulevard Camélinat
92240 Malakoff
FRANCE
Phone: +33 1 42 31 40 00
Fax:
+33 1 42 31 40 09
E-mail: information@fr.vector.com
Sweden, Denmark, Norway,
Finland, Iceland:
VecScan AB
Theres Svenssons Gata 9
41755 Göteborg
SWEDEN
Phone: +46 31 764 76 00
Fax:
+46 31 764 76 19
E-mail: info@se.vector.com
13
Application Note AN-ION-1-4200
Download