The first telegram after establishing a connection can have any sequence number. In
Figure 1
you see part of a telegram flow with no errors between a controller and IPM. Figure 2 shows the case when the sequence number is 9999.Figure 3 shows the behavior when the controller sends sequence number AAAA, in Figure 4 AAAA is repeated.
As you can see in Figure 5, IPM accepts any sequence number except that one, that has been used by the last telegram that has been acknowledged ok. If it wouldn’t and the controller could not send for a long period of time so that it has to overwrite some telegrams in its buffer, it would be forced to rewrite all stored telegrams to adjust the sequence number.
Figure 1: Normal flow
Figure 2: Sequence number 9999
Figure 5: Other sequence number than awaited
Figure 4: Sequence number AAAA repeated Figure 3: Sequence number AAAA
IPM-DataTelegram_Client_Gateway_v6.0.2.0_en.docx Page 43 of 48 11.2
Errors
Figure 6 shows what happens, when IPM receives the same sequence number twice with no other sequence number between them.
The next figures describe what can happen if there is an error in a telegram. If the controller receives an error code inside an acknowledgement, it could send the telegram again Figure 7 to make sure that there was no error on the network (this is already guaranteed by TCP/IP). It could also try to fix the error and send the modified telegram (Figure 8). The next possibility is to continue with the next telegram (Figure 9). In Figure 10 you can see that, if IPM received sequence number “y” before a telegram with an error, it does not accept “y” again (with or without an error in it).
Figure 7: Retry without modification
Figure 8: Continue with next telegram Figure 6: Telegram repeated
Figure 9: Retry after modification
Figure 10: Sequence number repeated after error
IPM-DataTelegram_Client_Gateway_v6.0.2.0_en.docx Page 44 of 48 In the case that there is an error in the telegram with the sequence number that IPM awaits, the acknowledgement contains values like in Figure 11.
If the error is in the first telegram after the connection between the controller and IPM has been established, IPM sends AAAA as the next wanted sequence number, because there was no correct telegram before to extract a sequence number from Figure 12.
In general, in case of an error IPM sets the next sequence number in the acknowledgement to the sequence number it expects.
This is the sequence number received with the last correct telegram plus one, 0 if it the last sequence number had been 9999 ( (9999+1) mod 10000 = 0) or 1 if it had been AAAA.
If the first telegram after establishing the connection has an error, IPM always awaits AAAA.
Figure 11: Error in awaited telegram
11.3
Time Out
Figure 13 shows what happens, when IPM does not acknowledge fast enough and the controller sends the same telegram again after its internal time out occurred. After that, IPM acknowledges the first of the two telegrams and then the second one, which, for IPM, is a duplicate of the first telegram and therefore states that a sequence error occurred. The controller must ignore the second acknowledgment with the same sequence number.
In Fig.14 the acknowledgement is also too late, but here the controller sends the next telegram after it receives the first of the two acknowledgements. The controller again has to ignore the second acknowledgement, because it does not belong to the last sent telegram.
Figure 13: Acknowledgement too late I
Figure 12: Error in first telegram
Figure 14: Acknowledgement too late II
IPM-DataTelegram_Client_Gateway_v6.0.2.0_en.docx Page 45 of 48
12 Data Format
The trace values are stored in the telegram by “INTEL”-convention or in the network byte order, depending on the value of the field “byte order”.
12.1
Intel Format (little endian) 12.1.1 Definition
The first of the bytes is the least significant byte in one word or double word.
12.1.1.1 Examples
a) Binary number with the length of two bytes without algebraic sign
c) Binary number with the length of four bytes without algebraic sign
range of value 0 up to 4294967295 00000000h FFFFFFFFh Byte nr. Content (hex)
0 47h
1 11h
2 12h
3 01h
this results the value: 01121147h (hexadecimal) respectively 17961287 (decimal)
b) Binary number with the length of bytes with algebraic sign
this results the value: F508h (hexadecimal) respectively -2808 (decimal)
d) Binary number with the length of four bytes with algebraic sign
range of value -2147483648 up to 2147483647 80000000h 7FFFFFFFh
Byte nr. Content (hex)
0 47h
1 11h
2 12h
3 81h
this results the value: 81121147h (hexadecimal) respectively -2129522361 (decimal)
IPM-DataTelegram_Client_Gateway_v6.0.2.0_en.docx Page 46 of 48 12.2
Network byte order (big endian)
12.2.1 Definition
The first of the bytes is the most significant byte in one word or double word.
12.2.2 Examples
a) Binary number with the length of two bytes without algebraic sign
this results the value: 1508h (hexadecimal) respectively 5384 (decimal)
c) Binary number with the length of four bytes without algebraic sign
range of values 0 up to 4294967295 00000000h FFFFFFFFh Byte nr. Content (hex)
0 01h
1 12h
2 11h
3 47h
this results the value: 01121147h (hexadecimal) respectively 17961287 (decimal)
b) Binary number with the length of two bytes with algebraic sign
this results the value: F508h (hexadecimal) respectively -2808 (decimal)
d) Binary number with the length of four bytes with algebraic sign
range of values -2147483648 up to 2147483647 80000000h 7FFFFFFFh
this results the value: 81121147h (hexadecimal) respectively -2129522361 (decimal)
IPM-DataTelegram_Client_Gateway_v6.0.2.0_en.docx Page 47 of 48
13 Remarks about traces
A trace can consist of two or multiple dimensions, e.g.:
- Torque / angle - torque / current
- torque, angle and current ...
Every of these dimensions can be described - Either by an increment and start value - or by length, factor and algebraic sign
With indication of an increment and start value, there are no more indications to this dimension.
It is also not added to the transmitted dimensions of the trace part of the telegram.
The number of dimensions has to be the same for all steps transmitted in the trace. Also there must not be differences in the characteristic identifications used in every step, that means if e.g. MD and WI are transmitted in step 1, so this must also happen in step 2, no characteristic less, no characteristic more, no other characteristic and in the same order.
Characteristics, whose trace values are defined by an increment and start value, have to be defined by an increment and start value over all transmitted steps in a trace. The increment and start values may vary (view first trace example).
The characteristics, which define increment and start value, are associated to characteristics defining length, factor and algebraic sign by using the step. That means, if a characteristic with step = 1 is referenced in a trace block, than all characteristics with step = 1 and increment and start value defined are used to define the trace.
As trace values only integer values are transmitted with the specified length.
The trace value is multiplied with the assigned factor before adding it to the telegram.
This factor determines the adjustment of the decimal place, to create an integer value for transmission, which means the resolution determines the factor.
Resolution
(number of decimal places) Factor Multiplier Example
(measurement<=> value in telegram)
0 0 1 (=100) 97 ↔ 97
The values that have been created this way are transmitted binary. The biggest value determines the length. So the length of a trace can vary with the size of the values.
Examples:
Trace Value Factor Length Representation in the telegram Representation in little endian big endian hex
17.8 1 1 B2 B2 B2
132.76 2 2 DC 33 33 DC 33DC
1.0482 4 2 F2 28 28 F2 28F2
9866.53 2 4 1D 0E 0F 00 00 0E 0F 1D 000F0E1D
IPM-DataTelegram_Client_Gateway_v6.0.2.0_en.docx Page 48 of 48
14 Examples
14.1
Acknowledgement / Checksum
(The value of the checksum is displayed in bold and italic)
IPM.0001CSP.0001IPM-QUIT5ISO-8859-112323016.08.200512:13:59 (HEX: 49 50 4D 2E 30 30 30 31
43 53 50 2E 30 30 30 31 49 50 4D 2D 51 55 49 54 35 20 49 53 4F 2D 38 38 35 39 2D 31 20 20 20 20 20 20 20 20 20 20 31 32 33 20 32 33 20 20 20 20 30 20 20 20 31 36 2E 30 38 2E 32 30 30 35 31 32 3A 31 33 3A 35 39 0D) 14.2
Telegram without curve
14.3Telegram with curve
14.3.1 Angle transferred by increment and start value, torque by curve values
Example like without curve, but one curve is defined in telegram.
The curve values 1 and 2 belong to step 1, values 3, 4 and 5 belong to step 2.
Curve values: angle = [0, 5, 7, 9, 11] (defined by increment 5/ start value 0 and increment 2 / start value 7) torque = [7.2, 10.5, 15.2, 16.94, 18.705]
14.3.2 Angle and Torque as Curve Values
Example like in 14.3.1, but the angle is transferred by values, not by increment and start value.
14.4
Assembly hierarchy
Following assembly hierarchy should be pictured in the telegram:
Part number 111, Ident number aaaa (result) + Part number 222, Ident number bbbb | + Part number 444, Ident number dddd | + Part number 555, Ident number eeee + Part number 333, Ident number cccc
The part numbers 444 and 555 are assembled to the part number 222. That results, together with the part number 333, in the part number 111