Lenze DDS v2.3 Bedienungsanleitung Seite 306

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 340
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 305
Drive PLC Developer Studio
IEC 61131-3 Standard functions
14-14
l
DDS EN 2.3
14.6 Counters
14.6.1 CTU
Up counter
CU, RESET and Q are of type BOOL, PV and CV are of type INT.
If RESET is TRUE, the counter variable CV is set to 0.
Every positive edge at input
CU increases CV
by 1.
As long as
CV
is less than
PV
max (i.e. no overflow).
Q returns TRUE if CV is greater than or equal to the upper limit PV .
CTU(CU, RESET, PV, Q, CV) means:
If RESET is TRUE, the counter variable CV will be initialized with 0.
If CU has a rising edge, CV will be increased by 1.
Examples
Declaration:
CTUInst : CTU;
IL FBD
CAL CTUInst(CU:=VarBOOL1, RESET:=VarBOOL2, PV:=VarINT1)
LD CTUInst.Q
ST VarBOOL3
LD CTUInst.CV
ST VarINT2
ST
CTUInst(CU:=VarBOOL1, RESET:=VarBOOL2, PV:=VarINT1);
VarBOOL3:=CTUInst.Q;
VarINT2:=CTUInst.CV;
14.6.2 CTD
Down counter
CD, LOAD and Q are of type BOOL, PV and CV are of type INT.
If LOAD is TRUE, the counter variable CV will be set equal to the upper limit PV.
If LOAD is FALSE, every function block call will decrease CV by 1.
Q returns TRUE if CV is less than or equal to 0.
CTD(CD, LOAD, PV, Q, CV)
Examples
Declaration:
CTDInst : CTD;
IL FBD
CAL CTDInst(CD:=VarBOOL1, LOAD:=VarBOOL2, PV:=VarINT1)
LD CTDInst.Q
ST VarBOOL3
LD CTDInst.CV
ST VarINT2
ST
CTUInst(CD:=VarBOOL1, LOAD:=VarBOOL2, PV:=VarINT1);
VarBOOL3:=CTDInst.Q;
VarINT2:=CTDInst.CV;
Show/Hide Bookmarks
Seitenansicht 305
1 2 ... 301 302 303 304 305 306 307 308 309 310 311 ... 339 340

Kommentare zu diesen Handbüchern

Keine Kommentare