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

  • 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 523
L-force | PLC Designer
Data types in PLC Designer
522 DMS 3.2 EN 02/2011 TD29
Test Program for the function CheckBounds:
PROGRAM PLC_PRG
VAR
a: ARRAY[0..7] OF BOOL;
b: INT:=10;
END_VAR
a[b]:=TRUE;
Stop!
The CheckBounds-function provided by the Check.Lib library is just a sample
solution! Before using that library module check whether the function is working in
your sense, or implement an appropriate function directly as a POU in your project.
11.2.3 Pointer
Variable or function block addresses are saved in pointers while a program is running.
Pointer declarations have the following syntax:
<Identifier>: POINTER TO <Datatype/Functionblock>;
A pointer can point to any data type or function block even to user-defined types.
The function of the Address Operator ADR is to assign the address of a variable or
function block to the pointer.
A pointer can be dereferenced by adding the content operator "^" after the pointer
identifier.
Note!
A pointer is counted up byte-wise ! You can get it counted up like it is usual in the C-
Compiler by using the instruction p=p+SIZEOF(p^);.
Zobrazit stránku 523
1 2 ... 519 520 521 522 523 524 525 526 527 528 529 ... 843 844

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

Žádné komentáře