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

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

Advertisement

String insertion

INSERT(_E)
High
Basic
Process
performance
Structured ladder/FBD
INSERT_E
EN
ENO
s1
s2
n
The following function(s) can go in the dotted squares.
INSERT, INSERT_E
■Argument
Input/output
argument
Input argument
Output argument
Processing details
■Operation processing
• Inserts the character string input to (s2) to the specified position in the character string input to (s1), and outputs the
operation result from (d).
Specify the start position of the character string to be inserted by the value input to n.
After the insertion of character string (s2) to character string (s1), '00H' that indicates the end of character string (s2) is
ignored. If the character string after insertion has over 255 bytes, the character string up to 255 bytes is output.
Ex.
Value input to n is 4
Input value to
'ABCDE'
High-order byte Low-order byte
1st word
42
(B)
H
2nd word
44
(D)
H
3rd word
00
H
Input value to
'123456'
High-order byte Low-order byte
1st word
32
(2)
H
2nd word
34
(4)
H
3rd word
36
(6)
H
4th word
5 APPLICATION FUNCTIONS
158
5.7 Standard Character String Functions
LCPU
Redundant Universal
ST
ENO:=
INSERT_E
d
Name
Description
EN
Executing condition (TRUE: Execution, FALSE:
Stop)
s1(_IN1)
Input
s2(_IN2)
n(_P)
Start position to be inserted
ENO
Execution result (TRUE: Normal, FALSE: Error)
d
Output
s1
41
(A)
H
43
(C)
H
Start position to
be inserted n:
45
(E)
H
4th character
s2
31
(1)
H
33
(3)
H
35
(5)
H
00
H
(EN, s1, s2, n, d);
d
Output value
'ABC123456DE'
High-order byte Low-order byte
42
(B)
41
(A)
H
H
31
(1)
43
(C)
H
H
33
(3)
32
(2)
H
H
35
(5)
34
(4)
H
H
44
(D)
36
(6)
H
H
00
45
(E)
H
H
Data type
Bit
String (255)
Word (signed)
Bit
String (255)
1st word
2nd word
3rd word
4th word
5th word
6th word

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents