Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 647

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

Advertisement

• When the number of operation digits is less than the maximum number of digits (sign + 5 digits), 00H is stored in the end of
the string regardless of the status (on/off) of SM701 (Number of output characters selection). If the end of the string is the
lower byte, 00H is also stored in the upper byte.
• When the number of operation digits is equal to the maximum number of digits (a sign + 5 digits), 00H is stored in (d)+3
when SM701 is off. (d)+3 remains unchanged if SM701 is on.
Operation error
There is no operation error.
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 BINDA(P)(_U) 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 BINDA(P) instruction when (s) is "-12345" and then executing another BINDA(P) instruction when (s) is "-67"
(1)
b15
∙∙∙
b0
(s)
-12345
(2)
b15
∙∙∙
b0
(s)
-67
To avoid this, create a program to clear the entire data storage areas (d)+0 to (d)+2 before executing the BINDA(P)(_U)
instruction.
(4)
b15
∙∙∙
b0
(s)
-12345
(6)
b15
∙∙∙
b0
(s)
-67
(d)+0
31H (1) 2DH (-)
(d)+1
33H (3) 32H (2)
(d)+2
35H (5) 34H (4)
(d)+3
00H
(d)+0
36H (6) 2DH (-)
(d)+1
00H
37H (7)
(d)+2
35H (5) 34H (4)
(d)+3
00H
(d)+0
31H (1) 2DH (-)
(d)+1
33H (3) 32H (2)
(d)+2
35H (5) 34H (4)
(d)+3
00H
(5)
(d)+0
00H
00H
(d)+1
00H
00H
(d)+2
00H
00H
(d)+3
00H
(d)+0
36H (6) 2DH (-)
(d)+1
00H
37H (7)
(d)+2
00H
00H
(d)+3
00H
(1) "-12345" is converted into a string.
(2) "-67" is converted into a string.
(3) A part of the previous conversion result remains in (d)+2.
(3)
(4) "-12345" is converted into a string.
(5) (d)+0 to (d)+2 are cleared.
(6) "-67" is converted into a string.
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
7
645

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents