Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 628

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

• An integral multiple of "Number of columns" should be specified for "Number of request write data".
Otherwise, numbers of columns will be apart.
• The last data is always followed by a line feed code. In addition mode, therefore, data is added starting from
the beginning of a new line.
• When data is added to the end of a file, columns are shifted if "Number of columns" is changed from the
previous writing.
• The following figures show an example of specifying "String (ASCII data)" for the execution/completion type.
Ex.
Writing data after converted to CSV format (string (ASCII data))
[Data to be written to a file]
SP.FWRITE
U0
K2
[Control data]
D10
H0130
D11
H0000
D12
-
D13
-
D14
K0
D15
D16
K0
D17
K2
D099
K3
D100
H4241
D101
H4443
"ABCD"
D102
H0000
D103
H3231
D104
H0033
"123"
D105
H3534
D106
H0036
"456"
ABCD.CSV
• Set 00H (NULL) in the end of the string in an element. When the number of bytes of the string is even, set
0000H (two bytes of NULL) in the next one word.
• The maximum number of characters in one element is 1999. If this maximum number is exceeded and 00H
(NULL) is not stored, characters of 2000th character and after are not written and the write processing shifts
to the next element.
• A maximum of 1023 elements can be written in a single instruction execution.
7 APPLICATION INSTRUCTIONS
626
7.6 Reading/Writing Data Instructions
D10
"ABCD"
D99
M0
(1)
(2)
(3)
ABCD
,
123
,
456
CR
LF
(1) Data to be written
(2) File name
(3) Control data
D10: Execution/completion type: String (ASCII data)
D11: Completion status
D12: Number of data actually written
D13: (Not used)
D14, D15: File position
D16: Number of columns
D17: Data type specification
D99: Number of request write data
D100 to D102: String to be written to the 1st column of
the 1st line
D103, D104: String to be written to the 2nd column of
the 1st line
D105, D106: String to be written to the 3rd column of
the 1st line

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents