Flip-Flop as Basic Function Block
After creating a Basic Function Block (BFB) perform the following steps to add the Flip-Flop functionality to your own BFB.
- Within the Properties tab enter a comment description for the Flip-Flop like Flip Flop alternating on/off
- Within the Interface tab create the following interface:
- 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;
- Within the ECC tab delete or adapt the default Execution Control Chart (ECC) according to the figure below.
- 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.
- Bring an an Action pair for both States or modify the existing ones. Set the Algorithm to REQ and the event output to CNF
- 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.