Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 670

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 9999.
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 BCDDA(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 BCDDA(P) instruction when (s) is "9105H" and then executing another BCDDA(P) instruction when (s) is "0007H"
(1)
b15 b12
∙∙∙
b11
(s)
9
(2)
b15 b12
∙∙∙
b11
(s)
0
To avoid this, create a program to clear the entire data storage areas (d)+0 and (d)+1 before executing the BCDDA(P)
instruction.
(4)
b15 b12
∙∙∙
b11
(s)
9
(6)
b15 b12
∙∙∙
b11
(s)
0
7 APPLICATION INSTRUCTIONS
668
7.8 String Processing Instructions
∙∙∙
b8
b7
∙∙∙
b4
b3
∙∙∙
b0
1
0
5
∙∙∙
b8
b7
∙∙∙
b4
b3
∙∙∙
b0
0
0
7
∙∙∙
b8
b7
∙∙∙
b4
b3
∙∙∙
b0
1
0
5
(5)
∙∙∙
b8
b7
∙∙∙
b4
b3
∙∙∙
b0
0
0
7
(d)+0
31H (1) 39H (9)
(d)+1
35H (5) 30H (0)
(d)+2
00H
(d)+0
00H
37H (7)
(d)+1
35H (5) 30H (0)
(d)+2
00H
(d)+0
31H (1) 39H (9)
(d)+1
35H (5) 30H (0)
(d)+2
00H
(d)+0
00H
00H
(d)+1
00H
00H
(d)+2
00H
(d)+0
00H
37H (7)
(d)+1
00H
00H
(d)+2
00H
(1) "9105" is converted into a string.
(2) "7" is converted into a string.
(3) A part of the previous conversion result remains
in (d)+1.
(3)
(4) "9105" is converted into a string.
(5) (d)+0 to (d)+1 are cleared.
(6) "7" is converted into a string.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents