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:
|
Negated |
boolVariable |
The flow on the right is the Boolean AND operation between:
|
Positive |
boolVariable |
The flow on the right is TRUE when both: |
Negative Transition |
boolVariable |
The flow on the right is TRUE when both:
|
Normally Closed Positive Transition |
boolVariable |
The flow on the right is TRUE when both:
|
Normally Closed Negative Transition |
boolVariable |
The flow on the right is TRUE when both:
|
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.
- 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.