9 Program Examples
9.3 Program Example 2
89
FX3U-CF-ADP User's Manual
1
Introduction
2
Specification
3
System
Configuration
4
Installation
5
Wiring
6
Functions
7
Before
Programming
8
CF-ADP Applied
Instructions
Explanation
9
Program
Examples
10
Troubleshooting
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+00111E AAAA111E ABCDEFGHIJ
0 20 3000000 1.12E+00111F BBBB111F ABCDEFGHI
1 30 4000000 1.13E+00222A BBBB222A ABCDEFGH
0 40 5000000 1.14E+00222B BBBB222B ABCDEFG
1 50 6000000 1.15E+00222C BBBB222C ABCDEF
0 60 7000000 1.16E+00222D BBBB222D ABCDE
1 70 8000000 1.17E+00222E BBBB222E ABCD
1 80 9000000 1.18E+00222F BBBB222F ABC
1 90 0 1.19E+002222 BBBB2222 AB
0 100 100 1.21E+003333 BBBB3333 A
2 300000 1.20E+00FFFC BBBBFFFC ABC
0 3 400000 1.30E+00FFFD BBBBFFFD ABCD
0 4 500000 1.40E+00FFFE BBBBFFFE ABCDE
1 5 600000 1.50E+00FFFF BBBBFFFF ABCDEF
1 6 700000 1.60E+00111A AAAA111A ABCDEFG
0 7 800000 1.70E+00111B AAAA111B ABCDEFGH
1 8 900000 1.80E+00111C AAAA111C ABCDEFGHI
0 9 1000000 1.90E+00111D AAAA111D ABCDEFGHIJ
0 0 100000 1.00E+00FFFA BBBBFFFA A
1 1 200000 1.10E+00FFFB BBBBFFFB AB
1
DATE TIME
Index Bit Character stringReal numberDEC 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