Mitsubishi Electric MELSEC-Q/L Programming Manual page 65

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

• The character string data after conversion is output from output variable (d) in the following manner.
The number of digits is fixed respectively for the integer part, fractional part, and exponent part. (Integer part: 1 digit, fractional
part: 5 digits, exponent part: 2 digits)
'20H' (space), '2EH' (.) and '45H' (E) are automatically stored in the 2nd, 4th and 10th bytes, respectively.
Integer part (1 digit)
s
-12.3456
Single-precision real type
'20H' (space) is stored in 'Sign data' (integer part) when the input value is positive; '2DH' (-) is stored when negative.
Fractional part is rounded to 5 decimal places.
s
-12.345678
Single-precision real type
If the number of significant figures is less, '30H' (0) is stored to fractional part.
s
-12.34
Single-precision real type
'2BH' (+) is stored in the 'Sign data' (exponent part) if the exponent is positive; '2DH' (-) is stored when negative.
'30H' (0) is stored to tens place in the exponent part if exponent part has only one digit.
s
-12.3456
Single-precision real type
• When SM701 (signal for switching the number of output characters) is OFF, "00H" is stored to the end of the character
string (7th word).
• Rounding error may occur when specifying the input value to (s) by programming tool. For precautions when setting an
input value using a programming tool, refer to the following.
 MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
d
All together 13 digits
Fractional part (5 digits)Exponent part (2 digits)
-
1
.
2
3
4
5
6 E + 0 1
45
H
2E
(.)
H
20
(space)
H
d
All together 13 digits
7
-
1
.
2
3
4
5
6 6
7 8 E + 0 1
Fractional part (5 digits)
Rounded off.
d
All together 13 digits
-
1
.
2
3
4
0
0 E + 0 1
30
H
Fractional part (5 digits)
d
All together 13 digits
Exponent part (2 digits)
-
1
.
2
3
4
5
6 E + 0 1
(E)
(0)
30
(0)
H
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
63

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents