Fnc260 - Dabin / Decimal Ascii To Bin Conversion - Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
29.5
FNC260 – DABIN / Decimal ASCII to BIN Conversion
Outline
This instruction converts numeric data expressed in decimal ASCII codes (30H to 39H) into binary data.
1. Instruction format
FNC 260
D
DABIN
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
S
D
Explanation of function and operation
1. 16-bit operation (DABIN and DABINP)
1)
Data stored in
data, and stored in
Command
input
b15
ASCII code for 10000's digit
+0
S
+1
ASCII code for 100's digit
ASCII code for 1's digit
+2
For example, when
D
as follows:
b15
+0
S
+1
+2
2)
The numeric range of data stored in
3)
As "sign data" (low-order byte of
(-)" is set when the data to be converted is negative.
4)
An ASCII code for each digit is ranging from 30H to 39H.
5)
When an ASCII code for each digit is "20H (space)" or "00H (NULL)", it is handled as "30H".
676
Mnemonic
16-bit Instruction
DABIN
P
5 steps
DABINP
Head device number storing data (ASCII codes) to be converted into binary data
Device number storing conversion result
Digit Specification
S
to
S
+2 expressed in decimal ASCII codes (30H to 39H) is converted into 16-bit binary
D
.
FNC260
S
D
DABINP
b8 b7
ASCII code for 1000's digit
ASCII code for 10's digit
S
to
S
+2 store ASCII codes expressing "-25108", 16-bit binary data is stored in
b8 b7
32H(2)
2DH(-)
31H(1)
35H(5)
38H(8)
30H(0)
S
S
29 Data Table Operation – FNC250 to FNC269
29.5 FNC260 – DABIN / Decimal ASCII to BIN Conversion
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
T
C D R U \G
b0
Sign data
b0
b15
-25108
D
to
S
+2 is from -32768 to +32767.
), "20H (space)" is set when the data to be converted is positive, and "2DH
Mnemonic
Operation Condition
32-bit Instruction
DDABIN
9 steps
DDABINP
Con-
Real
Index
stant
Number
V
Z Modify K
H
E
b15
b0
D
16-bit binary data
b0
Continuous
Operation
Pulse (Single)
Operation
Data Type
Character string
16- or 32-bit binary
Others
Charac-
Pointer
ter String
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents