600
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
26 Character String Control – FNC200 to FNC209
26.1 FNC200 – STR / BIN to Character String Conversion
- When the number of all digits stored in
excluding the sign and decimal
point is larger than the number of digits
of 16-bit binary data stored in
,
"space" (20H) is stored between the
sign and the numeric value.
When the number of all digits stored in
excluding the sign and decimal point is smaller than the number of digits of 16-bit binary data
stored in
, an error is caused.
- "00H" indicating the end of a character string is automatically stored at the end of a converted character
string.
When the number of all digits is even, "00H" is stored in the next device of the device storing the final
character.
When the number of all digits is odd, "00H" is stored in the high-order byte (8 bits) of the device storing
the final character.
2. 32-bit operation (DSTR and DSTRP)
1) All digits (specified by
) of 32-bit binary data stored in [
+1,
] are converted into ASCII
codes while the decimal point is added to the position specified by the device storing the number of digits
of the decimal part (
+1), and stored in
and later.
2) Set the number of all digits
in the range from 2 to 13.
3) Set the number of digits of the decimal part
+1 in the range from 0 to 10.
Make sure to satisfy "Number of digits of decimal part <= (Number of all digits -3)".
4) 32-bit binary data to be converted stored in [
+1,
] should be within the range from -
2,147,483,648 to +2,147,483,647.
1 2
3
"20H" (space) is
stored in each digit.
8
1
-123
-
Number of
all digits
Number of
digits of
decimal part
16-bit
binary data
S
1
S
2
S
1
S
2
S
1
S
2
S
2
S
1
D
Command
input
FNC200
DSTR
S
2
S
1
D
8
3
4
3 2 1
S
1
+0
+1
b15
+0
+2
b8 b7
b0
D
+1
36H(6)
34H(4)
33H(3)
2DH(-)
35H(5)
2EH(.)
5
6
-
+1
-654321
S
2
S
2
32-bit
binary data
+4
+3
31H(1)
00H
32H(2)
+0
Sign
S
1
+0
+1
b15
+2
+3
+5
b8 b7
b0
D
S
2
High-order 16 bits
+1
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 - 5)"th digit
ASCII code in "(Value
specifying number of all
digits - 7)"th digit
ASCII code
indicating sign
ASCII code in "(Value
specifying number of all
digits - 2)"th digit
ASCII code in "(Value
specifying number of all
digits - 4)"th digit
ASCII code in "(Value
specifying number of all
digits - 6)"th digit
00H
Low-order 16 bits
ASCII code in "(Value
specifying number of all
digits - 10)"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
+4
b31
b16 b15
b0
S
2
+1
S
2
32-bit binary data
Number of all
digits
Number of digits
of decimal part
00H is automatically stored at the
end of a character string.
For number of
all digits
For value
stored in
S
1
00H is automatically stored at the
end of a character string.
For number of
all digits
=8
S
1
S
1
S
1
S
2
S
2