6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
443
6
■
Setting method of (s) for when SM705 (Number of conversion digits selection) is on
Set decimal ASCII data with a desired number of digits (including 00H (NULL code)) in (s). Note that 00H (NULL code) is not
required to be set if the integral part has the maximum number of digits (10 digits).
The following table lists the setting method of (s).
• The ASCII data in the device specified by (s) to (s)+5 is within the range from -2147483648 to 2147483647 for the
DDABIN(P) instruction, and it is within the range from 0 to 4294967295 for the DDABIN(P)_U instruction.
• Set 2DH (-) to lower byte of (s)+0 as sign data when the ASCII data is negative. Set an ASCII code of the uppermost digit
instead of setting sign data when the ASCII data is 0 or positive.
• A value from 30H to 39H can be set in each place of ASCII code.
• If the value is positive and the numeric part has 10 digits, the data stored in (s)+5 or later is ignored. If the value is negative
and the numeric part has 10 digits, the data stored in the upper byte of (s)+5 or later is ignored.
• If a value 20H is set in each place of ASCII code, the value is processed as 30H. If a value 00H is set, the value is
processed as the end of the decimal ASCII data.
• In the following cases, "0" is stored in (d).
Value to be set in
(s)
Data of (s) to (s)+5
Value to be set in
(s)
Data of (s) to (s)+5
• 0
• Positive value (1
digit in numeric
part)
• Set 00H in the upper byte of (s).
• The data of (s)+1 or later is ignored.
• Positive value (2
digits in numeric
part)
• Negative value (1
digit in numeric
part)
• Set 00H in the lower byte of (s)+1.
• The data of the upper byte of (s)+1 or later is
ignored.
• Positive value (9
digits in numeric
part)
• Negative value (8
digits in numeric
part)
• Set 00H in the upper byte of (s)+4.
• (s)+5 is ignored.
• Negative value (9
digits in numeric
part)
• Set 00H in the lower byte of (s)+5.
• The data of the upper byte of (s)+5 is ignored.
• Positive value (10
digits in numeric
part)
• (s)+5 is ignored. Since the number of digits is the
maximum, 00H is not required to be set.
• Negative value (10
digits in numeric
part)
• The data of the upper byte of (s)+5 is ignored.
Since the number of digits is the maximum, 00H is
not required to be set.
ASCII 10
0
: Ones place of ASCII code
ASCII 10
1
: Tens place of ASCII code
ASCII 10
9
: Billions place of ASCII code
• The first character is 00H (NULL).
• The first character is 2DH (-) and the second character is 00H (NULL).
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
(s)
b15
b0
∙∙∙
∙∙∙
b7
b8
00H
ASCII 10
0
(s)+1
(s)+2
(s)+3
(s)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
1
/ 2DH (-)
00H
ASCII 10
0
(s)+4
(s)+5
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
(s)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
7
ASCII 10
5
ASCII 10
8
/ 2DH (-)
ASCII 10
6
ASCII 10
3
ASCII 10
4
ASCII 10
1
ASCII 10
2
00H
ASCII 10
0
(s)+1
(s)+2
(s)+3
(s)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
7
ASCII 10
5
2DH (-)
ASCII 10
8
ASCII 10
6
ASCII 10
3
ASCII 10
4
ASCII 10
1
ASCII 10
2
00H
ASCII 10
0
(s)+4
(s)+5
(s)+1
(s)+2
(s)+3
(s)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
7
ASCII 10
5
ASCII 10
9
ASCII 10
8
ASCII 10
6
ASCII 10
3
ASCII 10
4
ASCII 10
1
ASCII 10
2
ASCII 10
0
(s)+4
(s)+5
(s)+1
(s)+2
(s)+3
(s)
b15
b0
∙∙∙
∙∙∙
b7
b8
ASCII 10
9
ASCII 10
7
ASCII 10
5
2DH (-)
ASCII 10
8
ASCII 10
6
ASCII 10
3
ASCII 10
4
ASCII 10
1
ASCII 10
2
ASCII 10
0
(s)+4
(s)+5
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: ......