Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 315

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

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).
b15
∙∙∙
b8
(s)
ASCII 10
9
(s)+1
ASCII 10
7
(s)+2
ASCII 10
5
(s)+3
3
ASCII 10
(s)+4
ASCII 10
1
(s)+5
(1)
ASCII S: ASCII code for sign
0
ASCII 10
: ASCII code for ones place
1
ASCII 10
: ASCII code for the tens place
2
ASCII 10
: ASCII code for the hundreds place
3
ASCII 10
: ASCII code for the thousands place
4
ASCII 10
: ASCII code for the ten-thousands place
5
ASCII 10
: ASCII code for the hundred-thousands place
6
ASCII 10
: ASCII code for the millions place
7
ASCII 10
: ASCII code for the ten-millions place
8
ASCII 10
: ASCII code for billions place
9
ASCII 10
: ASCII code for the billions place
(1): Ignore
(2): Upper 16 bits
(3): Lower 16 bits
Ex.
When the ASCII data, -1234543210 (signed), is specified by (s)
b15
∙∙∙
b8
(s)
31H (1)
(s)+1
33H (3)
(s)+2
35H (5)
(s)+3
33H (3)
(s)+4
31H (1)
(s)+5
• 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".
Operation error
Error code
Description
(SD0/SD8067)
2820H
The device specified by (s) exceeds the corresponding device range.
3401H
The signed data is other than 20H, 2DH.
A value specified by (s) to (s)+2 for each place of the ASCII code is other than "30H" to "39H", "20H", and "00H".
The ASCII data in the device specified by (s) to (s)+5 is out of the valid range (-2147483648 to +2147483647) (when a signed data is
specified).
The ASCII data in the device specified by (s) to (s)+5 is out of the valid range (0 to 4294967295) (when unsigned data is specified).
b7
∙∙∙
b0
ASCII S
ASCII 10
8
ASCII 10
6
4
ASCII 10
ASCII 10
2
ASCII 10
0
b7
∙∙∙
b0
2DH (-)
32H (2)
34H (4)
34H (4)
32H (2)
30H (0)
(d)+1
(d)
b31
∙∙∙
b16 b15
∙∙∙
(2)
(3)
BIN32
(d)+1
(d)
-
1 2 3 4
5 4
3 2 1 0
7.5 Data Conversion Instructions
b0
7 BASIC INSTRUCTIONS
313
7

Hide quick links:

Advertisement

loading