Mitsubishi Electric MELSEC-Q/L Programming Manual page 788

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

• 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
*4 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.
• 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))
• 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)
*5 The number of bytes for each data value is calculated as shown below.
Sign of data value
Positive
Negative
Operation error
• 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
Error details
code
4004
The device that cannot be specified has been specified.
4100
Values specified in control data (D0) 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 (S1).
The attribute of the file name (S1) is "read only".
The drive specified by drive designation device (S0) contains the 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 (S0) 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.
If the instruction accesses a file which has been accessed by another
function
If the instruction writes data into an SD memory card with the write protect
switch enabled (write inhibited)
4101
The value specified in "No. of request write data" (S2) is out of the setting
range, or exceeds the device range specified in ((S2)+1) or the subsequent
devices.
The range of the device specified in (D0) or (D1) exceeds that of the
corresponding device.
7 APPLICATION INSTRUCTIONS
786
7.19 Other Instructions
*4
+ 1 + total bytes of all data values on line
Bytes per data value
Num. digits
Num. digits + 1
*5
)
Byte count range
1 to 5 (word specified)
1 to 3 (byte specified)
2 to 6 (word specified)
2 to 4 (byte specified)
Q00J/
QnH
Q00/
Q01
Examples
12345: 5 bytes
67: 2 bytes
-12345: 6 bytes
-67: 3 bytes
QnPH
QnPRH
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents