Mitsubishi Electronics FX3G User Manual

Page of 964
633
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 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
-F
NC1
69
R
eal
 T
ime C
lock
 
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate 
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
 
Op
er
ation
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta 
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
Operation
30
FNC2
70-
FNC276
Ex
-Dev
ice
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
X Y M T C S D .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
S
+1
+2
+4
+3
b15---------------b8b7-----------------b0
“012345678”
+1
+2
b15---------------b8b7-----------------b0
S
S
S
S
S
37H(7)
36H(6)
00H
38H(8)
42H(B)
41H(A)
44H(D)
43H(C)
46H(F)
45H(E)
“ABCDEFGHI”
+1
S
S
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
+3
+4
00H
49H(I)
Before execution
+1
+2
b15---------------b8b7-----------------b0
42H(B)
41H(A)
33H(3)
“AB012345I”
+3
+4
00H
49H(I)
After execution
6th character
3rd
character
Six characters starting from 3rd
character (overwritten character string)
3rd
character
1st
character
Command
input
S
1
 
1st
character