CITECT Disk Variable File Structure The
file is divided into three sections.
1
|
File Header
|
Specifies the type of
PLC, number of data tables and the number of records for each data
table.
|
2
|
Data Table
Headers
|
Specifies the data
type, length and start address of each data table. The number of
data table header is specified in the file header.
|
3
|
Data Tables
|
Data tables for each of
the data types
|
1). File Header
The file header is 16 bytes long.
Byte
Address
|
Data
|
0
|
32-bit word specifying
the type of PLC: Value (in Hex)
1 Allen Bradley PLC-2
2 Allen Bradley PLC-3
3 Allen Bradley PLC-5
4 GE Series 5 PLC
5 GE Series 6 PLC
6 Modbus
7 Square D
8 uMAX 6000
9 Klockner Moeller
A TIWAY - Texas Instrument
B Comli
C Fuji
D TIWAY - Texas Instrument 550
E Mitsubishi Melsec
F Siemens RK 512
10 Wormald C200H
11 Kingfisher
|
4
|
32-bit word specifying
the number of data tables for the disk file.
|
8
|
32-bit word specifying
the number of records for all data tables. Normal value is
1.12
|
12
|
32- bit reserved value,
must be zero.
|
2). Data Table Header
Each data table header is 32 bytes long. The
number of data table headers is specified in the file header.
Byte
Address
|
Data
|
16
|
16-bit word specifying
the PLC data type. For example for TIWAY PLC:
Value/PLC data
type
1 V
6 X (for TI550)
7 Y
8 C
|
18
|
16-bit word specifying
type of variable.
Digital is 0 and analog is 1.
|
20
|
32-bit word specifying
the length (in bytes) of the data table for one record.
|
24
|
32-bit word specifying
the byte offset of the data table from the beginning of the
file.
|
28
|
Symbolic name of the
last location of the PLC data table. The maximum length of the name
is 20 characters and is null terminated. This name is used by
"CTDISK" to determine the data type and length of
the data table.
32 bytes definition for each data table
|
3). Data Area
The data table immediately follows the
variable headers.
4). Example
To specify four data tables for "TIWAY".
V20
C100
X100
Y100
A hexadecimal dump of the disk variable file should look like
this:
0000: 0a 00 00 00 04 00 00 00 01 00 00 00 00
00 00 00 "................"
0010: 01 00 01 00 28 00 00 00 90 00 00 00 56 32 30 00
"....(.......V20."
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
0030: 08 00 00 00 0e 00 00 00 b8 00 00 00 43 31 30 30
"............C100"
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
0050: 07 00 00 00 0e 00 00 00 c6 00 00 00 58 31 30 30
"............X100"
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
0070: 07 00 00 00 0e 00 00 00 d4 00 00 00 59 31 30 30
"............Y100"
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
"................"
00e0: 00 00 |