The simple encoder mode can be selected by choosing the Event counting + Basic encoder counting. First let's set up the encoder. Signal A is Source_B0_CNT0, Signal B is Aux_CNT0 and Signal Z is Gate_CNT0
. We set the Encoder mode to X1
and the Input filter we set to match our highest frequency
. We can also enter the scaling factor - if the user has an encoder with 512 pulses, the units could be entered as revs for example, so we would enter that 512 counts equal 1 rev.
Now let's take some measurements. The output of this counter is the one that which counts up when signal A leads signal B, and counts down when signal B leads signal A. The positive edges of signal A is used to calculate the counts
.
If we choose X2 mode in the setup, the counter will count raising and falling edges of source A
, therefore the resolution will be increased by a factor of 2. Also, the scaling should be changed accordingly. Instead of 512 counts per revolution, we need to enter 1024 counts per revolution.
X4 mode counts the rising and falling edges of signal A as well as signal B
. The resolution of the measurements is therefore increased by a factor of 4, so in this case, the user should enter 2048 counts per revolution as the scaling factor.
Please refer to the section "Counter in automotive applications" to see other ways to choose the counter sensors.