> 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/datran/datran-vi-scada/datran-dlp-ide/troubleshooting/unexpected-cos-chatter.md).

# Unexpected COS messages, or outputs that chatter

The RTU sends a stream of COS messages, or an output keeps switching: uninitialised registers, SENDCOS, TOGGLE, pulse inputs and noisy analogues.

## Registers that weren't initialised

**It is important to initialize parameters at the start of the DLP to put the memory locations in a known state.** As delivered, the memory locations used by DLP variables are in the random state from when the IC was manufactured. Different batches of memory may also have different bits set in memory locations.

In one case, the DLP used was a tried-and-tested program but was not working as expected on a specific RTU and was causing COS messages to be transmitted. Upon investigation, the RTU had memory which had come from the manufacturer loaded with all 1's in the particular memory range. This means that the DLP starts to execute with all of the SPDs in the TRUE state. This will cause the DLP to branch to all of the sections that do a `SENDCOS`, and change the state of the SPDs.

The following extract shows how to correctly initialize SPDs in the DLP:

```
PROGINIT
    INITDIG  SPD1  False
    INITDIG  SPD2  False
    INITDIG  SPD3  False
    ; ...and so on, for every SPD the DLP uses
    COSMASK  0  1,2,3,4,5,6,7,8
```

## SENDCOS runs every cycle

If `SENDCOS` is used continuously then the RTU remote will continuously send COS to the base. Use it sparingly. See [SENDCOS](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/instruction-reference/timers-logging-macros.md#sendcos).

## A fast-changing input is in the COS mask

A flow pulse input into an RTU, for example, may be pulsing often enough to cause the RTU to send a continuous stream of COS messages over the radio network, causing massive overloading and communications problems for all other sites using the same radio channel. If the input is not in the `COSMASK` list, then it will not cause a COS: see [COSMASK](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/instruction-reference/program-structure.md#cosmask).

## TOGGLE runs every cycle

If the input remains true for each cycle through the DLP, an output can toggle on/off at the rate of the DLP execution rate. See the change-detection example in [Module 07](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/dlp-self-help-course/module-07-logic-and-jumps.md).

## An analogue comparison with no delay

Be aware that real analogue inputs change continuously, therefore comparing them against set values without using hysteresis can result in erratic behaviour of any controlled outputs and of the digital accumulator. The example in [Module 04](https://help.qtech.co.nz/datran/datran-vi-scada/datran-dlp-ide/dlp-self-help-course/module-04-analogue-setpoints.md) uses a timer so that the level must be held continuously for 15 seconds or more (debounce) before the alarm lamp turns on.

## Still not working? Contact QTech

Email <techsupport@qtech.co.nz> with the RTU's model and firmware, which inputs or outputs are affected, and the DLP file.
