EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 646

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
644
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
Operation of when SM705 (Number of conversion digits selection) is off
Decimal ASCII data is stored in a fixed number of digits in (d) to (d)+2.
*1 When the value is 0 or positive, 20H (space) is stored. When the value is negative, 2DH (-) is stored.
*2 When the length of the numeric part is 4 digits or less, 20H (space) is stored in ASCII 10
4
.
*3 When the length of the numeric part is 3 digits or less, 20H (space) is stored in ASCII 10
3
.
*4 When the length of the numeric part is 2 digits or less, 20H (space) is stored in ASCII 10
2
.
*5 When the length of the numeric part is 1 digit, 20H (space) is stored in ASCII 10
1
.
Ex.
-12345 is set in (s) when the BINDA(P) instruction is used.
Operation of when SM705 (Number of conversion digits selection) is on
Decimal ASCII data is stored right-justified in (d).
The following figures show an example of a value of (s) and a value stored in (d).
ASCII S: Sign data of ASCII code
*1
ASCII 10
4
: Ten-thousands place of ASCII code
*2
ASCII 10
3
: Thousands place of ASCII code
*3
ASCII 10
2
: Hundreds place of ASCII code
*4
ASCII 10
1
: Tens place of ASCII code
*5
ASCII 10
0
: Ones place of ASCII code
(1): 00H is stored in (d)+3 when SM701 (Number of output characters selection) is off. When it is on, the value in (d)+3 remains unchanged.
Value of (s) Data of (d) to (d)+2 Value of (s) Data of (d) to (d)+2
•0
Positive value (1
digit in numeric
part)
The upper byte of (d) is filled with 00H.
Data in (d)+1 and (d)+2 remains unchanged.
Positive value (2
digits in numeric
part)
Negative value (1
digit in numeric
part)
(d)+1 is filled with 00H.
Data in (d)+2 remains unchanged.
Positive value (5
digits in numeric
part)
Negative value (4
digits in numeric
part)
The upper byte of (d)+2 is filled with 00H. Negative value (5
digits in numeric
part)
(1): (d)+3 is filled with 00H only when SM701
(Number of output characters selection) is off.
ASCII 10
4
: Ten-thousands place of ASCII code
ASCII 10
3
: Thousands place of ASCII code
ASCII 10
2
: Hundreds place of ASCII code
ASCII 10
1
: Tens place of ASCII code
ASCII 10
0
: Ones place of ASCII code
(d)
(d)+1
(d)+2
(d)+3
b15 b0 b7b8
b0b15
(s)
00H
ASCII 10
4
ASCII 10
2
ASCII 10
0
ASCII S
ASCII 10
3
ASCII 10
1
(1)
BIN 16bit
(d)
(d)+1
(d)+2
(d)+3
b15 b0 b7b8
b0b15
(s)
31H (1) 2DH (-)
33H (3) 32H (2)
34H (4)35H (5)
00H
- 1 2345
(d)+1
(d)+2
(d)
b15 b0 b7b8
ASCII 10
0
00H
(d)+1
(d)+2
(d)
b15 b0 b7b8
ASCII 10
0
00H
ASCII 10
1
/ 2DH (-)
(d)+1
(d)+2
(d)
b15 b0 b7b8
ASCII 10
3
ASCII 10
1
00H
ASCII 10
4
/ 2DH (-)
ASCII 10
2
ASCII 10
0
(d)+1
(d)+2
(d)+3
(d)
b15 b0 b7b8
ASCII 10
4
ASCII 10
2
ASCII 10
0
2DH (-)
ASCII 10
3
ASCII 10
1
00H
(1)

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals