FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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.
1. Instruction format
FNC 207
MIDW
P
2. Set data
Operand Type
S
1
D
S
2
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS
S
1
D
S
2
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
S
2
and later, and stored to the position specified by
Command
input
FNC207
MIDW
b15---------------b8b7-----------------b0
S
31H(1)
1
S
+1
33H(3)
1
35H(5)
S
+2
1
S
+3
37H(7)
1
S
+4
00H
1
6th character
Position from the left end in the
3
S
2
character string stored in
Number of characters from the left end
S
+1
6
2
in the character string stored in
and later
Mnemonic
16-bit Instruction
MIDW
7 steps
MIDWP
Head device number storing a character string used in overwriting
Head device number storing character string to be overwritten
Head device number specifying the head position and number of characters to be
overwritten
S
: Head character position to be overwritten
2
S
+1 : Number of characters to be overwritten
2
Digit Specification
S
D
S
1
2
30H(0)
32H(2)
34H(4)
36H(6)
38H(8)
"012345678"
and later
D
S
26 Character String Control – FNC200 to FNC209
26.8 FNC207 – MIDW / Random Replacement of Character Strings
→ For handling of character strings, refer to Section 5.3.
Operation Condition
32-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
T
C D R U \G
V
and later of the character string data stored in
S
2
b15---------------b8b7-----------------b0
1st
D
42H(B)
character
D
+1
44H(D)
46H(F)
D
+2
D
+3
48H(H)
D
+4
00H
b15---------------b8b7-----------------b0
D
42H(B)
1
D
+1
31H(1)
D
+2
33H(3)
D
+3
35H(5)
D
+4
00H
Six characters starting from 3rd
character (overwritten character string)
Mnemonic
Operation Condition
⎯
⎯
Data Type
Character string
16-bit binary
Others
Con-
Real
Charac-
Index
stant
Number
ter String
Z Modify K
H
E
" "
D
Before execution
41H(A)
43H(C)
45H(E)
47H(G)
49H(I)
"ABCDEFGHI"
After execution
41H(A)
30H(0)
32H(2)
34H(4)
49H(I)
"AB012345I"
21
22
23
24
25
Pointer
P
26
S
1
27
and later.
28
1st
character
3rd
character
29
3rd
character
30
635