Mitsubishi Electric MELSEC FX3U Programming Manual page 717

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
2. 32-bit operation (DDABIN and DDABINP)
1) Data stored in
binary 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
is stored in [
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
and "2DH (-)" is set when the data to be converted is negative.
4) An ASCII code for each digit is within the range 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
"20H (space)", or "00H (NULL)" (error code: K6706)
• When the numeric range of
16-bit operation
32-bit operation
• When
to
S
to
+5 expressed in decimal ASCII codes (30H to 39H) is converted into 32-bit
S
S
+1,
D
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
S
S
+1,
] as follows:
D
D
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
+5 is ignored.
S
), "20H (space)" is set when the data to be converted is positive,
S
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
to
S
S
Setting range
−32768 to 32767
−2,147,483,648 to 2,147,483,647
+2(5) exceeds the device range (error code: K6706)
S
29 Data Table Operation – FNC250 to FNC269
29.5 FNC260 – DABIN / Decimal ASCII to BIN Conversion
].
b0
Sign data
b31
b0
D
+1
D
-1234543210
to
+5 is from -2,147,483,648 to +2,147,483,647.
S
Description
to
+2(5) is any value other than "30H" to "39H",
S
S
+2(5) is outside the following range (error code: K6706)
+1
D
D
b16
b15
High-order 16 bits
Low-order 16 bits
32-bit data
21
22
b0
23
24
25
26
27
28
29
30
715

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents