448
8 APPLICATION INSTRUCTION
8.8 Character String Operation Instruction
Processing details
• These instructions add a decimal point to the 16-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 8.
• The number of digits in the decimal part that can be specified by (s1)+1 is 0 to 5. 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): "0000H" 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 16-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 16-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 16-bit binary data, "20H" (space) is stored
between the sign and the numeric value. If the number of digits of the 16-bit binary data is greater, an error occurs.
(1): "20H (SP)" is stored.
• The value "00H" is automatically stored at the end of the converted character string.
• When the number of all digits is even, "0000H" is stored in the device after the last character. When the number of all digits is odd, "00H" is stored in the
upper byte (8 bits) of the device storing the final character.
(s1)+1
b15
b8 b7
b0
0000H
.
(d)+4
(d)+3
(d)+2
(d)+1
(d)
(s2)
(s1)
(1)
(2)
(4)
ASCII code for sign
(5)
BIN16
(3)
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
1 2 3 4
2
6
1 2 . 3 4
(s1)
BIN16
(1)
(2)
(s1)+1
1 2
3
6
0 . 0 1 2
(s1)
(s1)+1
BIN16
(1)
- 1 2 3
1
8
1 2 . 3
-
(s1)
(s1)+1
BIN16
(1)
Содержание MELSEC iQ-F FX5
Страница 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Страница 2: ......
Страница 17: ...15 CONTENTS ...
Страница 24: ...22 MEMO ...
Страница 25: ...23 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW 2 PRECAUTIONS ON PROGRAMMING ...
Страница 126: ...124 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 132: ...130 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 140: ...138 6 SEQUENCE INSTRUCTIONS 6 3 Output Instructions Operation error There is no operation error ...
Страница 191: ...7 BASIC INSTRUCTIONS 7 2 Arithmetic Operation Instructions 189 7 Operation error There is no operation error ...
Страница 202: ...200 7 BASIC INSTRUCTIONS 7 2 Arithmetic Operation Instructions Operation error There is no operation error ...
Страница 278: ...276 7 BASIC INSTRUCTIONS 7 4 Bit Processing Instructions Operation error There is no operation error ...
Страница 280: ...278 7 BASIC INSTRUCTIONS 7 4 Bit Processing Instructions Operation error There is no operation error ...
Страница 915: ...18 TYPE CONVERSION FUNCTIONS 18 13 Converting DWORD to WORD 913 18 Operation error There is no operation error ...
Страница 917: ...18 TYPE CONVERSION FUNCTIONS 18 14 Converting DWORD to INT 915 18 Operation error There is no operation error ...
Страница 932: ...930 18 TYPE CONVERSION FUNCTIONS 18 26 Converting DINT to WORD Operation error There is no operation error ...
Страница 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Страница 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Страница 1107: ...I 1105 MEMO ...
Страница 1111: ......