LEFT is a string function that returns a specified number of characters from the start of a string. It takes a STRING(255) input and an INT size, and returns a STRING(255); LEFT('SUSI',3) returns 'SUS'.
| Language | iec 61131 3 |
|---|---|
| Code | LEFT |
| Group | String Functions |
| Syntax | LEFT (STR, SIZE) |
| Dialect | CODESYS |
| Name | Data type | Description |
|---|---|---|
| STR | STRING(255) | String to be analyzed |
| SIZE | INT | Number of characters |