Random Selection From Character Strings, Random Replacement In Character Strings - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Random selection from character strings, random replacement in
character strings
MIDR(P), MIDW(P)
Basic
High
Process
Redundant Universal
performance
MIDR, MIDW
MIDRP, MIDWP
(S1): Character string or head number of the devices where the character string is stored (character string)
(D): Head number of the devices where a character string data obtained as the result of operation will be stored (character string)
(S2): Head number of the devices where the location of the first character and the number of characters will be stored (BIN 16 bits)
 (S2): Position of first character
 (S2) +1: Number of characters
Setting
Internal device
data
Bit
Word
(S1)
(D)
(S2)
Processing details
■MIDR
• Extracts the character string data of (S2)+1 characters, starting from the position designated by (S2), counted from the left
end of the character string data designated by (S1), and stores the extracted data into the area starting from the device
designated by (D).
b15
b8b7
S 1
42
(B)
H
S 1
+1
44
(D)
H
S 1
+2
46
(F)
H
S 1
+3
48
(H)
H
S 1
+4
4A
(J)
H
S 1
+5
00
H
"ABCDEFGHIJK"
S2
5
S2
+1
5
• The NULL code (00H) indicating the end of the character string is automatically added to the end of the character string.
Refer to Page 91 Using character string data for the format of the character string data.
• If the number of characters designated by (S2)+1 is "0", the NULL code (00H) is stored at the start of (D).
LCPU
Command
Command
R, ZR
J\
Bit
b0
41
(A)
H
43
(C)
H
45
(E)
H
Position of the 5th
47
(G)
H
character
S2
49
(I)
H
ASCII code for the 5th character
4B
(K)
H
indicates an instruction symbol MIDR/MIDW.
S1
D
P
S1
D
U\G
Zn
Word
b15
b8b7
D
46
(F)
H
+1
D
48
(H)
H
+2
D
00
H
"EFGHI"
+1
S2
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
S2
S2
Constant
Others
$
b0
45
(E)
H
47
(G)
H
49
(I)
H
7
579

Advertisement

Table of Contents
loading

Table of Contents