
19
5 Haldex Traction Specific
Requirements
In this chapter specific Haldex Traction requirements are investigated in both
TargetLink and Real-Time Workshop Embedded Coder.
Haldex Traction uses a practical approach to have several parameter sets which
the user can change before driving and during runtime. These parameters are
saved in a so called pdc-file which is programmed by Haldex Traction to access
the parameters during runtime. The parameters sets are saved in vectors in the
pdc-file. By calling the right index in the vectors, the desired parameter set is
chosen.
Example:
If parameter sets are saved in the vectors ref1= [5 6 7] and ref2= [3 9 5] then
parameter ref1 can have the value 5, 6 or 7 while ref2 can have the value 3, 9 or 5.
The user can access the parameters by a call for param1 = ref1[nbr] and param2 =
ref2[nbr] where nbr is the index of the desired parameter set , 0, 1 or 2 in this
example. By simply changing the value of nbr in one place in the code, the whole
set is changed everywhere the parameters are called in the entire code.
It is also desired to make variables calibratable in order to be able to change the
parameters via a calibration system. Calibration systems access variables directly
by their addresses in the ECU memory.
5.1 TargetLink
TargetLink offers so called variant coding to handle parameter sets. There are two
types of variant coding: data variants and code variants. The user can assign
different values to a variable during runtime while code variant is to assign
different data types or scaling parameter to a variable during code generation
time. For Haldex Traction data variant is the interesting kind of variant coding. In
the generated code all variables belonging to one data variant item, one parameter
set, are collected in a struct. An example is shown below [3]:
One instance of the structure above is generated for each variant item, that is one
structure for each parameter set. There are two variant coding styles that are
typedef struct Vca DV tag
const volatile UInt8 param1;
const volatile UInt8 param2;
const volatile UInt8 param3;
} Vca_DV_tp;/*Struct data type for data variant
configuration DV*/
Kommentare zu diesen Handbüchern