Find text FIND
Dest = where B first appears in A, or 0.
Text'OK:READY'
Find'READY'
Dest4
| Tag | After two scans |
|---|---|
| Reply | 'OK:READY' |
| Token | 'READY' |
| TokenAt | 4 |
How it's used
Use FIND to check a reply contains a word.
Text'OK:READY'
Find'READY'
Dest4
GRT
AGlobal.At4B0
Global.DeviceReadyOTE
| Tag | Value |
|---|---|
| Reply | 'OK:READY' |
| Ready | 'READY' |
| At | 4 |
| DeviceReady | 1 |
READY starts at position 4, so DeviceReady is on. 0 means not found.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| A | STRING or a number | Reads |
| B | STRING or a number | Reads |
| Dest | DINT | Writes |
Common mistakes
- Treating the result as textThe result is a position, not text. 0 means B was not found.