Omron CS1G/H-CPUxx-EV1 Programming Manual page 241

Sysmac cs series; sysmac cj series
Hide thumbs Also See for CS1G/H-CPUxx-EV1:
Table of Contents

Advertisement

File Memory
I/O memory
CSV/TXT Data File
Structure (Double Word)
I/O memory
Creating Data Files with
Spreadsheet Software
1,2,3...
4 bytes
Converted
to ASCII
Delimiter
4 bytes
Delimiter
Contents of ABC.CSV
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.
Converted to
ASCII (Upper
word first)
Contents of ABC.CSV
Use the following procedure to create TXT and CSV data files with spread-
sheet software such as Microsoft Excel.
• Set the cell contents to 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. 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,4294967296+cell location)
The file displayed as text.
8 bytes
The file displayed as text.
Delimiter
Section 5-1
205

Advertisement

Table of Contents
loading

Table of Contents