5 Applied Functions
5.1 Type Conversion Functions
85
FXCPU Structured Programming Manual
(Application Functions)
1
Outline
2
Function List
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
2) The string data obtained by conversion is output to a device specified in as follows:
a) The number of digits is fixed respectively for the integer part, decimal part and exponent part as
follows:
Integer part: 1, decimal part: 5, exponent part: 2
"2EH (.)" is automatically stored in the 3rd byte, and "45H (E)" is automatically stored in the 9th byte.
b) In "Sign data (integer part)", "20H (space)" is stored when the input value is positive, and "2DH (-)" is
stored when the input value is negative.
c) The 6th and later digits of the decimal part are rounded.
d) "30H (0)" is stored in the decimal part when the number of significant figures is small.
e) In "Sign data (exponent part)", "2BH (+)" is stored when the input value is positive, and "2DH (-)" is
stored when the input value is negative.
f) "30H (0)" is stored in the tens place of the exponent part when the exponent part consists of 1 digit.
3) "00H" is automatically stored at the end (7th word) of the character string.
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data and 32-bit data in structured programs, you cannot specify 16-bit
devices directly, different from simple projects. Use labels when handling string data and 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
d
-12.3456
Float (single precision)
data
E- 1.23456 +01
Integer part
(1 digit)
Total number of digits (12 digits)
Decimal part
(5 digits)
"2EH (.)" is stored.
"45H (E)" is stored.
Exponent part
(2 digits)
-12.345678
Float (single precision)
data
E
-1.2345 786
7
+01
Total number of digits (12 digits)
Number of digits
of decimal part (5)
These digits are rounded.
-12.34
Float (single precision)
data
E-1.23400 +01
"30H (0)" is stored.
Number of digits of decimal part (5)
Total number of digits (12 digits)
-12.3456
Float (single precision)
data
E-1.23456 +01
Total number of digits (12 digits)
"30H (0)" is stored.
Number of digits of exponent part (2)