21
akytec GmbH - Vahrenwalder Str. 269 A - 30179 Hannover - Germany Tel.: +49 (0) 511 16 59 672–0 - www.akytec.de
Parameter
Type
Size
Comment
Parameter Status
binary
data
1 byte
parameter status in the log file (0 – the
parameter value is correct, 1 – the parameter
value is incorrect and its further processing is
not recommended).
Line break
binary
data
2 bytes
\n\r (0x0A0D)
Example of decrypted entry:
0x52 0x82 0xD1 0x24
0x3B
0x30 0x30 0x30 0x30 0x61 0x39 0x30 0x30
0x3B
0x30 0x30 0x30 0x30
0x30 0x30 0x30 0x31
0x3B
0x31
0x0A 0x0D
where
– 0x52 0x82 0xD1 0x24 – time stamp. To get the date and time in UnixTime format, it is necessary
to reverse the byte order and add the offset constant (number of seconds between 00:00:00 01/
01/1970 and 00:00:00 01/01/2000): 0x24D18252 (HEX) + 946684800 (DEC ) = 1564394971
(DEC, corresponding to July 29, 2019, 10:09:31);
–
0x3B
– separator;
– 0x30 0x30 0x30 0x30 0x30 0x61 0x39 0x30 0x30 – unique identifier of the parameter
(00003ba00);
–
0x3B
– separator;
– 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31 – parameter value (00000001);
–
0x3B
– separator;
– 0x31 – parameter status (1 – parameter value is correct);
–
0x0A 0x0D
– line break characters.
The time is written to the file from the built-in real time clock. You can also set the time zone, which
will be read by external software.
The log file in the Device is written with a interval specified by user. Writing occurs with a certain
frequency, calculated in such a way that the resource of Device flash memory is sufficient for a
period of at least 10 years of operation.
Log file can be read:
– by akYtecToolPro;
– by user software (using Modbus function 20).
The list of logged parameters is available in the akYtecToolPro software on the
Device Information
tab. The order of writing parameters to the log file corresponds to the order of parameters on the tab.
NOTE
After updating the firmware, all device settings except the network settings will be reset to the
factory settings.
The log file is read using the Modbus function 20 (0x14). This function returns the contents of the
registers of the memory file. The function allows using one request to read one or several records
from one or several files.
The file read request for each entry indicates:
– link type, 1 byte (should be equal to 6);
– file number, 2 bytes;
– starting address of the register inside the file, 2 bytes;
–
number of registers to read, 2 bytes.
NOTE
The file number in the Mobus request is calculated as 4096 + the file sequence number.
Sequential file numbering is from scratch. The Last log file index contains the sequential
number of the log file for the last time data were written.
The number of readable registers in the request should be selected so that the length of the
response does not exceed the allowable length of the Modbus packet (256 bytes).
The size of the log file is not known in advance, so you should read portions of the data using
separate queries. If in response to the request a message is received with error code 0x04
(MODBUS_SLAVE_DEVICE_FAILURE), then you can conclude that the addresses of the registers