Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 669

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

Advertisement

■Operation of when SM705 (Number of conversion digits selection) is off
Decimal ASCII data is stored in a fixed number of digits (4 digits) in (d) to (d)+1.
b15
∙∙∙
b12
b11
∙∙∙
b8
b7
∙∙∙
b4
(s)
3
2
1
× 10
× 10
× 10
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
(1): 00H is stored in (d)+2 when SM701 (Number of output characters selection) is off. When it is on, the value in (d)+3 remains unchanged.
• 20H (space) is stored for the leading "0"s at the left of the effective number of digits of the operation result stored in the
device specified by (d). (Zero-suppression) For "0050", "00" becomes 20H (space) and "50" is the effective number of
digits.
Ex.
When 9105 is specified in (s)
b15
∙∙∙
b12
b11
∙∙∙
b8
b7
∙∙∙
b4
(s)
9
1
0
■Operation of when SM705 (Number of conversion digits selection) is on
Decimal ASCII data for the number of digits (up to 4 digits) without the leftmost "0" in the effective digits is stored in (d).
The following figures show an example of a value of (s) and a value stored in (d).
Value of (s)
Data of (d) to (d)+1
• 0H to 9H
• The upper byte of (d) is filled with 00H.
• (d)+1 and later remain unchanged.
b15
(d)
(d)+1
• 100H to 999H
• The upper byte of (d)+1 are filled with 00H.
b15
(d)
(d)+1
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
• When the number of digits is less than the maximum number of digits (4 digits), 00H is stored in the end of the string
regardless of the status (on/off) of SM701 (Number of output characters selection). If the end of the string is the lower byte,
00H is also stored in the upper byte.
• When the number of digits is equal to the maximum number of digits (4 digits), 00H is stored in (d)+2 when SM701 is off.
(d)+2 remains unchanged if SM701 is on.
b15
b3
∙∙∙
b0
(d)
(d)+1
0
(d)+2
× 10
b15
b3
∙∙∙
b0
(d)
5
(d)+1
(d)+2
∙∙∙
b8
b7
∙∙∙
0
00H
ASCII 10
∙∙∙
b8
b7
∙∙∙
1
2
ASCII 10
ASCII 10
0
00H
ASCII 10
∙∙∙
b8
b7
∙∙∙
2
3
ASCII 10
ASCII 10
0
1
ASCII 10
ASCII 10
00H
(1)
∙∙∙
b8
b7
∙∙∙
31H (1)
39H (9)
35H (5)
30H (0)
00H
Value of (s)
Data of (d) to (d)+1
• 10H to 99H
• (d)+1 is filled with 00H.
(d)
b0
(d)+1
• 1000H to 9999H
• (1): (d)+2 is filled with 00H when SM701 (Number of
output characters selection) is off. (d)+2 remains
b0
unchanged if SM701 is on.
(d)
(d)+1
(d)+2
b0
b0
b15
∙∙∙
b8
b7
∙∙∙
0
ASCII 10
ASCII 10
00H
b15
∙∙∙
b8
b7
∙∙∙
2
ASCII 10
ASCII 10
0
ASCII 10
ASCII 10
00H
(1)
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
7
b0
1
b0
3
1
667

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents