Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

ASAP2 Tool-Set - Adjust XCP Events

2020-08-03
Support Note SN-IMC-1-090

Author(s) Reusch, Axel


Restrictions Public Document

Table of Contents
1 Overview .......................................................................................................................................... 2
2 Precondition ..................................................................................................................................... 2
3 Functionality ..................................................................................................................................... 2
3.1 Workflow................................................................................................................................... 2
3.1.1 Command Line ............................................................................................................... 3
3.1.2 INI Parameter File .......................................................................................................... 3
3.1.3 JSON File ....................................................................................................................... 4
3.2 The Result A2L ........................................................................................................................ 5
3.2.1 Result A2L in MC Tool ................................................................................................... 6
4 Good To Know ................................................................................................................................. 7
5 Contacts ........................................................................................................................................... 7
ASAP2 Tool-Set - Adjust XCP Events

1 Overview

An ASAP2 file (A2L) provides all relevant information for the contained signals. In addition to standard
signal properties like display name, address or data type it is also possible to define one or more
events the signal can be assigned to. This definition can be useful to preselect valid measurement
modes.
The feature to create XCP event descriptions was introduced in ASAP2 Tool-Set 15.0. It enables the
user to adjust the A2L events and define which signals can be measured using which events.

This document will describe the basic principle.

2 Precondition
The feature was introduced in ASAP2 Tool-Set 15.0, please be sure to use this version to follow the
steps in this document, at least.
It is necessary to create a JSON file to use the functionality – such a JSON file can be created and
edited using any text file editor available on your system.
This document describes functionality and shows screenshots using CANape 18.0.20.
For demonstration purposes within this document the A2L of XCP example project is used (part of
CANape installation).

3 Functionality
Basically, to get the desired behavior concerning events, an A2L file is adjusted via ASAP2 Modifier
in regard to the parameters (INI file) and JSON file.

3.1 Workflow

To get the desired output A2L containing adjusted event information and signal assignment, the
workflow of the ASAP2 Modifier follows these steps:
> The Modifier is started via command line
> The input A2L is read
> The INI file is read, it contains relevant settings for execution
> The JSON is read, the file contains relevant information which events should be contained and
which signals are assigned to which events
> The Modifier adapts all input information and adjusts the input A2L data
> The output A2L is written

Copyright © 2020 – Vector Informatik GmbH 2


Contact Information: www.vector.com or +49-711-80 670-0
ASAP2 Tool-Set - Adjust XCP Events

3.1.1 Command Line

The ASAP2 Modifier has to be started with particular command line parameters. To start the command
line for that purpose a command line like this is required:

"%INSTALLDIR%\ASAP2Modifier.exe" -a input.a2l -i modifier.ini -o output.a2l -e events.json

> Parameter -a: The A2L file input.a2l is read in


> Parameter -i: Settings for the Modifier are configured in file modifier.ini
> Parameter -o: The A2L file output.a2l will be created
> Parameter -e: The event information is read from file events.json

3.1.2 INI Parameter File

The INI file contains all relevant information concerning the adjustments executed by the Modifier.
Essential for creation and assignment of XCP events is section [CREATE_XCP_DAQ_EVENTS].
Several possibilities of configuring the behavior are available within this section.
A list of all settings is available in the manual. Here is the corresponding listing of the manual of
ASAP2 Tool-Set 15.0:

A simple example INI could look like this:


[CREATE_XCP_DAQ_EVENTS]
CREATE=1
REMOVE_EXISTING_EVENTS=1
REMOVE_EXISTING_ASSIGNMENTS=1
TAG=XCP

For this example, the following settings apply:


> CREATE=1: The adjustment and assignment of the events is activated
> REMOVE_EXISTING_EVENTS=1: Currently defined events of the input A2L will be removed
> REMOVE_EXISTING_ASSIGNMENTS=1: Current assignments of signals to events within the
input A2L file will be removed
> TAG=XCP: It is possible to define which AML type is regarded. In this case XCP will be used
(default setting). It is also possible to adapt AML type XCPplus.

Copyright © 2020 – Vector Informatik GmbH 3


Contact Information: www.vector.com or +49-711-80 670-0
ASAP2 Tool-Set - Adjust XCP Events

3.1.3 JSON File

The definition of the JSON file is an essential part for the correct execution of the toolchain. A JSON
file could also easily be created in an automated way. Basically, the JSON file can contain information
for two types of modification:
> Adjust event definitions
> Adjust assignment to events for signals

A simple example JSON file could look like this:


{
"XcpDaqEventDefinitions": [
{
"Name": "1ms_Event",
"ShortName": "1ms",
"ChannelNumber": 8,
"DaqListType": "DAQ_STIM",
"MaxDaqList": 1,
"TimeCycle": 1,
"TimeUnit": 6,
"Priority": 3
},
{
"Name": "10ms_Event",
"ShortName": "10ms",
"ChannelNumber": 9,
"DaqListType": "DAQ",
"MaxDaqList": 1,
"TimeCycle": 0xA,
"TimeUnit": 6,
"Priority": 0
},
],
"XcpDaqEventAssignments": [
{
"SignalName": "channel1",
"FixedEvents": [
{ "ChannelNumber" : 8 }
]
},
{
"SignalName": "channel2",
"FixedEvents": [
{ "ChannelNumber" : 9 }
]
},
{
"SignalName": "channel3",
"VariableEvents": [
{ "ChannelNumber" : 8, "IsDefault" : true },
{ "ChannelNumber" : 9 }
]
},
]
}

In this example two events are created (1ms_Event and 10ms_Event). The assignment of signals to
the events is done via the channel number (ChannelNumber).
For three signals (channel1, channel2, channel3) the assignment to the available events is defined.
For channel1 and channel2 the event assignment is defined as fixed (FixedEvents). This means that
the corresponding MC tool does not allow the usage of any other event for this signal than the defined
one.

Copyright © 2020 – Vector Informatik GmbH 4


Contact Information: www.vector.com or +49-711-80 670-0
ASAP2 Tool-Set - Adjust XCP Events

For channel3 a variable listing of events is defined (VariableEvents). This means that a selection of
the assigned events is possible, in addition a default event is defined (IsDefault).

3.2 The Result A2L

If using the above mentioned INI and JSON files, the following content for the result A2L is created.
The contained events in the result A2L file are:

/begin EVENT
"1ms_Event"
"1ms"
0x08
DAQ_STIM
0x01
0x01
0x06
0x03
/end EVENT
/begin EVENT
"10ms_Event"
"10ms"
0x09
DAQ
0x01
0x0A
0x06
0x00
/end EVENT

Within CANape the event definition looks like this:

Please take a closer look at the differences between the two events.

The definitions of channel1, channel2 and channel 3 are created like this (some A2L content is
shortened):

/begin MEASUREMENT channel1 "FLOAT demo signal (sine wave)"

/begin IF_DATA XCP
/begin DAQ_EVENT FIXED_EVENT_LIST
EVENT 8
/end DAQ_EVENT
/end IF_DATA
/end MEASUREMENT

/begin MEASUREMENT channel2 "FLOAT demo signal (sine wave)"

Copyright © 2020 – Vector Informatik GmbH 5


Contact Information: www.vector.com or +49-711-80 670-0
ASAP2 Tool-Set - Adjust XCP Events


/begin IF_DATA XCP
/begin DAQ_EVENT FIXED_EVENT_LIST
EVENT 9
/end DAQ_EVENT
/end IF_DATA
/end MEASUREMENT

/begin MEASUREMENT channel3 "FLOAT demo signal (sine wave)"



/begin IF_DATA XCP
/begin DAQ_EVENT VARIABLE
/begin AVAILABLE_EVENT_LIST
EVENT 8
EVENT 9
/end AVAILABLE_EVENT_LIST
/begin DEFAULT_EVENT_LIST
EVENT 8
/end DEFAULT_EVENT_LIST
/end DAQ_EVENT
/end IF_DATA
/end MEASUREMENT

3.2.1 Result A2L in MC Tool

Within CANape the event definitions of channel1 look like this:

This leads to the behavior that only the 1ms event (1ms_Event) of the ECU is available for
measurement of channel1, event 10ms_Event can not be selected:

The definition of signal channel2 is very similar to channel1, therefore it is not further described here.

Copyright © 2020 – Vector Informatik GmbH 6


Contact Information: www.vector.com or +49-711-80 670-0
ASAP2 Tool-Set - Adjust XCP Events

For signal channel3 the signal properties within CANape look like this:

This leads to the behavior that the ECU events for 1ms and 10 ms measurement are available for
channel3. Event 1ms_Event is defined as default event:

4 Good To Know
The feature is exclusively available for XCP A2L files.

5 Contacts
For support related questions please address to the support contact for your country
https://www.vector.com/int/en/company/contacts/support-contact/.

Copyright © 2020 – Vector Informatik GmbH 7


Contact Information: www.vector.com or +49-711-80 670-0

You might also like