
272
6 BASIC INSTRUCTIONS
6.5 Data Conversion Instructions
Converting decimal ASCII to 32-bit binary data
DDABIN(P)(_U)
These instructions convert the decimal ASCII data in the device numbers specified by (s) and later to 32-bit binary data, and
store the converted data in the device specified by (d).
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
*1
T, ST, C cannot be used.
Processing details
• These instructions convert the decimal ASCII data in the device numbers specified by (s) and later to 32-bit binary data,
and store the converted data in the device specified by (d).
Ex.
When the ASCII data, -1234543210 (signed), is specified by (s)
• The ASCII data that can be specified by (s) to (s)+5 is -2147483648 to +2147483647 for signed data, and 0 to 429496729
for unsigned data. The data stored in the high-order byte of (s)+5 is ignored.
• As signed data, "20H" is stored if the ASCII data is positive, and "2DH" is stored if the data is negative. (If a value other than
"20H" and "2DH" is set, the data will be processed as positive data.) (DABIN(P))
• A value "30H" to "39H" can be set in the each place of the ASCII code.
• If a value "20H" or "00H" is set, the value will be processed as "30H".
Ladder diagram
Structured text
ENO:=DDABIN(EN,s,d);
ENO:=DDABINP(EN,s,d);
ENO:=DDABIN_U(EN,s,d);
ENO:=DDABINP_U(EN,s,d);
Operand
Description
Range
Data type
Data type (label)
(s)
ASCII data or the head device where the ASCII
data is stored
Character string
ANYSTRING_SINGLE
(d)
DDABIN(P)
Head device for storing the converted data
32-bit signed binary
ANY32_S
DDABIN(P)_
U
32-bit unsigned binary
ANY32_U
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s)
(d)
(s)
(d)
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
b15
b0
···
···
b7
b8
b0
···
···
b31
b16 b15
(d)+1
(d)
ASCII code for the billions place
ASCII code for the ten-millions place
ASCII code for the hundred-thousands place
ASCII code for sign
ASCII code for billions place
ASCII code for the millions place
ASCII code for the thousands place
ASCII code for the tens place
(Ignore.)
ASCII code for the ten-thousands place
ASCII code for the hundreds place
ASCII code for ones place
32-bit binary data
Upper 16 bits
Lower 16 bits
(s)
(s)+1
(s)+2
(s)+3
(s)+4
(s)+5
b15
b0
···
···
b7
b8
(d)+1
(d)
31H (1)
33H (3)
35H (5)
2DH (-)
32H (2)
34H (4)
33H (3)
31H (1)
34H (4)
32H (2)
30H (0)
1 2 3 4
3 2 1 0
5 4
-
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......