Справочник Пользователя для Mitsubishi Electronics FX3U-CF-ADP

Скачать
Страница из 124
9 Program Examples
9.3 Program Example 2
89
FX
3U
-CF-ADP User's Manual
1
Introduc
tion
2
S
pecifi
cation
3
Sy
stem
 
Configurati
o
n
4
Ins
tal
lation
5
Wi
rin
g
6
Functi
o
n
s
7
Bef
o
re
 
Programm
ing
8
C
F
-AD
P
 Appl
ied 
Ins
tructi
ons
 
Explanati
o
n
9
Program 
Examples
10
T
roubl
esho
oti
n
g
9.3
Program Example 2
9.3.1
Operation details
• When X004 turns ON, the following file is created inside the CompactFlash
TM
 card.
If a file whose file ID is "0" already exists in the CompactFlash
TM
 card, file creation and data name writing 
are aborted.
"****" in "FILE****" below represents a numeric value from "0000" to "0999".
- File ID = 0
- File name = FILE****
- Data type = Mixed
• When X005 turns ON, 7 data points of different types (bit type, 16-bit decimal type, 32-bit decimal type, 16-
bit hexadecimal type, 32-bit hexadecimal type, real number and character string) are written directly and 
additionally to the file "FILE****" stored in the CompactFlash
TM
 card.
• When X006 turns ON, 7 data points of different types are read from the final line in the file "FILE0000". 
Data reading should be executed after data writing.
• When X007 turns ON, the file "FILE****" is deleted. 
9.3.2
Example of a mixed type file in "csv" format after writing
When a "csv" file is created and then data is written to the file 20 times, its contents are as shown below.
Numeric values are stored in shaded areas.
9.3.3
Device Assignments
Device No.
Contents of operation
X004
Creates a mixed type file, and writes data names.
X005
Writes data to the mixed type file.
X006
Reads data from the mixed type file.
1
10
2000000
1.11E+00
111E
AAAA111E
ABCDEFGHIJ
0
20
3000000
1.12E+00
111F
BBBB111F
ABCDEFGHI
1
30
4000000
1.13E+00
222A
BBBB222A
ABCDEFGH
0
40
5000000
1.14E+00
222B
BBBB222B
ABCDEFG
1
50
6000000
1.15E+00
222C
BBBB222C
ABCDEF
0
60
7000000
1.16E+00
222D
BBBB222D
ABCDE
1
70
8000000
1.17E+00
222E
BBBB222E
ABCD
1
80
9000000
1.18E+00
222F
BBBB222F
ABC
1
90
0
1.19E+00
2222
BBBB2222
AB
0
100
100
1.21E+00
3333
BBBB3333
A
2
300000
1.20E+00
FFFC
BBBBFFFC
ABC
0
3
400000
1.30E+00
FFFD
BBBBFFFD
ABCD
0
4
500000
1.40E+00
FFFE
BBBBFFFE
ABCDE
1
5
600000
1.50E+00
FFFF
BBBBFFFF
ABCDEF
1
6
700000
1.60E+00
111A
AAAA111A
ABCDEFG
0
7
800000
1.70E+00
111B
AAAA111B
ABCDEFGH
1
8
900000
1.80E+00
111C
AAAA111C
ABCDEFGHI
0
9
1000000
1.90E+00
111D
AAAA111D
ABCDEFGHIJ
0
0
100000
1.00E+00
FFFA
BBBBFFFA
A
1
1
200000
1.10E+00
FFFB
BBBBFFFB
AB
1
DATE TIME
Index
Bit
Character string
Real number
DEC 16bit
1
2
3
4
5
6
7
8
9
10
2009/ 9/ 9 23:59:00
11
12
13
14
15
16
17
18
19
20
2009/ 9/ 9 23:59:28
2009/ 9/ 9 23:59:02
2009/ 9/ 9 23:59:04
2009/ 9/ 9 23:59:06
2009/ 9/ 9 23:59:08
2009/ 9/ 9 23:59:10
2009/ 9/ 9 23:59:20
2009/ 9/ 9 23:59:22
2009/ 9/ 9 23:59:24
2009/ 9/ 9 23:59:26
2009/ 9/ 9 23:59:30
2009/ 9/ 9 23:59:32
2009/ 9/ 9 23:59:34
2009/ 9/ 9 23:59:36
2009/ 9/ 9 23:59:38
2009/ 9/ 9 23:59:40
2009/ 9/ 9 23:59:42
2009/ 9/ 9 23:59:44
2009/ 9/ 9 23:59:46
DEC 32bit
HEX 16bit
HEX 32bit