Home
Wood Heating
Choices
Data
System Design
Controller
Control Logic
Software Design
Electrical Schematic
Simple system w/ storage
Domestic Hot Water
Heat Storage
Solar Hot Water
Introduction
System Components
User Guide
Programming Guide
Failsafe Design
Sample Application
LM35 Sensor Assembly
Pinout Info
Poor Man's VS Circ
Journal
Plastic Pipe Collector
Thermistors
Forum Solar-TodayWood-TodayBurn Planner
<Prev Table Of Contents Next>

About Rules

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:

  1. Differential Rules, which act on a difference between two values
  2. Logical Rules, which act on true/false conditions
  3. Timer Rules, which create timers that can be used with other 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:

  • Every differential rule sets its target element to either TRUE or FALSE every cycle.
  • Logical rules ONLY change their target if the rule evaluates to true. If the rule evaluates to false, they do nothing.
  • Timer rules set their target if the criteria are met. If not, they decrement their target if the target is non-zero.

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.

Evaluation Sequence

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.

<Prev Table Of Contents Next>