602
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 relationship between the number of all digits stored in
and the number of digits of the
decimal part stored in
+1 does not satisfy the following (error code: K6706)
Number of all digits -3
≥
Number of digits of decimal part
• When the number of all digits stored in
including the digit for sign and the digit for decimal point is
smaller than the number of digits of the binary data stored in [
+1,
] (error code: K6706)
• When the devices
and later storing a character string exceeds the corresponding device range
(error code: K6706)
Program example
In the program below, the 16-bit binary data stored in D10 is converted into a character string in accordance
with the digit specification by D0 and D1 when X000 is set to ON, and then stored in D20 to D23.
S
1
S
1
S
1
S
2
S
2
D
X000
Data to be converted is set.
FNC 12
MOVP
K12672
D10
END
K6
D0
K0
D1
FNC200
STRP
D0
D10
D20
FNC 12
MOVP
FNC 12
MOVP
The number of all digits is set.
The number of digits of the decimal
part is set.
12672
6
0
b15
b8 b7
b0
D20
D21
D22
31H(1)
36H(6)
00H
20H(space)
34H(2)
32H(2)
37H(7)
D23
D10
D0
D1
Number of all digits
Number of digits of
decimal part
16-bit binary data
"
12672"