554
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
• The following program converts the BIN 16-bit data stored at D10 when X0 is turned ON in accordance with the digit
designation of D0 and D1, and stores the result from D20 to D23.
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The total number of digits specified by (S1) is outside the following ranges:
• When the STR instruction is used: 2 to 8
• When the DSTR instruction is used: 2 to 13
The number of digits for a part of the decimal fraction specified by (S) +1 is
outside the following ranges:
• When the STR instruction is used: 0 to 5
• When the DSTR instruction is used: 0 to 10
The relationship between the total number of digits specified by (S1) and the
number of digits in the decimal fraction specified by (S1) +1 is not as follows:
• Total number of digits -3 Number of digits in the decimal fraction
The number of digits specified by (S1) is smaller than the number of digits of
the BIN data + 2 specified by (S2)
((Number of digits of (S1) < Number of digits of the BIN data at (S2) without a
sign + number of digits of a sign (+ or -) + number of digits of decimal point
(.))
4101 The range of the devices that store the character string specified in (D)
exceeds the range of the corresponding device.
[Ladder Mode]
[List Mode]
[Operation]
Sets the data.
Sets the total number of digits.
Sets the number of digits in decimal fraction.
D21
D22
D23
20
H
(space)31
H
(1)
32
H
(2)36
H
(6)
b15 b8b7 b0
37
H
(7)
(2)
2E
H
(.)
D20
00
H
32
H
12672D10
7
1
D0
D1
1267.2