Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 675

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

Advertisement

Operation error
Error code
Description
(SD0)
3401H
Data in the device specified by (s) is out of the range, 0 to 99999999.
Precautions
When SM705 (Number of conversion digits selection) is on, the operation result is stored in (d) for the effective number of
digits. Therefore, when the DBCDDA(P) instruction is executed successively and the operation result for each execution is
stored in the same device, a part of the previous operation result may not be overwritten by the succeeding result and can
remain in (d).
[Example] Executing the DBCDDA(P) instruction when (s) is "91234056H" and then executing another DBCDDA(P) instruction when (s) is "00001234H"
(1)
(s)+1
b31 b28
∙∙∙
b27 b24
∙∙∙
b23 b20
∙∙∙
9
1
2
(2)
(s)+1
b31 b28
∙∙∙
b27 b24
∙∙∙
b23 b20
∙∙∙
0
0
0
(1) "91234056" is converted into a string.
(2) "1234" is converted into a string.
(3) A part of the previous conversion result remains in (d)+3.
To avoid this, create a program to clear the entire data storage areas (d)+0 to (d)+3 before executing the DBCDDA(P)
instruction.
(4)
(s)+1
b31 b28
∙∙∙
b27 b24
∙∙∙
b23 b20
∙∙∙
9
1
2
(6)
(s)+1
b31 b28
∙∙∙
b27 b24
∙∙∙
b23 b20
∙∙∙
0
0
0
(4) "91234056" is converted into a string.
(5) (d)+0 to (d)+3 are cleared.
(6) "1234" is converted into a string.
(s)
b19 b16
∙∙∙
b15 b12
∙∙∙
b11
∙∙∙
b8
b7
∙∙∙
3
4
0
5
(s)
b19 b16
∙∙∙
b15 b12
∙∙∙
b11
∙∙∙
b8
b7
∙∙∙
0
1
2
3
(s)
b19 b16
∙∙∙
b15 b12
∙∙∙
b11
∙∙∙
b8
b7
∙∙∙
3
4
0
5
(s)
b19 b16
∙∙∙
b15 b12
∙∙∙
b11
∙∙∙
b8
b7
∙∙∙
0
1
2
3
(d)+0
31H (1) 39H (9)
(d)+1
33H (3) 32H (2)
b4
b3
∙∙∙
b0
6
(d)+2
30H (0) 34H (4)
(d)+3
36H (6) 35H (5)
(d)+4
(d)+0
32H (2) 31H (1)
(d)+1
34H (4) 33H (3)
b4
b3
∙∙∙
b0
4
(d)+2
(d)+3
36H (6) 35H (5)
(d)+4
(d)+0
31H (1) 39H (9)
(d)+1
33H (3) 32H (2)
b4
b3
∙∙∙
b0
6
(d)+2
30H (0) 34H (4)
(d)+3
36H (6) 35H (5)
(d)+4
(5)
(d)+0
00H
(d)+1
00H
(d)+2
00H
(d)+3
00H
(d)+4
(d)+0
32H (2) 31H (1)
(d)+1
34H (4) 33H (3)
b4
b3
∙∙∙
b0
4
(d)+2
(d)+3
00H
(d)+4
00H
00H
(3)
00H
00H
00H
00H
00H
00H
00H
00H
00H
00H
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
7
673

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents