Lenze PLC Designer PLC Designer (R2-x) Uživatelský manuál Strana 646

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 844
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 645
L-force | PLC Designer
PLC Designer Libraries
644 DMS 3.2 EN 02/2011 TD29
Example in ST:
Var1 := DELETE ('SUXYSI',2,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.
REPLACE
Provided by standard.lib.
REPLACE replaces a partial string from a larger string with a third string.
The input variable STR1 and STR2 are type STRING, LEN and POS are type INT, the
return value of the function is type STRING.
REPLACE(STR1, STR2, L, P) means: Replace L characters from STR1 with STR2 beginning
with the character in the P position.
Example in IL:
LD 'SUXYSI'
REPLACE 'K',2,2
ST VarSTRING1 (* Result is 'SKYSI' *)
Example in FBD:
Zobrazit stránku 645
1 2 ... 641 642 643 644 645 646 647 648 649 650 651 ... 843 844

Komentáře k této Příručce

Žádné komentáře