Fnc117 - Eval / Character String To Floating Point Conversion - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
18.5
FNC117 – EVAL / Character String to Floating Point Conversion
Outline
This instruction converts a character string (ASCII codes) into binary floating point data.
On the other hand, the VAL (FNC201) instruction converts a character string (ASCII codes) into binary data.
1. Instruction format
FNC 117
D
P
EVAL
2. Set data
Operand Type
S
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
D
Explanation of function and operation
1. 32-bit operation (EVAL and EVALP)
A character string stored in
].
D
Command
input
FNC117
DEVAL
A specified character string may be in the decimal point format or exponent format. A character string in
either format can be converted into binary floating point data.
b15
ASCII code for 1st character
S
+1
ASCII code for 3rd character
S
+2
ASCII code for 5th character
S
+3
ASCII code for 7th character
S
+4
S
Mnemonic
16-bit Instruction
Head device number storing character string data to be converted into binary
floating point data
Head device number storing converted binary floating point data
Digit Specification
and later is converted into binary floating point, and stored to [
S
S
D
b8 b7
ASCII code for sign
ASCII code for 2nd character
ASCII code for 4th character
ASCII code for 6th character
Indicates the end of the character string.
18 Floating Point – FNC110 to FNC139
18.5 FNC117 – EVAL / Character String to Floating Point Conversion
→ For a character string, refer to Section 5.3.
→ For handling of floating point, refer to Subsection 5.1.3.
→ For VAL (FNC201) instruction, refer to Subsection 26.2.
Operation Condition
32-bit Instruction
9 steps
Description
Word Devices
Special
System User
Index
Unit
V Z Modify K H
b0
00H
Mnemonic
Operation Condition
Continuous
DEVAL
Operation
Pulse (Single)
DEVALP
Operation
Data Type
Character string
Real number (binary)
Others
Con-
Real
Charac-
Pointer
stant
Number
ter String
E
" "
D
+1
D
D
Binary floating point
(real number)
517
11
12
13
14
15
P
16
17
+1,
18
19
20

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents