Download Data types in CoDeSys
Transcript
Appendix D: - The CoDeSys Libaries
Appendix D: The CoDeSys Libaries
10.17 The Standard.lib library
10.17.1
String functions...
Please note: String functions are not "thread safe": When using tasks, string functions may only be used in a
single task. If the same function is used in different tasks, there is a danger of overwriting.
LEN
Returns the length of a string. Input STR is of type STRING, the return value of the function is type
INT.
Example in IL:
LD
'SUSI'
LEN
ST
VarINT1 (* Result is 4 *)
Example in FBD:
Example in ST:
VarSTRING1 := LEN ('SUSI');
LEFT
Left returns the left, initial string for a given string. Input STR is type STRING, SIZE is of type INT, the
return value of the function is type STRING.
LEFT (STR, SIZE) means: Take the first SIZE character from the right in the string STR.
Example in IL:
LD
'SUSI'
LEFT 3
ST
VarSTRING1 (* Result is 'SUS' *)
Example in FBD:
Example in ST:
VarSTRING1 := LEFT ('SUSI',3);
RIGHT
Right returns the right, initial string for a given string.
RIGHT (STR, SIZE) means: Take the first SIZE character from the right in the string STR.
Input STR is of type STRING, SIZE is of type INT, the return value of the function is of type STRING.
Example in IL:
LD
CoDeSys V2.3
'SUSI'
10-39
Related documents
WizPLC 3.0 CoDeSys User Guide EN
3318 kB
novaPLC 2.0
CoDeSys Manual - Parkermotion.com
Manual de Utilização do MasterTool IEC MT8200
CoDeSys 2.3 - esco
CANopen for Runtime Systems
3230 kB
Manual de Utilização
WizPLC 3.0 CoDeSys User Guide FR
CANopen for 3S Runtime Systems V2_3_5_0
(R2-x) CANopen for Runtime Systems