Lenze DDS v2.3 Manual de usuario Pagina 288

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 340
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 287
Drive PLC Developer Studio
IEC 61131-3 Operands
13-4
l
DDS EN 2.3
13.2 Variables
Variables are declared either locally in the declaration part of an organization unit or in the global
variable lists.
Variables can be used wherever where the declared type allows it.
The available variables can be called via the Help Manager.
13.2.1 System variable
System variables are implicitly declared variables that depend on the selected automation system
and were added to the automation systems PLC configuration.
To find out the automation systems system variable, select the command
Insert
Operand. In the dialog box
Help Manager
then select category
System variable
.
13.2.2 Access to variables of arrays, structures and organization units
Two-dimensional array components are accessed with the following syntax:
<Feldname>[Index1, Index2]
Variables of structures are accessed with the following syntax:
<Structure name>.<Variable name>
Variables of function blocks and programs are accessed with the following syntax:
<Organization unit name>.<Variable name>
13.2.3 Addressing bits in variables
Integer variables allow individual bits to be addressed. For this purpose, the variable is given an
index of the bit to be addressed. The bit index may be given through any constant. Indexing is
0-based.
a : INT;
b : BOOL;
...
a.2 := b;
The third bit of variable a is set to the value of variable b. The following error message is output if the
index is greater than the variablesbitwidth:
Index <n>outside the range valid for variable <var>!
The following variable types allow bit addressing.
SINT, INT, DINT, USINT, UINT, UDINT, BYTE, WORD, DWORD
The following error message is output if the variable type is not permitted.
Bit access must not be assigned to a VAR_IN_OUT variable!
13.2.4 Identifiers
An identifier is a sequence of letters, numbers and underscores starting with a letter or an
underscore.
Variable identifiers must not:
contain white spaces and umlauts,
be declared twice,
be identical to keywords.
Show/Hide Bookmarks
Vista de pagina 287
1 2 ... 283 284 285 286 287 288 289 290 291 292 293 ... 339 340

Comentarios a estos manuales

Sin comentarios