LEFT
![LEFT 1:](Images/png/74483723__Web.png)
The function LEFT returns the left, initial string for a given string.
LEFT (STR, SIZE) means: Take the first SIZE character from the left in the string STR.
FUNCTION LEFT: STRING (255)
VAR_INPUT
STR : STRING(255);
SIZE : INT;
END_VAR
Example in IL:
LD 'SUSI'
LEFT 3
ST Var1 (* Result is 'SUS' *)
Example in ST:
Var1 := LEFT ('SUSI',3);
Requirements
Development environment |
Target system type |
PLC libraries to be linked |
---|---|---|
TwinCAT v3.0.0 |
PC or CX (x86) |
Tc2_Standard |