DI input counter problem

Topics about the Hardware of Revolution Pi
Post Reply
brahimdjadir
Posts: 2
Joined: 27 Dec 2022, 09:49

DI input counter problem

Post by brahimdjadir »

Hello Guys

I am trying to use DI to read pulse data from the sensor with frequency varying from 2Hz to 2Khz after configuring DI to counter mode.
I tested the module, and when checking the counter value it is always 0 until I disconnect the sensor it increments by 1.
I tried both falling and rising edge configurations and encounter the same problem.
I repeat the test with the MIO module with "PulseIn" mode and the counter works perfectly.
my question is what is the difference between the MIO pulse in mode and the input counter mode of the DI, and why the DI is not counting?
u.biakoup
Posts: 212
Joined: 14 Apr 2022, 13:04

Re: DI input counter problem

Post by u.biakoup »

Hello Brahimdjadir,

please see this video tutorialhttps://revolutionpi.com/tutorials/video-tutorials/ Number #14. It's show how to use counter and Encoder for RevPi DIO. It will be the same for RevPi DI.
The maximum frequency resolution of the counter inputs for RevPi DI is 2 kHz (corresponding to 500 Hz encoder sequence).
Best Regards

Ulrich Kouatang Biakoup | Technical Support
brahimdjadir
Posts: 2
Joined: 27 Dec 2022, 09:49

Re: DI input counter problem

Post by brahimdjadir »

u.biakoup wrote: 28 Dec 2022, 11:06 Hello Brahimdjadir,

please see this video tutorialhttps://revolutionpi.com/tutorials/video-tutorials/ Number #14. It's show how to use counter and Encoder for RevPi DIO. It will be the same for RevPi DI.
The maximum frequency resolution of the counter inputs for RevPi DI is 2 kHz (corresponding to 500 Hz encoder sequence).
Best Regards

Ulrich Kouatang Biakoup | Technical Support
Thank you for your response Biakoup
I did not have a problem with DI usage and configuration I tested the DI module with a button and it increments without problem, When I try to read sensor data the DI counter does not increment so I try the pulse counter mode of the MIO module and it is working without problem I want to know what is the difference between DI counter mode and MIO pulse in mode and why the di does not count when using pulse sensor.
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: DI input counter problem

Post by nicolaiB »

How does your signal looks like? What's the peak voltage? Do you have a scope at hand and can make a picture of the signal?

Nicolai
Post Reply