CCS Standardfunction   K2000Ini []
 

K2000Ini []

Target_Address [INT]

Initialization_Type [INT]

Initialization_Line [INT]

P1max [ms]

P2max [ms]

P3min [ms]

P3max [ms]

P4min [ms]

W1 [ms]

W2 [ms]

W3 [ms]

W4min [ms]

W4max [ms]

W5 [ms]

TiniL [ms]

TWuP [ms]

BaudRate [INT]

KeepTesterPresent [INT]

Target_Address 5Baud_Stimulation [INT]

Description of Function

Initializes and establishes communication via the diagnosis interface for the KW2000 protocol. In contrast with the function ComInit IDH_ComInit , which applies to all protocols (but does not permit any protocol-specific parameter settings), the function K2000Ini specifies all parameters that are required to establish serial communication. For KWP2000 communication via the CAN, the function CAN2000Ini can be used.

This function only supports physical addressing.

This function does not return a value.

Caution! The timing parameters to be specified in the testing function apply to the tester and are generally different from the settings programmed on the control unit.

Testing Points

None

Parameters

Target_Address

Specifies the KW2000 address of the control unit. Permissible values are 0 ... 255.

Initialization_Type

Specifies the type of initialization (stimulation)

0 Æ No initialization
(This mode is used to set/alter communication parameters for the tester without re-establishing communication or interrupting communication in progress.)

1Æ 5-Baud initialization

2Æ Quick initialization

3Æ Terminate communication

Default setting: 2

Initialization_Line

Specifies the lines on which initialization (stimulation) is to take place.
0 Æ K + L lead
1 Æ L lead
2 Æ K lead

Default setting: 0

Timing parameters for communication between tester and control unit (parameters P1 .. P4 as per Keyword Protocol 2000; for explanations, refer to Diagram TimingParameter1 with the same title. The suffix min or max is appended to the parameter name in order to indicate that either the minimum or maximum figure is to be specified).

P1max

Specifies the maximum time the tester must wait between the receipt of 2 bytes.

Default value: 20

P2max

Specifies the maximum time the tester must wait for a response from the control unit.

Default value for normal timing: 50 ms
Default value for extended timing: 1000 ms
Resolution: 25 ms (to 6 s; beyond that, the resolution becomes coarser; refer to Keyword Protocol 2000 documentation).

P3min

Specifies the time the tester has to wait after a response from the control unit before it can start a new query.

Default value for normal timing: 55 ms
Default value for extended timing: 0 ms
Resolution: 0.5 ms

P3max

Specifies the maximum period that is allowed to elapse after a response from the control unit before the tester has to start a new query (to prevent communication breaking down). (Special case: P3Max = 0 ms is interpreted as no time limit, i.e. P3Max = ·.)

Default value: 5000 ms
Resolution: 250 ms

P4min

Specifies the minimum time the tester must wait between sending 2 bytes.

Default value: 5 ms
Resolution: 0.5 ms

Timing parameters for 5-baud initialization (parameters W1 .. P4 as per Keyword Protocol 2000; for explanations, refer to Diagram TimingParameter2 with the same title. The suffix min or max is appended to the parameter in order to indicate that either the minimum or maximum figure is to be specified).

W1max

Specifies the maximum period the tester must wait during 5-baud initialization for the synchronization word from the control unit after sending the address.

Default value: 300 ms

W2max

Specifies the maximum period the tester must wait for KB1 during 5-baud initialization after receipt of the synchronization word.

Default value: 20 ms

W3max

Specifies the maximum period the tester must wait for KB2 during 5-baud initialization after receipt of KB1.

Default value: 20 ms

W4min

Specifies the maximum period the tester must wait during 5-baud initialization after receiving KB2 before it can send the inverted KB2 back to the control unit.

Default value: 25 ms

W4max

Specifies the maximum period the tester must wait during 5-baud initialization for the response from the control unit (inverted control unit address) after sending the inverted KB2.

Default value: 50 ms

W5min

Specifies the minimum period the tester must wait (after control unit is switched on) before it can start establishing communication (sending the address byte). This figure applies both to 5-baud initialization and to quick initialization.

Default value: 300 ms

Timing parameters for quick initialization (Parameters TiniL and TWuP as per Keyword Protocol 2000; for explanation see diagram TimingParameter3 of the same name.

TiniL

Specifies Low period for the wake-up pattern.

Default value: 25 ms

TWuP

Specifies total duration of wake-up pattern (Low phase + High phase).

Default value: 50 ms

Other parameters:

BaudRate

Specifies the baud rate for communication.

Default value: 10400

KeepTesterPresent

Specifies whether the tester should send Tester Present messages to the control unit of its own accord to prevent communication breaking down.

The following values are allowed:

0

Do not send Tester Present messages

1

Automatically send Tester Present message if the period specified by P3max has elapsed since the last communication.

Default setting: 0

Target_Address 5Baud_Stimulation [Dec]

Target address for 5-baud stimulation.

Timing parameters for communication between tester and control unit (excerpt from Keyword Protocol 2000 Part 2)

Value

Description

P1

Inter byte time for server (ECU) response

P2

Time between client (tester) request and server (ECU) response or two server (ECU) responses

P3

Time between end of server (ECU) responses and start of new client (tester) request

P4

Inter byte time for client (tester) request

Timing parameters for 5-baud initialization (excerpt from Keyword Protocol 2000 Part 2)

Timing

Values in ms

Parameters

min.

max.

Description

W1

60

300

Time from end of the address byte to start of synchronisation pattern

W2

5

20

Time from end of the synchronisation pattern to the start of key byte 1

W3

0

20

Time between key byte 1 and key byte 2

W4

25

50

Time between key byte 2 (from the server (ECU)) and its inversion from the client (tester). Also the time from the inverted key byte 2 from the client (tester) and the inverted address from the server (ECU)

W5

300

-

Time before the client (tester) starts to transmit the address byte

Timing parameters for quick initialization (excerpt from Keyword Protocol 2000 Part 2)

timing parameter

minimum timing value

timing value

maximum timing value

TiniL

24 ms

25 +/- 1 ms

26 ms

TWuP

49 ms

50 +/- 1 ms

51 ms

Tidle = W5

Example (Target address: 1; otherwise default settings for extended timing, target address for 5-baud stimulation: 1)

K2000Ini

1, 2, 0, 20, 1000, 0, 5000, 5, 300, 20, 20, 25, 50, 300, 25, 50 ,10400,0,1