String Deletion - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

String deletion

DELETE(_E)
High
Basic
Process
performance
Structured ladder/FBD
DELETE_E
EN
ENO
s
n1
n2
The following function(s) can go in the dotted squares.
DELETE, DELETE_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• Deletes the specified number of characters from the specified position in the character string input to (s), and outputs the
remaining character string from (d).
The number of characters to be deleted is specified by the value input to n1.
The start position to be deleted in the character string is specified by the value input to n2.
Ex.
Values input to n1 and n2 are 5
s
'ABCDEF12345'
High-order byte Low-order byte
1st word
42
(B)
H
2nd word
44
(D)
H
3rd word
46
(F)
H
4th word
32
(2)
H
5th word
34
(4)
H
6th word
00
H
• The value to be input to (s) is string type data within the range from 0 to 255 bytes.
• The value to be input to n1 is word (signed) type data within the range from 0 to 255.
(The input value must not exceed the number of characters of character string input to (s).)
• The value to be input to n2 is word (signed) type data within the range from 1 to 255.
(The input value must not exceed the number of characters of character string input to (s).)
5 APPLICATION FUNCTIONS
160
5.7 Standard Character String Functions
LCPU
Redundant Universal
ST
ENO:=
DELETE_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s(_IN)
Input
n1(_L)
Number of characters to be deleted
n2(_P)
Start position to be deleted
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
41
(A)
H
43
(C)
H
45
(E)
Start position to
H
be deleted n2:
31
(1)
H
5th character
33
(3)
H
35
(5)
H
Number of characters to be deleted n1: 5 characters
(EN, s, n1, n2, d);
d
'ABCD45'
High-order byte Low-order byte
42
(B)
41
(A)
H
H
44
(D)
43
(C)
H
H
35
(5)
34
(4)
H
H
00
H
Data type
Bit
String (255)
Word (signed)
Word (signed)
Bit
String (255)
1st word
2nd word
3rd word
4th word

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents