Command protocol
9-39
9.5.4 Battery Log File
Header
The binary file begins with a 32 bytes header, structured as follows:
•
The starting 8 bytes are always 0x4C 0x42 0x41 0x54 0x5F 0x53 0x20
0x20 [0-7]
•
24 bytes reporting the serial number of the unit (if it is shorter, a zero-
padding is performed) [8-31]
Data
The Log file contains, from the 32nd byte, the records consisting of 8 bytes
each. The data are expressed in BIG ENDIANNESS .
Reserved
Battery
PERTS
Seconds
DateTime
0x21
Byte 1
0xAB
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Battery
is the voltage of the battery. The number should be considered as an unsigned 8 bit integer. To
get the correct value of the battery voltage the following formula is used:
Volt =
Voltage*(0.132)
If, for example, 8 bit figure named
Battery
is 0x1A (decimal 26) then the battery voltage will be 3.4 V
PERTS
•
Bit D2 When High it flags that the USB connection was ON during sampling.
•
Bit D1 When High it flags that the external Charger was connected by cable during sampling.
Seconds
represent the time in seconds (modulo 60) at which the log has been saved. The number should
be considered as an unsigned 8 bit integer.
DateTime
should be considered as a big-endian unsigned 16 bit integer and indicates how many minutes
have been elapsed since the beginning of the current month (previous MONTHS data).
If, for example,
DateTime
is 0x95AE (decimal 38318) then the record will be related to the 27
th
of the
month at 14:38.
Indeed :
Day = 1 +Int(
DateTime
/ 1440) = 1 +Int ( 38318 / 1440 ) = 27
Hour = Int((
DateTime
Mod (1440)) / 60) = Int ( ( 38318 Mod (1440 ) ) / 60 ) = 14
Minute = (
DateTime
Mod (1440)) Mod 60)= ( 38318 Mod ( 1440 ) ) Mod 60 ) = 38
End of Log file
The Log file ends with the checksum byte made up of the modulo 256 sum
of the hexadecimal values of all the bytes.
Summary of Contents for LR-01
Page 72: ...2 12 Installation and use This page has been left blank intentionally...
Page 76: ...3 4 Probes Manager software installation Click Next to proceed installing...
Page 116: ...5 4 Firmware Update This page has been intentionally left blank...
Page 168: ...9 40 Command protocol This page has been left blank intentionally...
Page 192: ...11 4 Service This page has been left blank intentionally...
Page 194: ...Suggerimenti Commenti Note Suggestions Comments Note...