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 side, according to the value of the associated variable and the rung state on its left side.
  • Serialized and Parallel Contacts
  • Transition Contacts

The possible contact symbols are:

Variable

Contacts

Description

Normal

boolVariable
   -] [-

The flow on the right is the Boolean AND operation between:

  • (1) the flow on the left.
  • (2) the associated variable.

Negated

boolVariable
   -]/[-

The flow on the right is the Boolean AND operation between:

  • (1) the flow on the left.
  • (2) the negation of the associated variable.

Positive

boolVariable
   -]P[-

The flow on the right is TRUE when both:

  • The flow on the left is TRUE.
  • The associated variable is TRUE and was FALSE the last time this contact was scanned (rising edge).

Negative Transition

boolVariable
   -]N[-

The flow on the right is TRUE when both:

  • The flow on the left is TRUE.
  • The associated variable is FALSE and was TRUE last time this contact was scanned (falling edge).

Normally Closed Positive Transition

boolVariable
   -]/P[-

The flow on the right is TRUE when both:

  • The flow on the left is TRUE.
  • The associated variable does not change from FALSE to TRUE from the last scan of this contact to this scan (NOT rising edge).

Normally Closed Negative Transition

boolVariable
   -]/N[-

The flow on the right is TRUE when both:

  • The flow on the left is TRUE.
  • 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  ANDN  & operation.

Two contacts in parallel represent an OR / ORN 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 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.
  • 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.

Example

MC_GrpEnable executes and turns on its Done output immediately.

In this code:

  • The GroupEnableDone positive transition contact only provides a TRUE the first time MC_GrpEnable is executed.
  • For all subsequent executions, the positive transition contact does not provide a TRUE since GroupEnableDone is TRUE every time the contact is scanned.

To remedy this, this 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, press the Spacebar to change its type (e.g., normal, negated, etc.)

    When the application is running, select a contact and press the Spacebar to swap its value between TRUE and FALSE.