Navigation

  • index
  • next |
  • previous |
  • Automation Builder Documentation V0.0.0.1 »
  • IEC 61131-3 editor »
  • Programming for PM5xy »
  • <no title> »
  • Libraries »
  • Standard.library »
  • String Functions »

Previous topic

LEFT

Next topic

MID

Quick search

RIGHT¶

Provided by standard.lib.

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 ‘SUSI’

RIGHT 3

ST VarSTRING1 (* Result is ‘USI’ *)

Example in FBD

../_images/262e18f30674c6450a317f3444572e14

Example in ST

VarSTRING1 := RIGHT (‘SUSI’,3);

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.

Navigation

  • index
  • next |
  • previous |
  • Automation Builder Documentation V0.0.0.1 »
  • IEC 61131-3 editor »
  • Programming for PM5xy »
  • <no title> »
  • Libraries »
  • Standard.library »
  • String Functions »
© Copyright 2017, ABB Automation Products GmbH. Created using Sphinx 1.6.2.