Mitsubishi Electric FX3G SERIES Programming Manual page 679

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
2. 32-bit operation (DDABIN and DDABINP)
1)
Data stored in
data, and stored in [
Command
input
FNC260
DDABINP
b15
+0
S
ASCII code for 1,000,000,000's digit
+1
ASCII code for 10,000,000's digit
+2
ASCII code for 100,000's digit
+3
ASCII code for 1000's digit
+4
ASCII code for 10's digit
+5
For example, when
stored in [
D
b15
+0
S
+1
+2
+3
+4
+5
2)
The numeric range of data stored in
The high-order byte of
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".
Related instructions
Instruction
ASCI(FNC 82)
HEX(FNC 83)
STR(FNC200)
VAL(FNC201)
BINDA(FNC261)
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When the sign data stored in
• When an ASCII code for each digit stored in
(space)", or "00H (NULL)" (error code: K6706)
• When the numeric range of
16-bit operation
32-bit operation
• When
S
to
S
to
S
+5 expressed in decimal ASCII codes (30H to 39H) is converted into 32-bit binary
D
+1,
D
].
S
D
b8 b7
ASCII code for 100,000,000's digit
ASCII code for 1,000,000's digit
ASCII code for 10000's digit
ASCII code for 100's digit
(Ignored)
ASCII code for 1's digit
to
+5 store ASCII codes expressing "-1,234,543,210", 32-bit binary data is
S
S
+1,
D
] as follows:
b8 b7
31H(1)
2DH(-)
33H(3)
32H(2)
35H(5)
34H(4)
33H(3)
34H(4)
31H(1)
32H(2)
(Ignored)
30H(0)
S
S
+5 is ignored.
S
), "20H (space)" is set when the data to be converted is positive, and "2DH
Converts hexadecimal codes into ASCII codes.
Converts ASCII codes into hexadecimal codes.
Converts binary data into a character string (ASCII codes).
Converts a character string (ASCII codes) into binary data.
Converts binary data into decimal ASCII codes (30H to 39H).
is any value other than "20H (space)" or "2DH (-)" (error code: K6706)
S
S
to
S
+2(5) is outside the following range (error code: K6706)
Setting range
−32768 to 32767
−2,147,483,648 to 2,147,483,647
S
+2(5) exceeds the device range (error code: K6706)
29 Data Table Operation – FNC250 to FNC269
29.5 FNC260 – DABIN / Decimal ASCII to BIN Conversion
b0
Sign data
b0
D
+1
-1234543210
to
S
+5 is from -2,147,483,648 to +2,147,483,647.
Description
S
to
S
+2(5) is any value other than "30H" to "39H", "20H
+1
D
D
b31
b16
b15
High-order 16 bits
Low-order 16 bits
32-bit data
D
21
22
b0
23
24
25
26
27
28
29
30
677

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents