Digital Matter Support

Pulse Counting on DM Devices

The pulse counting feature was added to the Falcon (74.3 & 74.4 hardware revisions) and Eagle models in the first quarter of 2020. This feature allows a device to keep a record of how many pulses have occurred on a digital input. The count values are stored in analogue values, which for analogue numbers 1 to 10 (16 bit), the count can range from -32,768 to +32,767. And for analogue numbers 11 to 20 (32 bit), they range from -2,147,483,648 to +2,147,483,647. The counts are stored in non-volatile memory (values are not lost when power is lost), and automatically loop around when the maximum value is reached.


OEM System Parameters

To set up a Digital input to measure pulses on input 1, you can follow the below parameters


Function 
Set to digital input. Pulse counting works independently of digital input functionality, but this should still be set. 
Logging and Uploads
Logging and uploads should be disabled to save data on higher frequency pulse sources and accurate timestamps are not required. Heartbeats (see 'Basic Tracking') can be used to periodically upload counts every X minutes/hours.
Active Level
The active level will depend on how your application applies to pulse counting. For more information on Active levels, See our article here
Bias Resistor
See our Article here
Debounce Time
This field is used to determine your debounce time (time input needs to be stable for the pulse to be registered). This is useful for filtering noisy inputs, but also has a direct relation to the shortest pulse widths/highest pulse frequencies that can be measured. If pulses aren't being counted, try lowering this value. If a lot of errant pulses are counted, try increasing it.
Rising edge Count:
(see below)
Analog Input:
Chose analogue number to store count in, 1-20. Inputs 11-20 have a higher maximum pulse count.


Example Payload

An example of the pulse count coming through on analogue 10:

 {
                    "AnalogueData": {
                        "1": 4294,
                        "3": 3331,
                        "4": 99,
                        "5": 4200,
                        "6": 9984,         // %Battery remaining
                        "10": 5            //Pulse Count
                    },
                    "FType": 6             // Field ID# - DMT-Data-Fields.pdf
                }

Rising Edge Counts

Rising Edge Count
Yes or No

If you want the pulse counter to increase the count on the rising edge which is the first green line, set to yes, if you want the count to increase on the falling edge, set to No.


Resets and Count Overruns

The pulse count will only ever reset during a hard reset/total power loss, or a firmware upgrade.

One way to handle this, would be to determine if the count goes down from a previous value, ignore any counts from the last value, but start again from the new one. for example, you get 4, 7, 10, 30, 10, 12, ignore the 30 -> 10 difference and start from 10. so it would be 30 + (10-12) = 32

if ( value[n] < value[n-1] )
{
newValue = value[n-1] + value[n + 1] - value[n];
}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.