Flip-flop

BD52_FLIPFLOP

PROGRAM TESTST
 VAR
 BOOL1, BOOL2, BOOL3, BOOL4, BOOL5 :BOOL;
    FB : LIB.CORE.V1_0.BD52_FLIPFLOP;
   END_VAR
 FB(IN:=BOOL1,INF:=BOOL2,IND:=BOOL3,INFD:=BOOL4,OUT =>BOOL5); 
END_PROGRAM

LIB\CORE

V1.0

The block controls its output value based on inputs, which read rising or faling edge, and thus set or reset the output.

InputTypeDescription Default value
IN BOOLRising edge sets out=true False
INF BOOLFalling edge sets out=true False
IND BOOLRising edge sets out=false False
INFD BOOLFalling edge sets out=falseFalse
OutputTypeDescription
OUT BOOLOutput value
OUTN BOOLNegation of the output value

The block is a simple logical memory. Any rising edge at in and any falling edge at inf sets out=true. Any rising edge at ind and any falling edge at infd sets out=false. With more edges at the same time, out=false is preferred, see figure below. The output outn is negated out signal.

BD52 Flip-flop circuit – to keep it simple, inf=infd=false. Note that if more edges come at the same time, out=false is prioritized.

BD52 - Rising edge at the in input sets the output to true. May be used for aggregate / lights control using pushbuttons, or event-controlled switching.

  • © Energocentrum Plus, s.r.o. 2017 - 2024