Fnc201 - Val / Character String To Bin Conversion - Mitsubishi FX3U Series Programming Manual

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
/FX
Series Programmable Controllers
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
26.2
FNC201 – VAL / Character String to BIN Conversion
Outline
This instruction converts a character string (ASCII codes) into binary data.
On the other hand, EVAL (FNC117) instruction converts a character string (ASCII codes) into floating point
data.
1. Instruction format
FNC 201
D
P
VAL
2. Set data
Operand Type
S
D
1
D
2
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
1
D
2
Explanation of function and operation
1. 16-bit operation (VAL and VALP)
1) A character string stored in
of the binary data acquired by conversion is stored in
stored in
D
1
In converting a character string into binary data, the data from
handled as a character string in units of byte.
Command
input
FNC201
VAL
b15
ASCII code of 1st character
+0
S
ASCII code of 3rd character
+1
ASCII code of 5th character
+2
ASCII code of 7th character
+3
+4
It indicates the end of character string.
Mnemonic
16-bit Instruction
7 steps VAL
VALP
Head device number storing a character string to be converted into binary data
Head device number storing the number of all digits of the binary data acquired
by conversion
Head device number storing the binary data acquired by conversion
Digit Specification
and later is converted into 16-bit binary data. The number of all digits
S
+1, and the binary data is stored in
S
D
D
1
b8 b7
ASCII code indicating sign
ASCII code of 2nd character
ASCII code of 4th character
ASCII code of 6th character
00H
26 Character String Control – FNC200 to FNC209
26.2 FNC201 – VAL / Character String to BIN Conversion
→ For character strings, refer to Section 5.3.
→ For EVAL (FNC117) instruction, refer to Section 18.5.
Operation Condition
32-bit Instruction
Continuous
13 steps
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Index
Unit
V Z Modify K H
, the number of digits of the decimal part is
D
1
.
D
2
S
2
b0
-
Mnemonic
Operation Condition
Continuous
DVAL
Operation
Pulse (Single)
DVALP
Operation
Data Type
Character string
16-bit binary
16- or 32-bit binary
Others
Con-
Real
Charac-
stant
Number
ter String
E
" "
to a device number storing "00H" is
Number of all
+0
D
digits
1
Number of digits
+1
of decimal part
Integer value in
D
2
which decimal
point is ignored
16-bit binary data
21
22
23
24
25
Pointer
26
P
27
28
29
30
603

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3uc seriesMelsec-f

Table of Contents