Find String (Find); Relay Ladder; Structured Text - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 18
ASCII String Instructions (CONCAT, DELETE, FIND, INSERT, MID)

Find String (FIND)

FIND
Find String
Source
Search
Start
Result
Operand
Type
Source
String
Search
String
Start
SINT
INT
DINT
Result
SINT
INT
DINT
FIND(Source,Search,Start,
Result);
Description:
Arithmetic Status Flags:
Fault Conditions:
Type
Code
Cause
4
51
The LEN value of the string tag is greater
than the DATA size of the string tag.
4
56
The Start value is invalid.
614
The FIND instruction locates the starting position of a specified string within another
string.
Operands:

Relay Ladder

?
??
?
??
?
??
?
??
Format
Tag
Tag
Immediate
Tag
Tag

Structured Text

The operands are the same as those for the relay ladder FIND instruction described
above.
The FIND instruction searches the Source string for the Search string. If the instruction
finds the Search string, the Result shows the starting position of the Search string within
the Source string.
Not affected
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Enter
String to search in
String to find
Position in Source to start the
search
Tag that stores the starting
position of the string to find
Recovery Method
1. Check that no instruction is writing to the LEN member of the string tag.
2. In the LEN value, enter the number of characters that the string contains.
Check that the Start value is between 1 and the DATA size of the Source.
Notes
String data types are:
·Default STRING data type
·Any new string data type that you create
Enter a number between 1 and the DATA size of the
Source.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents