Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 457

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

Advertisement

Processing details
• These instructions convert the decimal ASCII data stored in the device areas specified by (s) and later to BCD 8-digit data,
and store the converted data in the device number specified by (d).
• The setting method of the decimal ASCII data to be set in (s) depends on the status of SM705 (Number of conversion digits
selection).
*1
Status of SM705
Setting method of (s)
OFF
Set (s) with a fixed number of digits (8 digits).
ON
Set (s) with a desired number of digits (maximum: 8
digits).
*1 For the firmware version of the CPU module supporting SM705, refer to the following.
 MELSEC iQ-R CPU Module User's Manual (Application)
A CPU module which does not support SM705 operates in the same way as SM705 is off even if it is turned on.
■Setting method of (s) for when SM705 (Number of conversion digits selection) is off
• Set decimal ASCII data with 8 digits (fixed) in (s) to (s)+3.
b15
∙∙∙
(s)
ASCII 10
6
(s)+1
ASCII 10
4
(s)+2
ASCII 10
2
0
(s)+3
ASCII 10
7
ASCII 10
: Ten-millions place of ASCII code
6
ASCII 10
: Millions place of ASCII code
5
ASCII 10
: Hundred-thousands place 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
• The ASCII data in the device specified by (s) to (s)+3 is within the range from 0 to 99999999.
• The data of (s)+4 or later is ignored.
• A value from 30H to 39H can be set in each place of ASCII code.
• If a value 20H or 00H is set in each place of ASCII code, the value will be processed as 30H.
Ex.
When 87654321 is specified in (s)
b15
∙∙∙
(s)
37H (7)
(s)+1
35H (5)
(s)+2
33H (3)
(s)+3
31H (1)
b8
b7
∙∙∙
b0
ASCII 10
7
ASCII 10
5
ASCII 10
3
1
ASCII 10
b8
b7
∙∙∙
b0
38H (8)
36H (6)
34H (4)
32H (2)
Reference
Page 455 Setting method of (s) for when SM705 (Number of
conversion digits selection) is off
Page 456 Setting method of (s) for when SM705 (Number of
conversion digits selection) is on
(d)+1
b31
∙∙∙
b28
b27
∙∙∙
b24
b23
∙∙∙
b20
b19
∙∙∙
b16
b15
×10
×10
×10
×10
×10
7
6
5
4
b31
∙∙∙
b28
b27
∙∙∙
b24
b23
∙∙∙
b20
b19
∙∙∙
b16
b15
8
7
6
5
(d)+1
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
(d)
∙∙∙
b12
b11
∙∙∙
b8
b7
∙∙∙
b4
b3
∙∙∙
b0
×10
×10
×10
3
2
1
0
∙∙∙
b12
b11
∙∙∙
b8
b7
∙∙∙
b4
b3
∙∙∙
b0
4
3
2
1
(d)
455
6

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents