![Omron CJ1G-CPU series Programming Manual Download Page 215](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489215.webp)
194
File Memory
Section 5-1
CSV/TXT Data File
Structure (Double Word)
The following illustration shows the data structure of a CSV data file
(ABC.CSV) with double-word fields containing four words from I/O memory:
1234 Hex, 5678 Hex, 9ABC Hex, and DEF0 Hex. The structure of the TXT file
with double-word fields is the same.
Creating Data Files with
Spreadsheet Software
Use the following procedure to create TXT and CSV data files with spread-
sheet software such as Microsoft Excel.
• Set the cell contents to numeric or characters.
• Input 4 characters in each cell if single-word fields are being used or 8
characters if double-word fields are being used. For example, if single-
word fields are being used input 000A, not just A.
• Be sure to input only hexadecimal characters (0 to 9, A to F, or a to f) in
the cells. Other characters and codes cannot be used.
When you want to store hexadecimal digits in I/O memory, it is helpful to con-
vert the spreadsheet’s decimal inputs to hexadecimal. Use the following pro-
cedure to convert to hexadecimal.
1,2,3...
1.
Select Add-Ins... from the Tools Menu.
2.
Select Analysis ToolPak in the Add-Ins Menu.
3.
Select Function from the Insert Menu at the cell where the function will be
used.
4.
Select DEC2HEX (number, digits) from Engineering in the Category
Field.
5.
When converting to 4-digit hexadecimal, input the following at the number
variable: IF(0<=cell location,cell location,65535+cell location)
When converting to 8-digit hexadecimal, input the following at the number
variable: IF(0<=cell location,cell location,429cell location)
I/O memory
4 bytes
Delimiter
Contents of ABC.CSV
4 bytes
Delimiter
The file displayed as text.
Converted
to ASCII
I/O memory
8 bytes
Delimiter
Contents of ABC.CSV
The file displayed as text.
Converted to
ASCII (Upper
word first)
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...