Conversion From Character String To Floating-Point Data - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Conversion from character string to floating-point data

EVAL(P)
Ver.
High
Basic
Process
performance
• Basic model QCPU: The serial number (first five digits) is "04122" or later.
EVAL
EVALP
(S): Character string data to be converted to 32-bit floating decimal point real number data or head number of the devices where the character string data is
stored (character string)
(D): Head number of the devices where the converted 32-bit floating decimal point real number data will be stored (real number)
Setting
Internal device
data
Bit
(S)
(D)
*1 Applicable for the Universal model QCPU, LCPU.
Processing details
• Converts character string stored in the area starting from the device number designated by (S) to 32-bit floating point type
real number, and stores result at device designated by (D).
• The designated character string can be converted to 32-bit floating point type real number data either in the decimal point
format or the exponent format.
b15
ASCII code for the 1st character
S
ASCII code for the 3rd character
S
+1
+2 ASCII code for the 5th character
S
ASCII code for the 7th character
S
+3
S
+4
Indicates the end
of character string
• When using decimal point format
b15
S
31
(1)
H
S
+1
30
(0)
H
S
+2
38
(8)
H
S
+3
32
(2)
H
S
+4
-
1
• When using exponent format
b15
S
20
(space)
H
S
+1
2E
(.)
H
S
+2
32
(2)
H
S
+3
31
(1)
H
S
+4
2B
(+)
H
S
+5
30
(0)
H
S
+6
1
1
. 3 2 0 1 E + 1 0
7 APPLICATION INSTRUCTIONS
568
7.11 Character String Processing Instructions
LCPU
Redundant Universal
Command
Command
R, ZR
Word
b8 b7
b0
ASCII code for the sign
ASCII code for the 2nd character
ASCII code for the 4th character
ASCII code for the 6th character
00
H
b8b7
b0
2D
(-)
H
2E
(.)
H
37
(7)
H
31
(1)
H
00
H
0 7 8 1 2
.
b8
b7
b0
2D
(-)
H
31
(1)
H
33
(3)
H
30
(0)
H
45
(E)
H
31
(1)
H
00
H
J\
U\G
Bit
Word
+1
D
D
32-bit floating-point
real number
D
+1
D
-1 . 0 8 12
7
32-bit floating-point
real number
D
D
+1
-1. 320 1E + 10
32-bit floating-point
real number
EVAL
S
D
EVALP
S
D
Zn
Constant
$
*1
Others

Advertisement

Table of Contents
loading

Table of Contents