Text start LEFT
Dest = the first Count characters.
Text'ABC-12345'
Count3
Dest'ABC'
| Tag | After two scans |
|---|---|
| Barcode | 'ABC-12345' |
| Prefix | 'ABC' |
| PrefixLen | 3 |
How it's used
Use LEFT to read a prefix, such as the product family from a barcode.
Text'ABC-12345'
Count
Dest'ABC'
EQU
AGlobal.Family'ABC'BGlobal.Pumps'ABC'
Global.IsPumpOTE
| Tag | Value |
|---|---|
| Barcode | 'ABC-12345' |
| Family | 'ABC' |
| Pumps | 'ABC' |
| IsPump | 1 |
The first 3 characters are ABC, so IsPump is on.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| Source | STRING or a number | Reads |
| Count | DINT or a number | Reads |
| Dest | STRING | Writes |
Common mistakes
- Using a count larger than the textCheck the source length and the destination capacity before extracting.