Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 768

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

Advertisement

Processing details
• These instructions convert the BCD floating-point format data stored in the device specified by (s1) and later to single-
precision real number data in accordance with the number of decimal places stored in the device specified by (s2), and
store the converted data in the device number specified by (d) and later.
(s1)
Sign
(s1)+1
BCD (7 digits)
(s1)+2
(s1)+3
Sign of exponent
(s1)+4
BCD exponent (0 to 38)
Number of digits in the
(s2)
decimal part (0 to 7)
(s1): Sign (Positive: 0, Negative: 1)
(s1)+1, (s1)+2: BCD (7 digits)
(s1)+3: Sign of exponent (Positive: 0, Negative: 1)
(s1)+4: BCD exponent (0 to 38)
(s2): Number of digits in the decimal part (0 to 7)
(d)+1, (d): Single-precision real number
• For the sign in (s1) and exponent sign in (s1)+3, 0 is set for positive and 1 is set for negative.
• A value of 0 to 38 can be set for the BCD exponent in (s1)+4.
• A value of 0 to 7 can be set for the number of decimal part digits in the device specified by (s2).
Ex.
When 6 is specified in (s2)
(s1)
1
(s1)+1
5423H
(s1)+2
0321H
(s1)+3
0
(s1)+4
2
(s2)
Operation error
Error code
Description
(SD0)
3401H
The value set to (s1) as sign data is not 0 or 1.
A value other than 0 to 9 exists at any digit of data set to (s1)+1 and (s1)+2.
The value set to (s1)+3 as sign data of exponent is not 0 or 1.
The exponent data set to (s1)+4 is out of the range, 0 to 38.
The value set to (s2) as the number of digits in the decimal part is out of the range, 0 to 7.
3403H
The data output from (d) exceeds the following range. (An overflow has occurred.)
|(d)|<2
7 APPLICATION INSTRUCTIONS
766
7.9 Real Number Instructions
3215423H
6
128
(d)+1
(d)
(d)+1
(d)
-
3
. 2 1 5 4 2 3 E + 2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents