Execution:
Condition
Prescan
Rung-condition-in is false
Rung-condition-in is true
EnableIn is set
Instruction execution
Postscan
MV_read.EM
Relay Ladder Action
The rung-condition-out is set to false.
The rung-condition-out is set to false.
The instruction executes.
The rung-condition-out is set to true.
N/A
The instruction searches for the specified characters.
The rung-condition-out is set to false.
Example:
A message from a MessageView terminal contains several pieces of information. The
backslash character [ \ ] separates each piece of information. To locate a piece of
information, the FIND instruction searches for the backslash character and records its
position in find_pos.
Relay Ladder
Structured Text
IF MV_read.EM THEN
FIND(MV_msg,find,1,find_pos);
MV_read.EM := 0;
END_IF;
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
ASCII String Instructions (CONCAT, DELETE, FIND, INSERT, MID)
Structured Text Action
No action taken.
N/A
N/A
EnableIn is always set.
The instruction executes.
No action taken.
Chapter 18
FIND
Find String
Source
MV_msg
'$06324\12\1\$r'
Search
find
'\'
Start
1
Result
find_pos
5
615