Flip-Flop as Basic Function Block BFB

After creating a Basic Function Block (BFB) perform the following steps to add the Flip-Flop functionality to your own BFB.

  1. Within the Properties tab enter a comment description for the Flip-Flop like Flip Flop alternating on/off
  2. Within the Interface tab create the following interface:
    Flip-Flop BFB Interface
  3. Within the Algorithm tab delete the existing INIT Algorithm because we do not need it and choose the REQ Algorithm. In the ST (Structured Text) area enter Q := NOT Q;
    Flip-Flop BFB Algorithm
  4. Within the ECC tab delete or adapt the default Execution Control Chart (ECC) according to the figure below.
    1. Open the Palette on the right and bring in 2 States or modify the existing States. Name the states NULL and ONE. Consider that the first inserted State is marked as the initial State by a double border. This initial State is named NULL.
    2. Bring an an Action pair for both States or modify the existing ones. Set the Algorithm to REQ and the event output to CNF
    3. Connect NULL to ONE (start at green dot) and change the trigger input event to REQ. Connect ONE to NULL and change the trigger input event to REQ.

    Flip-Flop BFB ECC