Mitsubishi Electric MELSEC FX Series Structured Programming Manual page 196

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
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 devices specified in
s2
(Error code: K6706)
2) When the value specified in
devices specified in
(Error code: K6706)
3) When the value specified in
(Error code: K6706)
4) When the value specified in
(Error code: K6706)
5) When the value specified in
devices specified in
(Error code: K6706)
Program example
In this program, specified number of characters starting from an arbitrary position of a character string stored
in devices specified in
character string obtained by replacement is output to devices specified in
1) Function without EN/ENO(REPLACE)
[Structured ladder]
g_string1="ABCDEFGH"
g_string2="012345678"
[ST]
g_string3:=REPLACE(g_string1,g_string2,g_int1,g_int2);
2) Function with EN/ENO(REPLACE_E)
[Structured ladder]
g_bool1
[ST]
g_bool3:=REPLACE_E(g_bool1,g_string1,g_string2,g_int1,g_int2,g_string3);
194
n1
s2
is negative
n2
is "-2" or less
n1
n2
s1
are replaced with a character string stored in devices specified in
s1
REPLACE
_IN1
_IN2
g_int1=6
_L
g_int2=3
_P
REPLACE_E
EN
ENO
g_string1
_IN1
g_string2
_IN2
g_int1
_L
g_int2
_P
exceeds the number of characters of a character string stored in
exceeds the number of characters of a character string stored in
g_string3="AB012345"
g_bool3
g_string3
5.8 Standard Character String Functions
.
d
and
s1
, and the
s2

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents