5.8 Standard Character String Functions
191
FXCPU Structured Programming Manual
(Application Functions)
1
Outline
2
Function List
3
Function
Construction
4
How to Read
Explanation of
Functions
5
Applied
Functions
6
Standard
Function Blocks
A
Correspondence
between Devices
and Addresses
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling character string data in structured programs, you cannot specify 16-bit devices directly,
different from simple projects. Use labels when handling character string data.
Use global labels when specifying labels.
Error
An operation error occurs in the following cases. The error flag M8067 turns ON, and D8067 stores the error
code.
1) When "00H" does not exist in the corresponding device range after the device specified in
(Error code: K6706)
2) When the number of characters of a character string stored in devices specified in is 32768 or more
(Error code: K6706)
3) When the number of devices after the device number specified in is smaller than the number of
devices required for storing the character string remaining after deletion of specified number of
characters
(Error code: K6706)
4) When the value specified in is negative
(Error code: K6706)
Program example
In this program, specified number of characters are deleted from an arbitrary position of a character string
stored in devices specified in , and the character string remaining after deletion is output to devices
specified in .
1) Function without EN/ENO(DELETE)
2) Function with EN/ENO(DELETE_E)
[Structured ladder]
[ST]
[Structured ladder]
[ST]
s
s
d
n2
s
d
DELETE
g_string1="ABCDEF12345"
g_int1="4"
_IN
_L
g_string2="AB12345"
g_int2="3"
_P
g_string2:=DELETE(g_string1,g_int1,g_int2);
DELETE_E
EN ENO
g_string2
g_bool1
g_string1 _IN
_L
g_bool3
g_int2
g_int1
_P
g_bool3:=DELETE_E(g_bool1,g_string1,g_int1,g_int2,g_string2);