Deleting Character String - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Deleting character string

STRDEL(P)
These instructions delete (n) characters starting from the (s)th character (deletion start position) from the start of the character
string data specified by (d).
Ladder diagram
(d)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(d)
Head device number storing a character string having characters
to be deleted
(s)
Deletion start position
(n)
Number of characters to be deleted
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB
(d)
(s)
(n)
*1 T, ST, C cannot be used.
Processing details
• These instructions delete (n) characters starting from the (s)th character (deletion start position) from the start of the
character string data specified by (d).
b15
b8
b7
(d)
42H (B)
(d)+1
44H (D)
(d)+2
46H (F)
(d)+3
48H (H)
(d)+4
4AH (J)
(d)+5
4CH (L)
(d)+6
0000H
(d)+7
31H (1)
(d)+8
33H (3)
(d)+9
35H (5)
(s)
3
• When the number of characters after deletion, (d), is even, a NULL code (00H) is stored in the device after the last device
storing the character string.
• When the number of characters after deletion, (d), is odd, a NULL code (00H) is stored in the last device (upper 8 bits) of
the character string.
• The character string after the deleted character string is shifted by (n) characters, a NULL code (00H) is stored in vacant
devices.
7 APPLICATION INSTRUCTION
402
7.6 Character string operation instruction
(s)
(n)
Word
U\G T, ST,
T, ST, C, D,
C, LC
W, SD, SW, R
*1
b0
Number of
41H (A)
characters to be
43H (C)
deleted (n): 5
45H (E)
47H (G)
49H (I)
4BH (K)
30H (0)
32H (2)
Deletion start
34H (4)
position (s):
3rd character
Structured text
ENO:=STRDEL(EN,s,n,d);
ENO:=STRDELP(EN,s,n,d);
Range
1 to 16383
0 to 16384 - (n1)
Double word Indirect
U\G
Z
LC
The character string data of the deleted character
and later is shifted rightward by 5 characters.
b15
b8
b7
(d)
42H (B)
41H (A)
(d)+1
(d)+2
(d)+3
48H (H)
(d)+4
4AH (J)
49H (I)
(d)+5
4CH (L)
4BH (K)
(d)+6
0000H
(d)+7
31H (1)
30H (0)
(d)+8
33H (3)
32H (2)
(d)+9
35H (5)
34H (4)
Data type
Data type (label)
Character string
Character string
16-bit unsigned binary
ANY16
16-bit unsigned binary
ANY16
Constant
specification
LZ
K, H
After shifting, "00H" is stored
in the vacant device.
b0
b15
(d)
42H (B)
(d)+1
49H (I)
(d)+2
4BH (K)
(d)+3
00H
(d)+4
(d)+5
(d)+6
(d)+7
31H (1)
(d)+8
33H (3)
(d)+9
35H (5)
The character string data of (d)+7
and later does not change.
Others
E
$
b8
b7
b0
41H (A)
48H (H)
4AH (J)
4CH (L)
0000H
0000H
0000H
30H (0)
32H (2)
34H (4)

Advertisement

Table of Contents
loading

Table of Contents