
430
7 APPLICATION INSTRUCTION
7.7 Real Number Instruction
Converting character string to single-precision real number
EVAL(P)/DEVAL(P)
These instructions convert the character strings in the device areas specified by (s) and later to single-precision real number,
and store the converted data in the device specified by (d).
The EVAL(P) instructions can also be used as DEVAL(P).
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
*1
T, ST, C cannot be used.
Processing details
• These instructions convert the character strings in the device areas specified by (s) and later to single-precision real
number, and store the converted data in the device specified by (d).
• A specified character string may be in the decimal point format or exponent format. A character string in either format can
be converted into single-precision real number.
• A character string can consist of up to 24 characters. 20H (space) and 30H (0) in a character string are counted as one
character each.
■
Decimal point format
• When the character string specified by (s) is decimal point format, the operation is executed as follows.
Ladder diagram
Structured text
ENO:=EVAL(EN,s,d);
ENO:=EVALP(EN,s,d);
Operand
Description
Range
Data type
Data type (label)
(s)
Character string data to be converted to single-precision
real number or head device number where the character
string data is stored
Character string
Character string
(d)
Head device number storing converted single-precision real
number
Single-precision real number
Single-precision real number
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s)
(d)
(s)
(d)
(s)
(s)+1
(s)+2
(s)+3
(s)+4
b15
b0
b7
b8
00H
(d)
(d)+1
ASCII code for 1st character
ASCII code for 3rd character
ASCII code for 5th character
ASCII code for sign
ASCII code for 2nd character
ASCII code for 4th character
ASCII code for 7th character ASCII code for 6th character
Indicates the end of the character string.
Single-precision real number
(s)
(s)+1
(s)+2
(s)+3
(s)+4
b15
b0
b7
b8
00H
(d)
(d)+1
31H (1)
30H (0)
38H (8)
2DH (-)
2EH (.)
37H (7)
32H (2)
31H (1)
0 7 8 1 2
.
1
-
7
1
-
. 0
8
1 2
Single-precision real number
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......