UMAX030211 Version 1.0.2. Preliminary Documentation – May be subject to change
16 - 85
Figure 3 – Digital Input Debouncing
Frequency measurement can be changed to RPM, by setting object 2101h
AI Number of Pulses
per Revolution
to a non-zero value.
All inputs can be further filtered once the raw data has been measured. Object 61A0h
AI Filter Type
determines what kind of filter is used per Table 5. By default, additional software filtering is disabled.
Value Meaning
0
No Filter
1
Moving Average
2
Repeating Average
Table 5 – Object 61A0h - AI Filter Type Options
Object 61A1h
AI Filter Constant
is used with all three types of filters as per the formulas below:
Calculation with no filter:
Value = Input
The data is simply a ‘snapshot’ of the latest value measured by the ADC or timer.
Equation 1 - Moving Average Transfer Function:
Value
N
=
Value
N-1
+
Input-
Value
N-1
Filter Constant
This filter is called every 1ms. The value Filter Constant stored in object 61A1h is 10 by default.
Equation 2 - Repeating Average Transfer Function:
Value=
∑
Input
N
N
0
N
At every reading of the input value, it is added to the sum. At every N
th
read, the sum is divided by
N, and the result is the new input value. The value and counter will be set to zero for the next read.
The value of N is stored in object 61A1h and is 10 by default. This filter is called every 1ms.
The value from the filter is shifted according to read-only object 2102h
AI Decimal Digits FV
and
then written to read-only object 7100h
AI Input Field Value.