Modbus Protocol
Strona
7
z
10
3.3 User defined function codes - Read Events (0x42)
The function is used in order to get the event log. The Event log contains up to 2048 records. The record
with index 0 is the youngest in the database. The size of record is 22 bytes. The current number of records should
be checked in Input Register at 3135. The maximum records count in the request is 6.
The starting record number and the number of records are sent in the request.
The size of records in bytes and records are sent in the response.
Record:
Position Type Description
Seconds
uin32_t
Time is counted in seconds from the year 2000. The value 0 corresponds
to the time 2000.01.01, 00:00:00
Event code
uint16_t
The event code is in the range 1-254. The Event codes section contains a
detailed description of each code.
Signals
uint16_t
Signal Position Description
AC Bit 0
0 – off
1 – on
LoB Bit 1
0 – off
1 – on
EXTi Bit 2
0 – off
1 – on
APS Bit 3
0 – off
1 – on
EPS Bit 4
0 – off
1 – on
ALARM Bit 5
0 – off
1 – on
Voltage Aux1
uint16_t mV
Voltage Aux2
uint16_t mV
Battery voltage Ubat
uint16_t mV
Charging current Ild
uint16_t mA
Battery current Ibat
uint16_t mA
Battery circuit resistance
Rbat
int16_t
mΩ
-1: none
Battery temperature Tbat
int16_t ˚C
Request:
Function code
1 Byte 0x42
Record number
2 Bytes Range: 0 – 2047
Record count
2 Bytes 1 – 6
Response:
Function code
1 Byte 0x42
Byte count
1 Byte The size of records in bytes
Data
22 – 132 Bytes Records count: 1 – 6
Errors:
Function code
1 Byte 0xC2