Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 455

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 for the maximum number of digits (4 digits).
The following table lists the setting method of (s).
Value to be set
Data of (s) to (s)+1
in (s)
• 0 to 9
• Set 00H in the upper byte of (s)+0.
• The data of (s)+1 or later is ignored.
b15
(s)
(s)+1
• 100 to 999
• Set 00H in the upper byte of (s)+1.
• The data of (s)+2 or later is ignored.
b15
(s)
ASCII 10
(s)+1
3
: Thousands place of ASCII code
ASCII 10
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)+1 is within the range from 0 to 9999.
• The data of (s)+2 or later is ignored.
• A value from 30H to 39H can be set in each place of ASCII code.
• 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.
Operation error
Error code
Description
(SD0)
3401H
Invalid data that cannot be converted are input in (s).
• A character other than 0 to 9 exists in the data.
∙∙∙
b8
b7
∙∙∙
b0
0
00H
ASCII 10
∙∙∙
b8
b7
∙∙∙
b0
1
2
ASCII 10
0
00H
ASCII 10
Value to be set
Data of (s) to (s)+1
in (s)
• 10 to 99
• Set 00H in the lower byte of (s)+1.
• The data of the upper byte of (s)+1 or later is ignored.
b15
(s)
(s)+1
• 1000 to 9999
• The data of (s)+2 or later is ignored.
b15
(s)
(s)+1
6.6 Data Conversion Instructions
∙∙∙
b8
b7
∙∙∙
0
1
ASCII 10
ASCII 10
00H
∙∙∙
b8
b7
∙∙∙
2
3
ASCII 10
ASCII 10
0
1
ASCII 10
ASCII 10
6 BASIC INSTRUCTIONS
b0
b0
6
453

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents