I/O Memory Data Formats

Section 3-6

TXT Format

When hexadecimal I/O memory data (1234, 5678, 9ABC, etc.) is being copied to an attached file in TXT format, the data is converted to ASCII in one-word fields or two-word fields. The fields (one-word or two-word) are delimited by tabs ([HT]: 09) and a return and line feed ([CR][LF]: 0D0A) are inserted after the specified number of fields.

Example: Tab-delimited words with a return every 10 fields

I/O memory contents

 

+0

+1

+2

+3

+4

+5

+6

+7

+8

+9

+0

1234

5678

9ABC

DEF0

1234

5678

9ABC

DEF0

1234

5678

+10

9ABC

DEF0

1234

5678

9ABC

DEF0

1234

5678

9ABC

DEF0

TXT file contents

31

32

33

34

09

35

36

37

38

09

39

41

42

43

09

1

2

3

4

[HT]

5

6

7

8

[HT]

9

A

B

C

[HT]

 

35

36

37

38

0D

0A

39

41

42

43

09

 

 

 

 

5

6

7

8

[CR] [LF]

9

A

B

C

[HT]

 

 

 

Contents of TXT file when displayed

1234@5678@9ABC@DEF0@1234@5678@9ABC@DEF0@1234@5678@ 9ABC@DEF0@1234@5678@9ABC@DEF0@1234@5678@9ABC@DEF0

The @ character represents a hard tab and is displayed as a tab in text displays.

Note The TXT file format is compatible with the CPU Unit's READ DATA FILE and WRITE DATA FILE instructions (FREAD and FWRIT) set to tab-delimited data.

CSV Format

When hexadecimal I/O memory data (1234, 5678, 9ABC, etc.) is being copied

 

to an attached file in CSV format, the data is converted to ASCII in one-word

 

fields or two-word fields. The fields (one-word or two-word) are delimited by

 

commas (",": 2C) and a return and line feed ([CR][LF]: 0D0A) are inserted

 

after the specified number of fields.

 

 

 

 

 

 

 

 

 

 

 

 

 

Example: Comma-delimited words with a return every 10 fields

 

I/O memory contents

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+0

 

 

+1

 

+2

 

+3

 

 

+4

+5

 

 

+6

+7

 

 

 

+8

+9

 

 

+0

1234

 

5678

 

9ABC

 

DEF0

1234

5678

 

9ABC

 

DEF0

 

1234

5678

 

 

+10

9ABC

 

DEF0

1234

 

5678

 

9ABC

 

DEF0

1234

5678

 

9ABC

DEF0

 

 

CSV file contents

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

31

32

 

33

 

34

 

2C

35

36

 

37

 

38

 

2C

 

39

 

41

 

42

 

43

 

2C

 

 

 

1

2

 

3

 

4

 

,

5

 

6

 

7

8

,

 

9

 

A

 

B

 

C

,

 

 

 

 

 

35

 

36

 

37

 

38

0D

0A

 

39

 

41

 

42

 

43

 

2C

 

 

 

 

 

 

 

 

 

 

 

 

5

 

6

 

7

 

8

[CR] [LF]

9

 

A

 

B

C

,

 

 

 

 

 

 

 

 

 

Contents of CSV file when displayed

1234,5678,9ABC,DEF0,1234,5678,9ABC,DEF0,1234,5678,

9ABC,DEF0,1234,5678,9ABC,DEF0,1234,5678,9ABC,DEF0

Note The CSV file format is compatible with the CPU Unit's READ DATA FILE and WRITE DATA FILE instructions (FREAD and FWRIT) set to comma-delimited data.

61

Page 85
Image 85
Omron CJ1W-ETN21 operation manual TXT Format, CSV Format