The following table shows the errors which may occur while executing the function and the value returned by the function in the corresponding error case.
| Error case | Output value |
| L < 0 | Empty string '' |
| P <= 0 | Empty string '' |
| P + L > len(IN) + 1(len(...) = actual string length) | Empty string '' |
| Resulted string too short | Empty string '' |
If the listed error occurs, a string error is written to the Online log in the MESSAGES window.
Note
Controller stop on string error: The controller can be automatically stopped when a string error occurs. This allows you to locate the error in your project. To enable the automatic stop of the controller in case of a string error, activate the button in the Cockpit toolbar of the controller. |