Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 445

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

Advertisement

■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).
Value to be set in
Data of (s) to (s)+5
(s)
• 0
• Set 00H in the upper byte of (s).
• Positive value (1
• The data of (s)+1 or later is ignored.
digit in numeric
b15
part)
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
• Positive value (9
• Set 00H in the upper byte of (s)+4.
digits in numeric
• (s)+5 is ignored.
part)
b15
• Negative value (8
(s)
digits in numeric
(s)+1
part)
(s)+2
(s)+3
(s)+4
(s)+5
• Positive value (10
• (s)+5 is ignored. Since the number of digits is the
digits in numeric
maximum, 00H is not required to be set.
part)
b15
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
0
ASCII 10
: Ones place of ASCII code
1
ASCII 10
: Tens place of ASCII code
9
ASCII 10
: Billions place of ASCII code
• 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).
• The first character is 00H (NULL).
• The first character is 2DH (-) and the second character is 00H (NULL).
∙∙∙
b8
b7
∙∙∙
0
00H
ASCII 10
∙∙∙
b8
b7
∙∙∙
7
8
ASCII 10
ASCII 10
/ 2DH (-)
5
6
ASCII 10
ASCII 10
3
4
ASCII 10
ASCII 10
1
2
ASCII 10
ASCII 10
0
00H
ASCII 10
∙∙∙
b8
b7
∙∙∙
8
9
ASCII 10
ASCII 10
6
7
ASCII 10
ASCII 10
4
5
ASCII 10
ASCII 10
2
3
ASCII 10
ASCII 10
0
1
ASCII 10
ASCII 10
Value to be set in
Data of (s) to (s)+5
(s)
• Positive value (2
• Set 00H in the lower byte of (s)+1.
digits in numeric
• The data of the upper byte of (s)+1 or later is
part)
ignored.
b0
• Negative value (1
digit in numeric
(s)
part)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
• Negative value (9
• Set 00H in the lower byte of (s)+5.
digits in numeric
• The data of the upper byte of (s)+5 is ignored.
part)
b0
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
• Negative value (10
• The data of the upper byte of (s)+5 is ignored.
digits in numeric
Since the number of digits is the maximum, 00H is
part)
not required to be set.
b0
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
b15
∙∙∙
b8
b7
∙∙∙
0
1
ASCII 10
ASCII 10
/ 2DH (-)
00H
b15
∙∙∙
b8
b7
∙∙∙
8
ASCII 10
2DH (-)
6
ASCII 10
ASCII 10
4
ASCII 10
ASCII 10
2
ASCII 10
ASCII 10
0
ASCII 10
ASCII 10
00H
b15
∙∙∙
b8
b7
∙∙∙
9
ASCII 10
2DH (-)
7
ASCII 10
ASCII 10
5
ASCII 10
ASCII 10
3
ASCII 10
ASCII 10
1
ASCII 10
ASCII 10
ASCII 10
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
b0
6
b0
7
5
3
1
b0
8
6
4
2
0
443

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents