> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/water-insight/sprinkler-control/effluent-dispersal/operation.md).

# How a dispersal cycle runs

How the EDMS INC decides when to run, which WVCs to start, and what each input, output and setting does.

The EDMS system uses a control algorithm governed by the state of predefined inputs connected via the IO terminals.

{% hint style="info" %}
**Applies to:** the Effluent Dispersal Management System (EDMS). From the EDMS User Guide Rev 01 (31 July 2018).
{% endhint %}

## The three states

| State            | What happens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Idle**         | In this state, the INC is waiting for a trigger event to go into the PRESSURISING state. This can be due to either the MANUAL switch activating, or the High Float switch asserting. The System must not be inhibited in order to transition to the next state. In this state all the relays should be off, and the INC will not be communicating with the IPCs (unless the user initiates communications via the touch screen). The pump fault input must be negated (no pump fault) in order to transition to the next state. |
| **Pressurising** | When the INC state transitions from IDLE to this state it will activate the Pump Start relay and wait for the Pressurisation Delay so that the line is pressurised before sprinklers start operating. Once that has completed, it will move to the ACTIVE state.                                                                                                                                                                                                                                                                |
| **Active**       | While in the ACTIVE state the INC will communicate with the IPCs, commanding them to switch their valves on and off. The INC will remain in this state until any one or more of the following conditions is met: If the ACTIVE state was triggered manually and the manual input is then negated. If the ACTIVE state was triggered by floats (AUTO) and the Low float is then asserted. If the Pump Fault input is asserted. If the Inhibit input is asserted.                                                                 |

If any of the conditions are met the INC will move to the IDLE state and stop any sprinkler operation.

## The active cycle

1. Once a cycle has started the INC will progress through its list of WVCs in the order listed in the configuration file, attempting to start each one (activate it) until the requisite number of devices have confirmed by radio response that they are operating (watering).
2. A timer is started by the INC for each device and once it expires the INC instructs the WVC to turn off and then attempts to start the next WVC in its list.
3. If an INC instructs a WVC to turn on but gets no confirmation, it will skip to the next WVC in the list, always attempting to maintain the correct number of WVCs on at a time so that the overall effluent flow rate from the pump remains the same.
4. The whole process is repeated until all the WVCs have completed their operation, then the INC starts again from the top of the list.
5. The cycle continues until the pump stops or the effluent tank is empty. Thereafter any active WVCs are told to turn off. When pumping next resumes the INC restarts the cycle where it left off in the list of WVCs.

As a safety feature, each WVC maintains its own timer when activated so that it automatically turns off, in case it misses a radio communication from the INC to turn off.

## Settings

From the main menu tap **settings** then tap **EDMS** to adjust values. Tapping **next**/**back** accesses the various displays.

| Setting                 | What it does                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Selected Group**      | WVC devices can be subdivided into groups to distribute to a few posts only. Enter the group number to be controlled. The configuration file for each device lists the group number to which the WVC belongs. Typically, there is only one group for the site. Entering 0 into this field will disable all dispersal. WVCs in the configuration file must not belong to group 0.                                                                                                                                                                                                                                                                                                                                     |
| **N IPCs Active**       | Based on the desired flow and line pressurisation the system designer normally specifies the number of sprinklers to be concurrently active at any one time to cover the dispersal area. If set to zero then the system will not attempt to turn on any units. If set to 3 for example the system will attempt to activate 3 units. If one unit fails to activate it is skipped and the INC will continue in the configuration list to contact WVC devices until the complement of 3 is reached.                                                                                                                                                                                                                     |
| **On Duration (mins)**  | This specifies how long each sprinkler operates. The minimum value is 1. `duration=28`: Optional - this entry can be used to specify the operating duration of the WVC. Alternatively, for backwards compatibility a schedule file can be used. Only one method should be employed.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Press. Delay (secs)** | Some systems require the hydraulic line to reach a certain pressure before valves (especially diaphragm style) will operate. It can take the pump time to build to the required pressure level. This setting specifies a delay time to wait for the line pressure to build before commencing to activate WVC devices. Enter a value greater than 0, the maximum delay is 60s.                                                                                                                                                                                                                                                                                                                                        |
| **Guard Time (mins)**   | If the pump is turned off while a WVC is sprinkling then WVC is turned off. When the pump turns on again sprinkling resumes at the point where it left off on the same WVC. However, if the WVC was close to the end of its duration then the system can skip to the next unit in the list. Set the guard time so that if the remaining duration is less than the guard time then the system will automatically skip to the next unit. For example, if the guard time is 2 minutes and there was only 1 minute of watering time remaining on the duration timer for the WVC when the pump turned off then when the pump resumes the system will skip to the next WVC rather than water the current WVC for 1 minute. |

## Inputs

Inputs are defined in pairs (signal and common). The inputs are all normally open (N/O), meaning that to assert them they need to be shorted to ground (common). However, the N/O vs N/C configuration of any input can be altered via the LCD GUI. It is important to realise that the inversion settings apply to the logical inputs not the physical inputs. Thus, the display board LEDs will still follow the state of the physical inputs.

| Input | Name        | Negated                                                       | Asserted                                                         |
| ----- | ----------- | ------------------------------------------------------------- | ---------------------------------------------------------------- |
| 1     | Run/Inhibit | System enabled to run                                         | System inhibited (will not run)                                  |
| 2     | Auto/Manual | (Auto) System runs according to the state of the float inputs | System runs manually if in run mode (not inhibited)              |
| 3     | Low Float   | Tank level is greater than the low float level                | Low float signal active, fluid level in the tank is low or empty |
| 4     | High Float  | Tank water level is less than the high float level            | High Float active the tank is full                               |
| 5     | Pump Fault  | Pump is operating ok                                          | The pump has a fault and is not running or should be stopped.    |
| 6     | Unused      |                                                               |                                                                  |

## Outputs

Relay outputs operate in a contact pair. Outputs are normally open.

| Output | Name            | Use                                                                                                                                                                                 |
| ------ | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1      | Pump Start      | Optional - Can be used to initiate the pump to start in the pump control system. Indicates that the input conditions have been met to move from the idle state to the active state. |
| 2      | IPC Comms Fault | Optional – Can be used to indicate that there is a fault in the EDMS system which could be used to turn on an indicator                                                             |
| 3 to 6 | Unused          |                                                                                                                                                                                     |

## The IO screen

On the main menu tap the **IO** button. This will display check boxes for each of the 6 inputs and outputs.

* The display panel indicates the logical state, if the input is active low (corresponding inverted checkbox is unticked) and the input pair is shorted then the checkbox for that input will be ticked to show that the signal is asserted.
* An additional row (**inverted**) sets the polarity of the input. Unticked indicates active low (default) shorting the input pair asserts the signal. Ticked indicates active high, an open connection (using the internal pull up resistor) asserts the signal.
* If a relay is activated programmatically by the INC then the checkbox will be ticked to indicate that the relay has been activated. Alternatively if a relay is inactive then tapping the corresponding checkbox will activate the relay and the checkbox will become ticked. In this manner relay outputs can be tested manually.

If an input is asserted the LED on the INC adjacent to the input pair indicates the physical state of the input (input shorted turns on the LED).

## Status

The INC maintains basic information about the current operational state of the system. It does not log or retain historical information. From the main menu tap **status** to review the current state of the system. State indicates the current state of EDMS State machine (Idle, Pressurizing, or Active). Group indicates the Group number (set of WVCs) currently being cycled. IPCs Active indicates the number of devices in the group that are currently active (sprinkling).
