Text length LENGTH
Dest = how many characters the text holds.
Text'PUMP-07'
Dest7
| Tag | After two scans |
|---|---|
| PartId | 'PUMP-07' |
| PartIdLen | 7 |
How it's used
Use LEN to check scanned text is complete.
Text'ABC-12345'
Dest9
EQU
AGlobal.CodeLen9B9
Global.CodeOKOTE
| Tag | Value |
|---|---|
| Barcode | 'ABC-12345' |
| CodeLen | 9 |
| CodeOK | 1 |
Barcode has 9 characters, so CodeOK is on.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| Source | STRING or a number | Reads |
| Dest | DINT | Writes |
Common mistakes
- Counting unused capacityLength is the current text length; Capacity is the space reserved for it.