FFLD Contacts

Contacts are basic graphic elements of the FFLD language. A contact is associated with a Boolean variable which is displayed above the graphic symbol. A contact sets the state of the rung on its right-hand side, according to the value of the associated variable and the rung state on its left-hand side.

Below are the six possible contact symbols and how they change the flow:

Contacts Description
boolVariable
   -] [-
Normal: The flow on the right is the Boolean AND operation between:
(1) the flow on the left and (2) the associated variable.
boolVariable
   -]/[-
Negated: The flow on the right is the Boolean AND operation between:
(1) the flow on the left and (2) the negation of the associated variable.
boolVariable
   -]P[-
Positive Transition: The flow on the right is TRUE when the flow on the left is TRUE and the associated variable is TRUE and was FALSE the last time this contact was scanned (rising edgeClosedA rising edge is the transition of a digital signal from low to high. It is also called positive edge)

boolVariable
   -]N[-
Negative Transition: The flow on the right is TRUE when the flow on the left is TRUE and the associated variable is FALSE and was TRUE last time this contact was scanned (falling edge).

boolVariable
   -]/P[-
Normally Closed Positive Transition: The flow on the right is TRUE when the flow on the left is TRUE and the associated variable does not change from FALSE to TRUE from the last scan of this contact to this scan (NOT rising edge).
boolVariable
   -]/N[-
Normally Closed Negative Transition: The flow on the right is TRUE when the flow on the left is TRUE and the associated variable does not change from TRUE to FALSE from the last scan of this contact to this scan (NOT falling edge).

Serialized and Parallel contacts

Two serial normal contacts represent an AND operation.

Two contacts in parallel represent an OR operation.

Transition Contacts

The transition contacts -|P|-, -|N -|/P|-, and -|/N|- compare the current state of the Boolean variable to the Boolean’s state the last time the contact was scanned. This means that the Boolean variable could change states several times during a scan, but if it’s back to the same state when the transition contact is scanned, the transition contact will not produce a TRUE. Also, some function blocks can complete immediately. Therefore a different approach, other than using transition contacts, is needed to determine if a function block completed successfully.

For example:

MC_GrpEnable executes and turns on its Done output immediately. In the following code, the GroupEnableDone positive transition contact will only provide a TRUE the first time MC_GrpEnable is executed. For all subsequent executions, the positive transition contact will not provide a TRUE since GroupEnableDone will be TRUE every time the contact is scanned.

To remedy this, the following code uses the SET and RESET of a Boolean (i.e. EnableRequest) to provide a way to detect each successful execution of the function block:


  • When a contact or coil is selected, you can press the Spacebar to change its type (normal, negated...)
    When your application is running, you can select a contact and press the Spacebar to swap its value between TRUE and FALSE