EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 468

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
466
6 BASIC INSTRUCTIONS
6.6 Data Conversion Instructions
Processing details
These instructions convert the single-precision real number data stored in the device specified by (s1) to the BCD floating
point format based on the number of decimal part digits stored in the device specified by (s2), and store the converted data
in the device number specified by (d) and later.
For the sign in (d) and the exponent sign in (d)+3, 0 is set for positive and 1 is set for negative.
For the BCD exponent in (d)+4, a value between 0 and 38 is stored.
The number of decimal part digits of the single-precision real number data in the device specified by (s1) is stored in the
device specified by (S2). The example in the above figure shows the following.
Six-digit BCD data, determined by rounding off the seventh digit, is stored in (d)+1 and (d)+2.
A value of 0 to 7 can be set for the number of decimal part digits in the device specified by (s2).
When an input value is set using the engineering tool, a rounding error may occur. Refer to the following for the precautions
on setting input values using the engineering tool.
Page 49 Precautions
Operation error
Error code
(SD0)
Description
3401H The number of decimal part digits in the device specified by (s2) is out of the range from 0 to 7.
3402H The value set to a device or label in (s1) is -0, a subnormal number, NaN (not a number), or .
0
4270H
0325H
1
3
(s1)+1 (s1)
(s1)+1 (s1)
(s2)
273.254
3
3254270H
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(d)
(d)+1
(d)+2
(d)+3
(d)+4
(s2)
Single-precision real number
Number of digits
in the decimal part
Sign
BCD (7 digits)
Sign of exponent
BCD exponent
Single-precision real number
BCD floating-point format
3.25427
(s2)=3
(s1)+1 (s1)
(s2)
3
(d)
(d)+1
(d)+2
(d)+3
(d)+4
.1 23456 789
0
1234570H
1
3
1234570
123456789
Rounded off.

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals