There are a few topics that concern rules in general rather than any specific rule type.
First of all, the NFCS has only three types of rules:
Each rule type will be described in detail in the following sections.
Rules are based on templates and are constucted using pull-down selections. There is no way to create an invalid rule.
Rules Are Based On Elements
Every term in a rule is a data element - either a physical input, a physical output, or a variable. In order to use a numeric value in a rule, you must create a variable to hold that value.
Rules Set Elements
Important Concept: Every rule has a 'target' element whose value it may set. Different rule types have different behaviors. There are discussed in more detail in the following sections. In summary:
Updating, Deleting, and Moving Rules
Rules must be updated one at a time. If you make changes to more than one rule before updating, changes to all but one rule will be lost. With software version 1.1 or higher, this happens automatically.
Any rule may be deleted by selecting **DELETE** in the first field and clicking 'Update'. If you have the NFCS software version 1.1 or higher, simply click the 'X' button next to a rule to delete it.
With software version 1.1 or higher, you can move rules up or down by clicking the arrow buttons next to the rules.
Rules are evaluated in the sequence displayed. Differential rules are evaluated first, top to bottom. Logical rules are evaluated next, followed by timer rules. This means that in some cases it will take more than one cycle before the results of a change propagate through all the rules that are affected.
In the Front Cover example, there is an instance of this situation. When the user switch is moved to the 'up' position, LED 2 lights immediately. However, LED 1 does not light until the next cycle. That's because LED 1 is based on timer 1, and timer 1 does not get set until the end of the first cycle.
This sequence behavior can be used to ensure that one event happens before (or after) another.
Default Values for Elements
All elements tied to discrete outputs are in effect initialized to FALSE at the beginning of each cycle. In no rule sets them to TRUE, they will will evaluate to FALSE and the discrete output will be turned off.
All other elements inherit their previous values. If no rule acts on them, they will retain the same value indefinitely.
Multiple rules for the same Element
It's possible and often desirable to have more than one rule that set the same element. This is particularly true for discrete output elements. If there are multiple rules that set the same element to TRUE, then it will end up as TRUE if any of the rules is triggered.
The basic behavior is that any element affected by multiple rules ends with the value from the last rule that sets it.