Pag. 107 di 152
10.2 Type 0 files
Type 0 files contain information about type 1
÷
255 files stored on the disk.
Because of this, type 0 files can be considered disk
“directories”.
By reading type 0 files, it is possible to retrieve information about the files on the disk.
By writing type 0 files, it is possible to create or to delete files.
A directory is a structured, homogeneous file that may contain the following output variables:
Directory – Output Variables allocated in type 0 files
Name
ID
Type
Description
Firmware version
FF83h
BYTE PAIR
(Unsigned integer, Unsigned integer)
Firmware version
Byte 0 = Major version
Byte 1 = Minor version
File number
0080h
WORD
(Unsigned integer)
Modbus File Number
(unique file identifier)
Record size
0081h
BYTE PAIR
(Unsigned integer, Unsigned integer)
Size of records in the file
Byte 0 = Header size
Byte 1 = Data record size
File ID
0082h
BYTE PAIR
(Unsigned integer, Unsigned integer)
File organization:
Byte 0 = Reserved
Byte 1 = File ID
Creation time
0083h
UNIX TIM OFFSET
Date/time of file creation
Last modification time 0084h
UNIX TIM OFFSET
Date/time of last modification
File size
0085h
DOUBLEWORD
(Unsigned integer)
File size, in bytes
File status
0086h
BYTE PAIR
(Unsigned integer, Unsigned integer)
File status:
Byte 0 = File status
Byte 1 = Reserved
File Name
0087h
BYTE ARRAY
(ASCIIZ string)
File name
All data records in a directory describe a disk file.
−
The
n
record in file 00.00, where
1
≤
n
≤
9999
, contains information about the
n
th
disk file, in file-
number order.
−
The
n
record in file 00.
T
, where
1
≤
n
≤
256
, contains information about the
n
th
disk file of type
T
,
in file-number order.