CCS Standardfunction ComBlock [Str] |
Interface_Protocol_Block [Str]
Sends an interface protocol block from the tester via the serial interface to the control unit. Depending on the mode, a response (measured data block) may be expected from the control unit; the response is written to a received data memory. The function ComBlock can be used in conjunction with the functions K2000Ini, CAN2000Ini, as well as the general function ComInit. That received data memory can be accessed by means of the functions BlockInt IDH_BlockInt and BlockStr IDH_BlockStr . Evaluation of tolerances within the ComBlock function is not permissible.
Specifies the protocol block that is to be sent to the control unit in the form of a sequence of bytes. Each byte is represented by 2 hexadecimal digits. There must be no spaces or any other separators between the bytes. The limitation to 14 ASCII characters does not apply in this case. Depending on the protocol, individual bytes of the protocol frame may also have to be included (see
Notes on Diagnostic Protocols
Diagnose-Protokolle
).
If a block that does not require a request block is to be read by the tester, no parameter is specified at this point (e.g. control unit automatically sends a block to the tester after a reset without a request having been issued).
Number of bytes expected back and written to the received data memory in the case of a test read function; depending on the protocol (see Notes on Diagnostic Protocols Diagnose-Protokolle ), some of the protocol frame bytes may also be counted; in the case of KWP2000 and EASY, this parameter is not analyzed. For mode 's' or 'c' (see testing parameter 'Mode'), 0 is entered here.
If the test read function receives no response from the control unit within the period specified for the timeout, the test is aborted. For mode 's' or 'c' (see testing parameter 'Mode'), 0 is entered here.
The parameter 'Mode' has the following meanings for the function ComBlock:
´l´ : Read function: function returns measured value(s).
´s´:Control function; no response is expected.
´Init´: Initialization function; corresponds to Mode 's' except that the tester remains ready to receive and can receive messages which can be retrieved by means of a ComBlock call using Mode 'l'.
´c´:Continuous function; indicates that the interface protocol block is incomplete and is continued on a succeeding line.
Example 1: Reading measured data block (K71)
Interface protocol block (Bytes 1 - 4):
03: Block length
00: Block count
12: Block title"Read measured data"
03: End of Text
Interface protocol block (Bytes 1 - 7):
06: Block length
00: Block count
01: Block title"Read RAM"
02: Number of cells
FC: H-byte start address
0B: L-byte start address
03: End of Text
Interface protocol block (Bytes 1 - 9):
08: Block length
00: Block count
1A: Block title"Write to EEPROM (serial)"
02: Number of cells
B1: H-byte start address
00: L-byte start address
11: Contents of first EEPROM cell
22: Contents of second EEPROM cell
03: End of Text
1 Notes on Diagnostic Protocols
The interface protocol block is not dependent on the tester used. However, it may have to include checksums and details of the length of the protocol block; as it is time-consuming for the author of the PAV to have to determine and correctly enter such data, with some protocols it is automatically completed by the testing station control software or the tester before the interface protocol block is sent to the control unit.
Below are details of which useful data has to be specified in the test function according to the diagnostic protocol in the interface protocol block and at which location the useful bytes are to be found in the received message (in the received messages memory).
2 KW2000
A message that is sent to the control unit is constructed as follows:
Only the useful bytes (Byte 4 .. n or Byte 5 .. n) are entered in the PAV; when the program is run, the complete message is generated from them and sent (by a tester) to the control unit.
A message that is received by the control unit is constructed as follows:
The first 3 bytes are automatically removed from the message received; the message is then written to the received data buffer; when accessing the data using the testing function BlockInt IDH_BlockInt or BlockStr IDH_BlockStr , Index 1 thus refers to the response byte, and Index 2 to the first useful byte.
The response byte should be checked in the PAV for every ComBlock read function.
A message that is sent to or received from the control unit is constructed as follows:
All bytes apart from ETX are entered in the PAV. When the program is run, ETX is automatically appended to the message and sent (by a tester) to the control unit.
When a message is received by the control unit, the entire message is written to the received data buffer; when accessing the data using the testing function BlockInt IDH_BlockInt or BlockStr IDH_BlockStr , Index 4 thus refers to the first useful byte.
A message that is sent to or received from the control unit is constructed as follows:
All bytes apart from Checksum are entered in the PAV. When the program is run, the checksum is automatically appended to the message and sent (by a tester) to the control unit.
When a message is received by the control unit, the entire message is written to the received data buffer; when accessing the data using the testing function BlockInt IDH_BlockInt or BlockStr IDH_BlockStr , Index 3 thus refers to the first useful byte.
With regard to the bytes to be specified or the response bytes, messages in the EASY protocol are treated in the same way as with KW82 KW82 .