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
∙∙∙
∙∙∙
b7
b8
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
∙∙∙
∙∙∙
b7
b8
b0
∙∙∙
b15
(s)
31H (1)
2DH (-)
33H (3)
32H (2)
34H (4)
35H (5)
00H
-
1
2
3
4
5
(d)+1
(d)+2
(d)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
0
00H
(d)+1
(d)+2
(d)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
0
00H
ASCII 10
1
/ 2DH (-)
(d)+1
(d)+2
(d)
b15
b0
∙∙∙
∙∙∙
b7
b8
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
∙∙∙
∙∙∙
b7
b8
ASCII 10
4
ASCII 10
2
ASCII 10
0
2DH (-)
ASCII 10
3
ASCII 10
1
00H
(1)
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......