Professional Documents
Culture Documents
SGBD Generator
Version: 1.25
Date: 06.02.2012
Status: Released
Author: Stephan Keitel, Firma ESG
File: Anleitung_STATUS_STEUERN_UDS_English_V1.25.doc
No. of pages: 33
History
Version Date Authors Revised
0.10 10.01.2006 T. Müller First issue
0.20 16.01.2006 T. Müller Amendments / changes
0.21 13.02.2006 T. Müller Amendments / changes
0.22 31.03.2006 T. Müller Revision of tables
0.30 20.04.2006 T. Müller Addition of “BITFIELD“ for bit evaluation
0.40 29.05.2006 T. Müller Service $31 and $2F added
0.41 01.06.2006 T. Müller Defined data types
0.52 12.08.2006 T. Müller Extension of Service $31
0.53 13.11.2006 T. Müller Revision
0.54 04.12.2006 T. Müller Addition of tips for EDIABAS Toolset
0.56 23.03.2007 T. Müller Extensions
0.57 03.05.2007 T. Müller Addition of chapter "Combination of Services“
1.00 10.06.2007 T. Müller General revision
1.10 05.09.2007 T. Müller Amendment of STATUS_BLOCK_LESEN
1.11 18.12.2007 A. Reuß General revision
1.12 19.05.2008 A. Reuß Definition Resultnamen revised
Using the UDS STATUS / STEUERN Jobs in SGBD-Generator Page 2 of 33
Contents
1 Introduction .................................................................................................................................... 5
List of Abbreviations
ARG / Argument Arguments, which are sent to the control unit
B2S BEST/2 source file respectively source
BEST Description language for control units
BMW-fast BMW "fast access for service and testing"
DID Data-Identifier
DS2 Diagnose System 2
DTC The Diagnostic Trouble Code is a hexadecimal code used in the automotive
industry for the identification of malfunctions, which can occur during the op-
eration of an automobile.
EDIABAS The Electronic Diagnosis-Basis-System provides access to diagnosis infor-
mation on the vehicle.
iMAN Information manager
ISO14229 Communication protocol standard ISO14229
KompCheck Compatibility check
KWP2000 Keyword protocol 2000 Communication protocol
LH Functional specifications
RES / Result Results supplied by the control unit
SAP Systems, Applications, Products in data processing
SG Control unit
SG_Funktionen Standard table „SG_Funktionen“
SGBD The control unit description file contains over different applications (e.g.
Toolset) callable jobs, which are processed to diagnosis telegrams in the
SGBD. The control unit answers will be processed into readable results.
Toolset EDIABAS Toolset Application, that uses a SGBD and freely-setting parame-
ters, to run the diagnostic services of a SGBD over EDIABAS. Available
through GIS – BMW Standard Tools Development.
XML Extensible Markup Language
ZEDIS Central diagnostic system
1 Introduction
Starting with L6 series diagnosis jobs, which due to their function are located in all future
model ranges, will be specified in the form of standardized diagnosis jobs within the scope of
the diagnosis feed forward process.
All diagnosis volumes required for production and service that have be described in standard
jobs will be defined by ZEDIS in the diagnostic database. The control unit specific volumes
will be compiled for each control unit and will then be exported from ZEDIS in an exchange
form and will finally be imported into the SGBD generator. After importing the data into the
SGBD generator, the volumes are shown in the table “SG_Funktionen“ and can be com-
pleted by the user.
The volumes defined in the table are used by five special standard jobs. Yellow fields can-
not be edited by the user.
In addition to diagnosis jobs, defect locations and defect texts (DTCs) can be entered and
assigned in the diagnostic database. These volumes will be imported into the standard
table “FOrtTexte“ in addition to the diagnostic jobs when data is imported into the
SGBD generator.
This document describes how to call up the five standard jobs and carry out the control
unit specific adjustments in the table “SG_Funktionen”.
The following five additional standard jobs are available and used from the table
“SG_Funktionen”:
The jobs and the standard table “SG_Funktionen“ are described in the following chap-
ters. The exact definition of the individual diagnosis service is contained in ISO 14229.
The aforementioned jobs use the table “SG_Funktionen“.
Definition of columns:
N.B.: The column "SG_ADR" is currently not evaluated by the standard jobs!
*) Use only data types that are supported by the control unit. In general, only very few con-
trol units support float numbers.
**) With data type "string" the entry of string length is optional. If no string length is speci-
fied, the end characters "0x00" must be entered.
With data type "data" length input is mandatory.
• Analogue results end with "_WERT" and are data type char, int, long, float, double,
string or data.
The results _EINH und _INFO are created automatically.
Special cases:
- With data type "string" the result " _TEXT" is created additionally. The
result "_TEXT" is shown in textual figures.
- With data type "data" the result " _DATA" is created additionally. The
result "_DATA" is shown in hexadecimal figures.
(Example: _DATA= 05 07 06 1A FF …).
The result " _WERT" is empty in both cases and is filled with "0" (_WERT=0).
• Digital results (EINHEIT = "0/1") may not end with _WERT and are data type char,
int or long , whereby only "0" or "1" are permitted.
The result _INFO is created automatically.
• Discrete results (EINHEIT = "0-n") may not end with "_WERT" and have data type
char, int or long. The converted decimal number of the response telegram is as-
signed to the result name.
The results _EINH, _TEXT and _INFO are created automatically.
• HEX results (EINHEIT = "HEX") end with "_WERT" and have data type char, int or
long.
The results _EINH and _INFO are created automatically.
Result table:
RESULTNAME EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD INFO
Table "TAB_RAD":
WERT TEXT
3 Description of jobs
Argument 1: “ARGUMENT_SPALTE“
• Enter the name of the column from which the 2nd argument is to be used. In the ta-
ble “SG_Funktionen“ you may select the columns “ARG“, “ID“ or “LABEL“.
Argument 2: “STATUS“
• Enter the value from the column selected in the 1st argument, e.g. “DID“=0xD001
Reading out suction pressure from an engine control unit. Three different job call-ups are
possible:
Table "SG_Funktionen":
Suction pres-
IPSAU 0xD002 STAT_SAUGROHRDRUCK_WERT
sure
hPa MAP_MES -
The job can be called up as described in the following. If the control unit responds cor-
rectly, the results are created automatically (see example).
Table "SG_Funktionen":
The above conversion e.g. for STAT_LUFTTEMPERATUR_WERT means, that a value was
returned from the control unit, which was interpreted from the standard job as an unsigned
char and put out in EDIABAS as real :
32 (°C) x 0,75
========== + 1 = 25 (°C – air- temperature) => Output in EDIABAS 25.000000E+000
1
The service $22 allows the test engineer to call up several results with only one data iden-
tifier. This means that one DID is sent to the control unit and the control unit can return
several results.
The individual results provided by the control unit have to be defined in a sub-table. The
name of the sub-table is entered in the column "RES_TABELLE" in the table
"SG_Funktionen". The sequence of results must not be mixed up.
STAT_ FL_LINKS_EIN =1
STAT_ FL_LINKS_EIN_INFO = High beam left 1=ON, 0=OFF
STAT_ FL_RECHTS_EIN =0
STAT_ FL_RECHTS_EIN_INFO = High beam right 1=ON, 0=OFF
STAT_ AL_LINKS_EIN =0
STAT_ AL_LINKS_EIN_INFO = Low beam left 1=ON, 0=OFF
STAT_ AL_RECHTS_EIN =1
STAT_ AL_RECHTS_EIN_INFO = Low beam right 1=ON, 0=OFF
Table "SG_Funktionen":
RES_TABELLE
DATENTYP NAME MUL DIV ADD SG_ADR SERVICE ARG_TABELLE
- - - - - - 22 - RES_0xD020
Table „RES_0xD020“:
RESULTNAME EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD INFO
In this example, data type “INT“ is used for each result. If numerous status messages are
to be called up from one control unit, the number of data bytes can be reduced by using
data type “BITFIELD“ (see 3.1.2.2 ).
3.1.2.2 Example 2: Readout of light status with the help of data type “BITFIELD“
By using data type “BITFIELD“ in column “DATENTYP“ of table SG_Funktionen several
status can be evaluated in one or several byte. The mask for masked reading is entered in
the sub-table in column “Maske“. With discrete (0-n) and digital (0/1) results, 1, 2 or 4
byte are allowed. Once a diagnosis job has been declared as a bitfield, all argu-
ments/results contained therein are treated as bitfield. Over and above that, no further ar-
guments/results may be entered.
Table "SG_Funktionen":
NAME
DATENTYP MUL DIV ADD SG_ADR SERVICE ARG_TABELLE RES_TABELLE
BITFIELD RES_0xD020 - - - - 22 - -
Table "RES_0xD020":
RESULTNAME EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD INFO
High beam left:
STAT_FL_LINKS_EIN 0/1 - INT 0x0001 - - - -
1=ON; 0=OFF
High beam right:
STAT_FL_RECHTS_EIN 0/1 - INT 0x0002 - - - -
1=ON; 0=OFF
Tail light:
STAT_SL 0-n - INT 0x0030 TAB_SL - - -
See search table
Low beam right:
STAT_AL_RECHTS_EIN 0/1 - INT 0x0100 - - - -
1=ON; 0=OFF
*1) *2)
Table "TAB_SL":
WERT TEXT
0xFF undefined
In contrast to example 2 single results, instead to declare the complete diagnosis order as
a Bitfield, within a diagnosis order can be handled as a Bitfield. So it is possible to read out
parts from the answer telegram as a Bitfield.
Table „SG_Funktionen“:
- - - - - - 22 - RES_0xD040
Table „BF_BITFIELD1“:
RESULTNAME EINHEIT L/H DATENTYP NAME NAME MUL DIV ADD INFO
In such a case the SG responds with a message of the length of 4 Bytes (1+2+1). The exact
description of the technical content of the telegram is now interlaced:
• STAT_ANALOG_WERT is in the 1. Byte
WERT TEXT
0x01 1. Wert
0x02 2. Wert
0x03 3. Wert
0x0001 1. Wert
0x0002 2. Wert
0x0003 3. Wert
For example: By sending a specific data identifier (DID), a number can be written into the
control unit.
Attention:
The control unit may limit or prohibit access to various data identifiers (data identifiers for
read access only as defined by the supplier or automobile manufacturer).
Argument 1: “ARGUMENT_SPALTE“
• Enter the name of the column from which the 2nd argument is to be used. From the
table “SG_Funktionen“ you may select the columns “ARG“, “ID“ or “LABEL“.
Argument 2: “STATUS“
• Enter the value from the column of the 1st argument, e.g.“DID“=0xD001
Argument 3: “WERT“
• Enter the value to be transmitted to the control unit for controlling, e.g.
“Nr“=1234567
Table „SG_Funktionen“:
ARG_TABELLE
DATENTYP NAME MUL DIV ADD SG_ADR SERVICE RES_TABELLE
- - - - - - 2E ARG_0xD030 -
Table „ARG_0xD030“:
ARG EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD MIN MAX INFO
N.B.:
• If a call up has one or several arguments, these are located in a sub table.
• For service $2E there must be at least one entry in the argument table. Call up
without argument is not permitted.
Argument 1: “AUSWAHL_SPIEGEL“
• This argument selects the mirror, which is to be adjusted.
Possible input: “1“= Mirror driver's side or “0“= Mirror co-
driver's side
Argument 2: “RICHTUNG_SPIEGEL“
• This argument defines the direction.
Possible input: “right“, “left“, “upward“ or “downward“
Argument 3: “ANSTEUER_ZEIT“
• This argument defines the adjustment time in ms.
Table „SG_Funktionen“:
ARG_TABELLE
DATENTYP NAME MUL DIV ADD SG_ADR SERVICE RES_TABELLE
- - - - - - 2E 0xD040 -
Table „ARG_0xD040“:
ARG EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD MIN MAX INFO
Table „TAB_SP_RI“:
WERT TEXT
0x01 right
0x02 left
0x03 upward
0x04 downward
N.B.:
• When calling up discrete arguments the entry in column “TEXT“ or the entry in
column“WERT“ may be transmitted.
Example:
Table „TAB_SP_RI“:
WERT TEXT
0x01 right
0x02 left
0x03 upward
0x04 downward
The individual arguments to be supplied to the control unit are defined in a sub-table. The
name of the sub-table is entered in column “ARG_TABELLE“ in table SG_Funktionen.
To call up the standard job “STEUERN_ROUTINE“ three or four arguments have to be en-
tered.
Argument 1: “ARGUMENT_SPALTE“
• Enter the name of the column from which the 2nd argument is to be used. In table
“SG_Funktionen“ you may select the columns “ARG“, “ID“ or “LABEL“.
Argument 2: “STATUS“
• Enter the value of the column selected for argument 1, e.g. “RID“=0xA001
Argument 3: “STEUERPARAMETER“
• RoutineControlOptionRecord. Possible input:
o STR: Start routine
o STPR: Stop routine
o RRR: Request results from control unit
Argument 4: “WERT“
• Enter the value that is to be transferred to the control unit for controlling. This ar-
gument is only required if a parameter has been defined in the sub-table.
Table „SG_Funktionen“:
- - - - - - 31 - -
STAT_SUCHLAUF_EIN = 1
STAT_BEST_AM_SENDER = CHANNEL_A
STAT_BEST_FM_WERT = 96,65
STAT_BEST_FM_WERT_EINH = kHz
STAT_BEST_AM_WERT = 88,50
STAT_BEST_AM_WERT_EINH = kHz
Table „SG_Funktionen“:
RES_TABELLE
DATENTYP NAME MUL DIV ADD SG_ADR SERVICE ARG_TABELLE
INT - - - - - 31 - RES_0xA055
Table „RES_0xA055“:
DATEN-
RESULTNAME STR STPR RRR EINHEIT L/H MASKE NAME MUL DIV ADD INFO
TYP
0=Channel
search off,
STAT_SUCHLAUF_EIN - - + 0/1 - INT - - - - -
1=channel
search on
Shows name of
STAT_BEST_AM_SENDER - - + 0-n - STRING - - - - -
best AM channel
Value FM chan-
STAT_BEST_FM_WERT - + + kHz - INT - - 100 -
nel
Value AM chan-
STAT_BEST_AM_WERT - + + kHz - INT - - - 100 -
nel
One of the special features of the job“STEUERN_ROUTINE“ is that individual results can be
defined for each control parameter (STR, STPR, RRR). Therefore, different results can be
defined for Start, Stop or Request of results. The definition is carried out in the respective
sub-table. This table contains all results pertaining to one ID. The selection of results is
carried out be entering “-“ or “+“ in the columns STR, STPR and RRR.
The respective arguments that have to be supplied ot the control unit are defined in a sub-
table. The name of the sub-table is entered in column “ARG_TABELLE“ in table
SG_Funktionen.
To call up the standard job “STEUERN_IO“ four arguments have to be entered.
Argument 1: “ARGUMENT_SPALTE“
• Enter the name of the column from which the 2nd argument is to be used. In the
table“SG_Funktionen“ you may select the columns “ARG“, “ID“ or “LABEL“.
Argument 2: “STATUS“
• Enter the value of the column selected for the first argument, e.g.“DID“=0xD001
Argument 3: “STEUERPARAMETER“
• ControlOptionRecord. Possible input:
o RCTECU: ReturnControlToECU
o RTD: ResetToDefault
o FCS: FreezeCurrentState
o STA: ShortTermAdjustment
Argument 4: “WERT“
• Enter the value that is to be transferred to the control unit for controlling,
e.g.“Drehzahl“= 2300 1/min
apiJob("<SGBD-Name>"," STEUERN_IO","ARG;
DREHZAHL_VORGEBEN;STA;2300","")
STAT_IST_DREHZAHL_WERT = 2312
STAT_IST_DREHZAHL_EINH = 1/min
STAT_ FL_LINKS_INFO = Current engine speed
in 1/min
Table „SG_Funktionen“:
Table „ARG_0xD080“:
ARG EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD MIN MAX INFO
Table „RES_0xD080“:
RESULTNAME EINHEIT L/H DATENTYP MASKE NAME MUL DIV ADD INFO
Argument 1: “BLOCK_NR“
• Enter the number of the block that is to be read out. Permitted range 0 – 255.
Argument 2: “NEU_DEFINIEREN“
• Enter “JA“ or “YES“ to delete the block in the control unit and to re-enter a new
block in the control unit. Enter “NEIN“ or “NO“ if you do not want to delete or rede-
fine the block in the control unit.
Afterwards, the block is read out.
Note: The first call for a block is always YES. Subsequently, e.g. a cyclic query can be with
NO. The call lasts much longer with YES and delete and recreate each time is inefficient.
Argument 3: “ARGUMENT_SPALTE“
• Enter the name of the column from which the 2nd argument is to be used. From the
table“SG_Funktionen“ you may select the columns “ARG“, “ID“ or “LABEL“.
Argument 4: “STATUS“
• Enter the value from the column selected in the first argument, e.g.“DID“=0xD001
apiJob("<SGBD-Name>"," STATUS_BLOCK_LESEN","1;YES;ID;
0xD002;0xD003","")
Table „SG_Funktionen“:
In this call-up, the requested values of the identifiers are provided in the control unit and
can be read out subsequently with the job “STATUS_BLOCK_LESEN“.
Note: The order of the specified DIDs can not be reversed. Since the data is otherwise mis-
interpreted.
The following call would be wrong, because the DID 0xD003 in Example 1 is not the first,
but was passed as the second argument:
4 Combination of services
The following combinations of services per data identifier (DID) are possible:
When selecting one of the UDS standard jobs, job information refers to the table "SG_Funktionen".
Double click on "SG_Funktionen" to select the table.
1. Double click
1. Double click
2. Entry in input
field is carried out
automatically.
This function is available for the columns "ARG", "ID" and "LABEL".
1. Double click
2. Table is opened
6 Use of Environment-Conditions-Texts
Related to table SG_Funktionen the tables FUmwelt- und IUmweltTexte are used. The
exact using is documented in the specification Diagnostics part 5 (SAP: 10000786).
In the following example there is described a table FUmweltTexte with different elements.
The table can reference other tables, in this example the table Tab_0x00AA and the table
Gang.
table FUmweltTexte[9][] = {
{"UWNR" , "UWTEXT" , "UW_EINH" , "L/H" , "UWTYP" ,"NAME","MUL","DIV","ADD" },
{"0x0001", "@Batteriespannung@", "@Volt@" , "-" , "unsigned char", "-" , "25","255", "0"},
{"0x0002", "@Aussentemperatur@", "@Grad C@", "high", "signed int" , "-" , "1" , "1" , "0"},
{"0x0003", "@Motordrehzahl@" , "@1/min@" , "low" , "signed long" , "-" ,"1.97", "1", "7"},
{"0x0004", "@SHD-Position@" , "@mm@" , "-" , "Intel float" , "-" , "-" , "-" , "-"},
{"0x00AA", "SUB-Tabelle" , "0/1" , "-" , "0xFF" , "-" , "-" , "-" , "-"},
{"0x0005", "@Magnetventil@ 1" , "0/1" , "-" , "0x80" , "-" , "-" , "-" , "-"},
{"0x0006", "@Magnetventil@ 2" , "0/1" , "-" , "0x40" , "-" , "-" , "-" , "-"},
{"0x0007", "@Magnetventil@ 3" , "0/1" , "-" , "0x20" , "-" , "-" , "-" , "-"},
{"0x0009", "@Klappenposition@" , "@Grad@" , "-" , "signed char" , "-" ,"27","100","-50"},
{"0x000A", "@Taste XY@" , "0/1" , "-" , "0x01" , "-" , "-" , "-" , "-"},
{"0x0010", "@Waehlhebel@" , "0-n" , "-" , "0x07" ,"Gang", "-" , "-" , "-"},
{"0x0031", "@Schalter@ 1" , "0/1" , "high", "0x0001" , "-" , "-" , "-" , "-"},
{"0x0032", "@Schalter@ 2" , "0/1" , "high", "0x0002" , "-" , "-" , "-" , "-"},
{"0x0033", "@Schalter@ 3" , "0/1" , "high", "0x0004" , "-" , "-" , "-" , "-"},
{"0x0034", "@Stoerlampe@" , "0/1" , "high", "0x0010" , "-" , "-" , "-" , "-"},
{"0x0035", "@Bremse betaetigt@", "0/1" , "high", "0x0100" , "-" , "-" , "-" , "-"},
{"0x0040", "@Adresse@ XY" , "Hex" , "high", "unsigned int" , "-" , "-" , "-" , "-"},
{"0x0050", "@Audioquelle@" , "Text" , "high", "3" , "-" , "-" , "-" , "-"},
{"0xFFFF", "@ohne Bedeutung@" , "1" , "-" , "unsigned char", "-" , "1" , "1" , "0"},
{"0xXXYY", "@unbekannte UW@" , "1" , "-" , "unsigned char", "-" , "1" , "1" , "0"}
};
table Gang[2][] = {
{ "WERT", "UWTEXT" },
{ "0x01", "@Gang@: 1" },
{ "0x02", "@Gang@: 2" },
{ "0x03", "@Gang@: 3" },
{ "0x04", "@Gang@: 4" },
{ "0x05", "@Gang@: 5" },
{ "0x06", "@Gang@: R" },
{ "0xXY", "@Gang@: @unplausibel@" }
};
The table Tab_0x00AA is an example for the splitting of one byte in 3 digital / 1 discrete environment
conditions. Such a splitting-table may contain only indices for digital (this case: 0x0005, 0x0006,
0x0007) or discrete environment conditions (this case: 0x0010).
The names of the columns start after UW_ANZ with UW1_NR and continue up to the n. Environment
condition (this case: UW4_NR). The number of environment conditions (this case: 4) has to be listed in
the 1. column UW_ANZ. Furthermore please note, that the number of columns of the table has to be
set with the definition of the table (in the example: TAB_0x00AA[5][]).
table Tab_0x00AA[5][] = {
{ "UW_ANZ", "UW1_NR", "UW2_NR", "UW3_NR", "UW4_NR" },
{ "4" , "0x0005", "0x0006", "0x0007", "0x0010" }
};
E-Mail: referenz@bmw.de
https://gis.bmw.com