Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 646

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

Advertisement

■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.
b15
∙∙∙
(s)
BIN 16bit
ASCII S: Sign data of ASCII code
4
ASCII 10
: Ten-thousands place of ASCII code
3
ASCII 10
: Thousands place of ASCII code
2
ASCII 10
: Hundreds place of ASCII code
1
ASCII 10
: Tens place of ASCII code
0
ASCII 10
: 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.
*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
*3 When the length of the numeric part is 3 digits or less, 20H (space) is stored in ASCII 10
*4 When the length of the numeric part is 2 digits or less, 20H (space) is stored in ASCII 10
*5 When the length of the numeric part is 1 digit, 20H (space) is stored in ASCII 10
Ex.
-12345 is set in (s) when the BINDA(P) instruction is used.
b15
∙∙∙
(s)
-
1
2
3
■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).
Value of (s)
Data of (d) to (d)+2
• 0
• Positive value (1
digit in numeric
part)
(d)
(d)+1
(d)+2
• Positive value (5
digits in numeric
part)
(d)
• Negative value (4
(d)+1
digits in numeric
(d)+2
part)
4
ASCII 10
: Ten-thousands place of ASCII code
3
ASCII 10
: Thousands place of ASCII code
2
ASCII 10
: Hundreds place of ASCII code
1
ASCII 10
: Tens place of ASCII code
0
ASCII 10
: Ones place of ASCII code
7 APPLICATION INSTRUCTIONS
644
7.8 String Processing Instructions
b15
(d)
ASCII 10
b0
(d)+1
ASCII 10
(d)+2
ASCII 10
(d)+3
*1
*2
*3
*4
*5
b15
(d)
b0
(d)+1
4
5
(d)+2
(d)+3
• The upper byte of (d) is filled with 00H.
• Data in (d)+1 and (d)+2 remains unchanged.
b15
∙∙∙
b8
b7
00H
• The upper byte of (d)+2 is filled with 00H.
b15
∙∙∙
b8
b7
3
ASCII 10
ASCII 10
1
ASCII 10
00H
∙∙∙
b8
b7
4
ASCII S
2
ASCII 10
0
ASCII 10
00H
(1)
∙∙∙
b8
b7
31H (1)
33H (3)
35H (5)
00H
Value of (s)
• Positive value (2
digits in numeric
part)
∙∙∙
b0
• Negative value (1
0
ASCII 10
digit in numeric
part)
• Negative value (5
digits in numeric
∙∙∙
b0
part)
4
/ 2DH (-)
2
ASCII 10
0
ASCII 10
∙∙∙
b0
3
1
4
.
3
.
2
.
1
.
∙∙∙
b0
2DH (-)
32H (2)
34H (4)
Data of (d) to (d)+2
• (d)+1 is filled with 00H.
• Data in (d)+2 remains unchanged.
b15
∙∙∙
0
(d)
ASCII 10
(d)+1
(d)+2
• (1): (d)+3 is filled with 00H only when SM701
(Number of output characters selection) is off.
b15
∙∙∙
4
(d)
ASCII 10
2
(d)+1
ASCII 10
0
(d)+2
ASCII 10
(d)+3
(1)
b8
b7
∙∙∙
b0
1
ASCII 10
/ 2DH (-)
00H
b8
b7
∙∙∙
b0
2DH (-)
3
ASCII 10
1
ASCII 10
00H

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents