Lenze DDS v2.3 Manual do Utilizador Página 304

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 340
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 303
Drive PLC Developer Studio
IEC 61131-3 Standard functions
14-12
l
DDS EN 2.3
14.5 Edge detection
14.5.1 R_TRIG
Rising edge detector
FUNCTION_BLOCK R_TRIG
VAR_INPUT
CLK : BOOL;
END_VAR
VAR_OUTPUT
Q : BOOL;
END_VAR
VAR
M : BOOL := FALSE;
END_VAR
Q := CLK AND NOT M;
M := CLK1;
END_FUNCTION_BLOCK
As long as the input variable CLK is FALSE,
the output Q and the auxiliary variable M will be FALSE .
As soon as CLK returns TRUE,
Q will first return TRUE and then M will be switched to TRUE .
I.e.: with every subsequent function call, Q will return FALSE until CLK has a falling and another rising
edge.
Examples
Declaration:
RTRIGInst : R_TRIG;
IL FBD
CAL RTRIGInst(CLK:=VarBOOL1)
LD RTRIGInst.Q
ST VarBOOL2
ST
RTRIGInst(CLK:=VarBOOL1);
VarBOOL2:=RTRIGInst.Q;
Show/Hide Bookmarks
Vista de página 303
1 2 ... 299 300 301 302 303 304 305 306 307 308 309 ... 339 340

Comentários a estes Manuais

Sem comentários