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>

Front Panel Example

The NFCS is delivered with a simple set of rules that use the user-assignable three position switch and LEDs on the controller front cover. This example does not require any external hardware to be connected.

The example rules implement the following behavior:

  1. If the switch is in the 'down' position, illuminate LED 1
  2. If the switch is in the middle position (neither up nor down) illuminate LED 2
  3. If the switch is in the 'up' position, illuminate LED 3
  4. Any time the switch is moved to the 'up' position, illuminate LED 4 for the next 10 seconds

You can see which physical channels are assigned to the data elements for switch position and the LEDs - just click on the 'Physical I/O' tab.

The last rule requires some explanation. While timers will be covered in depth in a later chapter, at this point simply be aware that two variables are required: one to hold the remaining time, and one to hold the desired timer interval. In the example application these are named 'Timer 1' and 'Brief Delay'.

In this example there are a total of five rules. Four are simple logical rules, and one is a timer rule. The rules correspond to the desired behaviors described above. Remember that 'TRUE' (or any non-zero value) corresponds to 'On'. Our first desired behavior is If the switch is in the 'down' position, illuminate LED 1. This is implemented by the logical rule Set LED 1 to TRUE if User Switch Down is true. Each of the highlighted rule components is an element. The selection box for each rule component lists the elements that are legal for that portion of the rule. Remember that TRUE and FALSE are predefined variables.

In addition to the selection boxes for elements, each rule type has additional choices. For logical rules, each element can be tested for 'is true' or 'is not true'.

The second logical rule deals with the situation where the switch is in the middle position. In that case, neither the 'switch up' nor the 'switch down' inputs will be true. The rule tests for both conditions, and lights the LED only if both conditions are met.

The third rule is almost identical to the first.

The fourth behavior requires a timer, and that results in two rules. One of the rules is a timer rule. It sets timer 1 for 'Brief Delay' when the 'switch up' input becomes true. This means that timer 1 is set ONLY at the time when the switch is detected moving to the up position. The timer will then count down, even if the switch remains in the up position. Timer rules can have other logic - details are described in the section on timer rules.

The final rule is a logical rule that illuminates LED 4 if timer 1 is 'true'. During the time a timer is counting down, it has a non-zero (or true) value.

This example is intended for instructional purposes only. Feel free to experiment with any or all of the rules. Try different values for 'brief delay', and experiment with different task periods (on the System tab).

Front Panel Uses

Once you're done using the front panel to learn about programming, it still has a few uses:

  1. Testbed for new rules. Rather than testing a new set of rules on actual hardware, create the rules exactly as they will be except have them turn on LEDs rather than actual pumps and valves. If the rules aren't doing exactly what you want, no harm done.
  2. Substitute input for testing. If you have a rule that's triggered by something that's not well suited for testing - an overtemperature switch, for instance - you can test the rule using the front panel switch as the input. Simply update the rule to use the actual input once you're satisfied.
  3. User input and / or status displays. In some cases there may be a need for user input or a desire to provide visual status indication. Simply label the switch and/or LEDs as needed and build rules. Examples might be mode indication or user selection of heat source (Wood / Oil / Auto, for instance).
<Prev Table Of Contents Next>