I want to connect an encoder (1024 pulse per rev;A/A-; B/B-) to view speed and length measurement, length increases and decreases; like 0 - 500 meters, stop, 500 - 350 meters, stop 350 - 400 meters; stop, 400 - 0 meters Stop. How can I determine the (IN/OUT) direction? The encoder in question is a Kubler.
We have a tech note that covers this question.
Take a look at Doc #1823 âUsing Quadrature Counters Technical Note.pdfâ.
The module - assuming you have a SNAP PAC system - is the SNAP-IDC5Q.
The quadrature details for use on EPIC are now in the groov EPIC users guide, doc 2267 (built into EPIC/RIO or find it on the website)
You will find it on page 197.
To answer your question: Use Frequency mode for finding the frequency of a single digital input.
Use a counter mode to find the pulse count on a single digital input.
Find the pulse count and direction using quadrature mode for 2 digital inputs, Phase A and Phase B, with an optional index input.
If you are using PAC Control the logic is the same for EPIC as SNAP.
If you can point me in the direction of where the guide mentions 32 vs 64 ints I can take a look, but I could not find it while reviewing the material on quad input types.
On the latter, I mixed up, my bad, I was reading to fast without digesting what I read⌠It was on the help command button on code editor. But Donât mind.
There are different ways to filter your input signal, a simple way:
out = (in * 0.1) + (out * 0.9);
Run that at whatever interval you like - in your case probably once/second. You can change the constants to balance between response and noise, just make sure they add up to 1.