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

22.6

Deleting Character String

DELETE(_E)
These functions delete an arbitrary range of a character string and output the result.
Ladder diagram
[Without EN/ENO]
s
d
n1
n2
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s
Input
n1
Specification of number of characters to be deleted
n2
Specification of head character position of a character string to be
deleted
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d
Output
Processing details
■Operation processing
• These functions delete the data for the specified number of characters from an arbitrary position of a character string input
to (s) and output the remaining character strings from (d).
• The value input to (n1) specifies the number of characters to be deleted.
• The value input to (n2) specifies the number of the head character position of a character string to be deleted.
Ex.
When the value input to (n1) and (n2) is 5
(s)
"ABCDEF12345"
High-order byte Low-order byte
1st word
42H (B)
41H (A)
2nd word
44H (D)
43H (C)
3rd word
46H (F)
45H (E)
4th word
32H (2)
31H (1)
5th word
34H (4)
33H (3)
6th word
00H
35H (5)
• A value input to (s) is the STRING type data value and within the range from 0 to 255 byte(s).
• A value input to (n1) is the INT type data value and within the range from 0 to 255. (However, the value must be within the
number of characters of the character string to be input to (s).)
• A value input to (n2) is the INT type data value and within the range from 1 to 255. (However, the value must be within the
number of characters of the character string to be input to (s).)
[With EN/ENO]
EN
ENO
s
d
n1
n2
"ABCD45"
High-order byte Low-order byte
42H (B)
Head character
44H (D)
position of a
35H (5)
character string to
be deleted
: 5th
n2
character
Number of characters
to be deleted
: 5
n1
Structured text
[Without EN/ENO]
d:=DELETE(s,n1,n2);
[With EN/ENO]
d:=DELETE_E(EN,ENO,s,n1,n2);
Type
Input variable
Input variable
Input variable
Input variable
Output variable
Output variable
(d)
41H (A)
1st word
43H (C)
2nd word
34H (4)
3rd word
00H
4th word
22 CHARACTER STRING FUNCTIONS
Data type
BOOL
STRING(255)
INT
INT
BOOL
STRING(255)
22.6 Deleting Character String
22
823

Advertisement

Table of Contents
loading

Table of Contents