Lenze DDS v2.3 Uživatelský manuál Strana 135

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 340
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 134
Drive PLC Developer Studio
Editors
7-13
l DDS EN 2.3
Application example
An operating hour meter that is to continue counting after a mains failure.
All other variables will be re-initialized either with the standard initial values (0 or FALSE) or
with the defined initial values.
Example:
VAR RETAIN
rem1:INT; (* 1. retentive variable *)
END_VAR
7.2.7 Constants, typed literals
Between the keywords VAR CONSTANT and END_VAR, all constants are declared.
Constants can be declared locally or globally.
Syntax:
VAR CONSTANT
<Identifier>:<Type> := <Initialization>;
END_VAR
Example:
VAR CONSTANT
con1:INT:=12; (* 1. constant *)
END_VAR
For a list of permitted constants refer chapter on Operands.
(^ 13-1)
7.2.8 Retentive constants
Between the keywords VAR CONSTANT RETAIN and END_VAR, all retentive constants are
declared.
Retentive constants can be declared locally or globally.
Syntax:
VAR CONSTANT RETAIN
<Identifier>:<Type> := <Initialization>;
END_VAR
Example:
VAR CONSTANT RETAIN
Acceleration: DINT:=10000; (* acceleration time *)
END_VAR
7.2.9 Keywords
Alleditorsrequirekeywordstobewrittenincapitals.
Keywords must not be used as variable names.
Show/Hide Bookmarks
Zobrazit stránku 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 339 340

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

Žádné komentáře