8 APPLICATION INSTRUCTION
8.8 Character String Operation Instruction
451
8
Processing details
• These instructions add a decimal point to the 32-bit binary data in the device specified by (s2) at the location specified by
(s1), convert the data to character string data, and store the converted data in the device areas specified by (d) and later.
• The total number of digits that can be specified by (s1) is 2 to 13.
• The number of digits in the decimal part that can be specified by (s1)+1 is 0 to 10. Note that the number of digits in the
decimal part must be smaller than or equal to the total number of digits minus 3.
• The converted character string data are stored in the device areas specified by (d) and later as shown below.
(1): Total number of digits
(2): Number of digits of decimal part
(3): Sign
(4): "00H" is automatically stored at the end of the character string.
(5): For specifying number of all digits
• As sign data, "20H" (space) is stored if the 32-bit binary data is positive, and "2DH" (-) is stored if the data is negative.
• If the number of digits in the decimal part is set to other than 0, "2EH" (.) is automatically stored at the position before the specified number of digits. If
the number of digits in the decimal part is 0, "2EH" (.) is not stored.
(1): Number of digits of decimal part
(2): Added automatically
• If the specified number of digits in the decimal part is greater than the number of digits of the 32-bit binary data, 0(s) is automatically added and the data
is regarded as "0.
".
(1): Added automatically
• If the total number of digits excluding the sign and the decimal point is greater than the number of digits of the 32-bit binary data, "20H" (space) is stored
between the sign and the numeric value. If the number of digits of the 32-bit binary data is greater, an error occurs.
(1): "20H (SP)" is stored.
(s1)+1
b15
b8 b7
b0
00H
(d)+4
(d)+3
(d)+6
(d)+5
(d)+2
(d)+1
(d)
(d)+4
(d)+3
(d)+2
(d)+1
(d)
(s1)
b15
b8 b7
b0
8
3
.
6 5 4
3 2 1
6
-
5 4 3 2 1
(s2)+1
(s2)
-
(s1)+1
(s1)
2DH (-)
34H (4)
36H (6)
35H (5)
2EH (.)
33H (3)
32H (2)
31H (1)
0000H
b0
b31
When -654.321 is specified in (s2)
b16 b15
(s2)+1
(s2)
.
(1)
(2)
(4)
ASCII code for sign
(3)
BIN32
high-order 16 bits
Low-order 16 bits
ASCII code in "(Value specifying
number of all digits - 1)"th digit
ASCII code in "(Value specifying
number of all digits - 3)"th digit
ASCII code in "(Value specifying
number of all digits - 2)"th digit
ASCII code in "(Value specifying
number of all digits - 5)"th digit
ASCII code in "(Value specifying
number of all digits - 4)"th digit
ASCII code in "(Value specifying
number of all digits - 7)"th digit
ASCII code in "(Value specifying
number of all digits - 6)"th digit
ASCII code in "(Value specifying
number of all digits - 9)"th digit
ASCII code in "(Value specifying
number of all digits - 8)"th digit
ASCII code in "(Value specifying
number of all digits - 11)"th digit
ASCII code in "(Value specifying
number of all digits - 10)"th digit
ASCII code in "(Value specifying
number of all digits - 12)"th digit
(5)
3
10
1 2 3 4 5 . 6 7 8
2 3 4 5 6
8
7
1
(s1)
(s1)+1
BIN32
(1)
(2)
10
13
0 . 0 0 0 0 0 5 4 3 2 1
5 4
3 2 1
(s1)
(s1)+1
BIN32
(1)
2
13
5
-
4 3 2
0
1
5
-
4 3 2 . 1 0
(s1)
(s1)+1
BIN32
(1)
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......