EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Random Selection from Character Strings, Random Replacement in Character Strings

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 APPLICATION INSTRUCTIONS
7.11 Character String Processing Instructions
579
7
Random selection from character strings, random replacement in
character strings
MIDR(P), MIDW(P)
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).
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).
(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
data
Internal device R, ZR J\ U\G Zn Constant
$
Others
Bit Word Bit Word
(S1)  
(D) 
(S2) 
Process
High
performance
Redundant
Universal
LCPU
Basic
Command
Command
P
S1
D
S2
S1
D
S2
MIDR, MIDW
MIDRP, MIDWP
indicates an instruction symbol MIDR/MIDW.
+1
41
H
(A)42
H
(B)
43
H
(C)44
H
(D)
+1
45
H
(E)46
H
(F)
47
H
(G)48
H
(H)
45
H
(E)46
H
(F)
47
H
(G)48
H
(H)
49
H
(I)4A
H
(J)
4B
H
(K)00
H
+2
+3
+4
+5
+2
49
H
(I)
00
H
Position of the 5th
character
"ABCDEFGHIJK"
"EFGHI"
ASCII code for the 5th character +1
5
5
+1
S
1
S
1
S
1
S
1
S
1
S
1
S2
D
D
D
b15 b8b7 b0
b15 b8b7 b0
S2
S2
S2

Table of Contents

Related product manuals