92
10 File organization and management in the X3M flash memory.
10.1 File system
X3M
uses a “
Flash-Disk
” for the storage of its configuration parameters, readings and other operating
information.
Data on disk are organized in record files, as specified by the Modbus standard.
Files are accessed through the Modbus functions
“Write General File”
and
“Read General File”.
Available space is 2.088.960 bytes, organized in 4.096 allocation units of 510 bytes each. As each file occupies
at least one allocation unit, there may be at most 4096 disk files.
Each file is uniquely identified by a 2-byte index (
file number
, 0 to 65535) and can contain up to 10,000 records,
numbered from 0 to 9,999. The record max size is 238 bytes.
Records in the same file must all share the same size. The only exception to this rule is record 0, whose size
may differ from the others. Record 0 is also called the
file header
: All other records (data records) are the file
body
.
The first four bytes of record 0 are called “
record definition structure”
and contain information that is essential for
file data access, such as:
−
Header
size;
−
Size for each record in the data area;
−
Information pertaining to the file organization and content:
RAW
Flag:
0 = Structured file;
1 = Raw file;
NON HOMOGENEOUS Flag:
0 = all data records share the same format (homogeneous file);
1 = the file structure is such as to allow saving data records of different formats (non
homogeneous file);
OUTPUT
Flag:
0 = The instrument treats this file as read only file (e.g. configuration file);
1 = This file is written by the instrument (e.g. report);
DIRECTORY Flag: when set (flag == 1) the file is a disk
directory
;
The structure of X3M files is detailed in the following pages.
Содержание X3M
Страница 142: ...Pag 142 di 152 ...
Страница 145: ...Pag 145 di 152 ...
Страница 151: ...Pag 151 di 152 ...