Mitsubishi MELSEC-Q/L Programming Manual page 637

Table of Contents

Advertisement

(i)
Below is the method for calculating the file size (total number of bytes) when a CSV format file is written to the ATA
card.
Total number of bytes = Total bytes excluding final line + bytes of final line
(Number of bytes on a line = number of columns
*1:
For all lines but the final line, this is the specified number of columns. The number of columns on the final line depends on the
number of columns specified via the amount of data written. It is calculated as follows.
(1) The number of lines excluding the final line is calculated.
Number of lines excluding final line = Amount of data in write request + number of columns (remainders discarded)
(2) The number of columns in the final line is calculated.
Number of columns in final line = Amount of data in write request - number of lines excluding final line number of columns)
*2:
The number of bytes for each data value is calculated as shown below.
Sign of Data
Value
Positive
Negative
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Error
code
4004
The device that cannot be specified has been specified.
Values specified in control data ( ) and the subsequent devices are
out of the setting range.
No space is found when a new file is created.
A value that cannot be used has been set for the file name ( ).
The attribute of the file name ( ) is "read only".
The drive specified by drive designation device ( ) contains the
4100
medium other than the ATA card.
Space in the ATA card is insufficient.
An access error occurred in the ATA card.
The drive specified by drive designation device ( ) contains the
medium other than the SD Memory card.
Space in the SD Memory card is insufficient.
An access error occurred in the SD Memory card.
The value specified in "No. of request write data" ( ) is out of the
setting range, or exceeds the device range specified in ( +1) or the
4101
subsequent devices.
The range of the device specified in
corresponding device.
*1
+ 1 + total bytes of all data values on line
Bytes per Data Value
Byte Count Range
1 to 5 (word specified)
Num. digits
1 to 3 (byte specified)
2 to 6 (word specified)
Num. digits + 1
2 to 4 (byte specified)
Error details
D0
S1
S0
S0
S2
S2
or
exceeds that of the
D0
D1
Examples
12345: 5 bytes
67: 2 bytes
-12345: 6 bytes
-67: 3 bytes
Q00J/
Q00/
QnH
Q01
––
––
S1
––
––
––
––
––
––
SP.FWRITE
*2
)
QnPH QnPRH
QnU
LCPU
––
––
––
––
––
––
635
1
2
3
4
4
6
7
8

Advertisement

Table of Contents
loading

Table of Contents