Find - Delta Electronics DVP15MC11T Operation Manual

Table of Contents

Advertisement

DVP15MC11T Operation Manual
8.14.8

FIND

FB/FC
FC
FIND searches for the position of a specified string in another string.
Parameters
Parameter
name
In1
String
Key characters to
In2
search for
Number of
Out
characters
In1
In2
Out
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
_8
The Find instruction takes the characters in In2 as key characters and searches for the position of
key characters in the string In1. For example, as In1 is ABCDEFGH and In2 is DE, the value of Out
is 4.
The search starts from the first character in the string In1.
If multiple In2 strings exist in In1, the value of Out is the position of the first In2 from the beginning of
In1.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if the
input variables are omitted. But the output variable is allowed to omit.
Programming Example
The FIND_In1 string is 'AaBbCcDd' and the FIND_In2 string is 'Cc'. As FIND_EN is TRUE, the
value of Out1 is 5.
8-200
Input/
Meaning
Output
Input
Input
Output
Bit string
Explanation
FI ND
EN
ENO
In1
Ou t
In2
Description
Depends on the data type of the
String
variable that the input parameter is
connected to.
Depends on the data type of the
Key characters to
variable that the input parameter is
search for
connected to.
Depends on the data type of the
Number of
variable that the output parameter is
characters
connected to.
Integer
Applicable
model
DVP15MC11T
Valid range
Real
Time, date
number

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents