633
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
26 Character String Control – FNC200 to FNC209
26.8 FNC207 – MIDW / Random Replacement of Character Strings
21
FNC160-FNC169
Real Time Clock
Control
22
FNC170-FNC179
External Device
23
FNC180
Alternate
Instructions
24
FNC181-FNC189
Others
25
FNC190-FNC199
Block Data
Operation
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
26.8 FNC207 – MIDW / Random Replacement of Character Strings
Outline
This instruction replaces the characters in arbitrary positions inside designated character string with a specified
character string.
→ For handling of character strings, refer to Section 5.3.
1. Instruction format
2. Set data
3. Applicable devices
Explanation of function and operation
1. 16-bit operation (MIDW and MIDWP)
“ +1” characters are extracted from the left end (that is, the head) of the character string data stored in
and later, and stored to the position specified by and later of the character string data stored in and later.
Operand Type Description Data Type
Head device number storing a character string used in overwriting
Character string
Head device number storing character string to be overwritten
Head device number specifying the head position and number of characters to be
overwritten
: Head character position to be overwritten
+1 : Number of characters to be overwritten
16-bit binary
Oper-
and
Type
Bit Devices Word Devices Others
System User Digit Specification System User
Special
Unit
Index
Con-
stant
Real
Number
Charac-
ter String
Pointer
XYMTCSD
.b KnX KnY KnM KnS T C D R
U\G
V Z Modify K H E "
"P
P
FNC 207
MIDW
Mnemonic Operation Condition
16-bit Instruction
7 steps
MIDW
MIDWP
Mnemonic Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
⎯
⎯
S
1
D
S
2
S
2
S
2
S
1
D
S
2
S
2
S
1
S
2
D
48H(H) 47H(G)
35H(5) 34H(4)
31H(1) 30H(0)
32H(2)
31H(1) 30H(0)
33H(3) 32H(2)
35H(5) 34H(4)
FNC207
MIDW
S
1
D
S
2
+1
+2
+4
+3
b15---------------b8b7-----------------b0
“012345678”
D
D
+1
+2
b15---------------b8b7-----------------b0
D
S
1
S
1
S
1
S
1
S
1
37H(7) 36H(6)
00H 38H(8)
42H(B) 41H(A)
44H(D) 43H(C)
46H(F) 45H(E)
“ABCDEFGHI”
+1
S
2
S
2
6
3
Position from the left end in the
character string stored in and later
Number of characters from the left end
in the character string stored in
and later
D
+3
+4
D
00H 49H(I)
Before execution
D
D
+1
+2
b15---------------b8b7-----------------b0
D
42H(B) 41H(A)
33H(3)
“AB012345I”
D
+3
+4
D
00H 49H(I)
After execution
6th character
3rd
character
Six characters starting from 3rd
character
(
overwritten character strin
g)
3rd
character
1st
character
Command
input
D
S
1
1st
character