FIND block
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
currently restricted
|
Graphical interface |
|
Available since |
version 1.30.0 (for Neuron Power Engineer) |
Functionality
The block determines the first position where a partial strings begins within another string. Case sensitivity is of importance.
At input IN1
, enter a string in which the searching is done (= 1st string). At input IN2
, enter the string which is searched for (= 2nd string). If no occurrence of the value connected to IN2
is found, the block returns the value 0
. If an empty character string is searched for, the block returns the value 1
.
Neuron Power Engineer determines the character positions within a string as follows: 1
, 2
, ..., n. 1
corresponds to the leftmost character position and n
to the length of the string.
Three-character combination of the dollar sign ($
) followed by two hexadecimal digits are evaluated as single character. Example: The string '$B15
' (corresponds to '±5
') consists of 2 characters. See →character string literal for more examples for those combinations.
Inputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
1st input value (= string in which the searching is done) |
|
|
|
2nd input value (= string which is searched for) |
Return value: |
– |
|
|
Input EN
and output ENO
are available when →calling the block. See "Execution control: EN, ENO" for information on input EN
and output ENO
.
See:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Example for usage within ST-editor
|
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.