Mitsubishi MELSEC-Q/L Programming Manual page 497

Table of Contents

Advertisement

Function
(1) This instruction deletes n2 characters data in the devices specified by
specified by n1.
Device position where character string data to be deleted: n1
Number of characters to be deleted: n2
b15
b8b7
b0
D
42
(B)
41
(A)
H
H
D
+1
44
(D)
43
(C)
H
H
D
+2
46
(F)
45
(E)
H
H
D
+3
48
(H)
47
(G)
H
H
D
+4
4A
(J)
49
(I)
H
H
D
+5
4C
(L)
4B
(K)
H
H
D
+6
00
H
D
+7
31
(1)
30
(0)
H
H
D
+8
33
(3)
32
(2)
H
H
D
+9
35
(5)
34
(4)
H
H
(2) This instruction stores the NULL code (00
character string data when the character string data specified by
(3) This instruction stores the NULL code (00
the character string data specified by
(4) This instruction shifts the characters stored in the devices that position after the deleted devices by n2 characters to the
right, and then stores the NULL code (00
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an error code is stored into
SD0.
Error
code
The number of characters in the devices specified by
16383.
The value specified by n1 is not within the range. (1
The value specified by n1 exceeds the number of characters in the
4100
devices specified by
The value specified in n2 exceeds the number of characters between
n1 and the last character in
The value specified in n2 is negative.
Program Example
(1) The following program deletes the fourth to the seventh characters in the character string data stored in the devices D0
and up, when M0 is turned on.
[Ladder Mode]
5
Shifts the n1+n2th characters and up,
which are stored after the devices whose characters
were deleted, by n2 characters to the right
b15
b8b7
D
42
(B)
41
(A)
H
H
Deletes n2 characters from
D
+1
the n1th device and up
D
+2
D
+3
48
(H)
H
D
+4
4A
(J)
49
(I)
H
H
D
+5
4C
(L)
4B
(K)
H
H
D
+6
00
H
D
+7
31
(1)
30
(0)
H
H
D
+8
33
(3)
32
(2)
H
H
n1th character
D
+9
35
(5)
34
(4)
H
H
to be deleted
) into the device (one word) that positions after the last device that stores the
H
) into the last device (high 8 bits) that stores the character string data when
H
is odd, after the characters are deleted.
D
) into the empty device.
H
Error details
.
D
.
D
[List Mode]
Step
starting from the device (insert position)
D
3
Stores the NULL code (00
H
the empty devices after shifting.
b0
b15
b8b7
D
42
(B)
41
(A)
H
H
D
+1
49
(I)
48
(H)
H
H
D
+2
4B
(K)
4A
(J)
H
H
D
+3
00
4C
(L)
H
H
D
+4
00
H
D
+5
00
H
D
+6
00
H
D
+7
31
(1)
30
(0)
H
H
D
+8
33
(3)
32
(2)
H
H
D
+9
35
(5)
34
(4)
H
H
D
The characters of the devices other than
the shifted devices do not change.
is even, after the characters are deleted.
D
Q00J/
Q00/
QnH
Q01
exceeds
D
n1
16383)
––
––
Device
Instruction
STRDEL, STRDELP
) into
b0
QnPH QnPRH
QnU
––
––
1
2
3
4
4
6
7
8
LCPU
495

Advertisement

Table of Contents
loading

Table of Contents