VA Motion Controller Programming Manual
224
10.4.7 FIND (FinDA character that appears in a string)
LD, FBD
programming language
Function: The FIND instruction is used to determine the position of the second
string ( whichever is the first character ) that appears in the first string .
Note
: IL, ST
language programming needs to insert variables
IN1, IN2
and
OUT
or use
constants in the current
POU
variable worksheet
the FIND
data processing instruction type
The first input character or string, the position of the first
character from the left in the string is 1
The second input character or string, the position of the
first character from the left in the string is
1
The output of the second string of the first character string
appears in the first position, if the character is not included in
the first string, output
O
.
Funtion and Action examples
When the contact is
ON
, the instruction
is executed. When the character string in
the address
V 400
is equal to the character
string of the address
4 01A
, the
address
V 402
outputs
1
;
The result of the execution:
V ECTOR =
VECTOR
output
1
;