Omron CX-PROGRAMMER V8.1 Operation Manual page 214

Function blocks/ structured text
Table of Contents

Advertisement

Function Descriptions
• Example
Message 1
Variables
STRING Message1
STRING Message2
STRING Message3
STRING Result
INSERT: Insert Characters
• Function
Inserts the specified characters into a text string.
• Application
Return_value := INSERT(Source_string, Insert_string, Position);
• Arguments and Return Values
Variable name
Source_string
Insert_string
Position
Return_value
• Example
Message 1
Variables
STRING Message1
STRING Message2
STRING Result
DELETE: Delete Characters
• Function
Deletes the specified number of characters starting from the specified position of the specified text
string.
• Application
Return_value := DEL (Source_string, Number_of_characters, Position);
• Arguments and Return Values
Variable name
Source_string
Number_of_characters
Position
Return_value
Message 2
A
B
C
Result:=CONCAT(Message1,Message2,Message3);
→ "ABCDEFGH" is stored in the Result variable.
Result
Data type
STRING
STRING
INT, UINT
STRING
Message 2
A
B
C
D
Result := INSERT(Message1, Message2, 2);
→ "ABEFGHC" is stored in the Result variable.
Result
Data type
STRING
INT, UINT
INT, UINT
STRING
Message 3
D
E
F
G
A
B
C
D
E
F
Description
Specifies the text string into which to insert char-
acters.
Specifies the text string to be inserted.
Specifies the position at which to insert charac-
ters. The first character is position "1" (e.g., posi-
tion 1 is "A" in message 1 in the following
illustration).
Returns the text string with the characters
inserted.
E
F
G
H
A
B
E
F
G
H
C
Description
Specifies the text string from which to delete
characters.
Specifies the number of characters to delete.
Specifies the position from which to delete
characters. The first character is position "1"
(e.g., position 1 is "A" in message 1 in the fol-
lowing illustration).
Returns the text string with the specified
number of characters deleted.
Appendix C
H
G
H
D
189

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents