Timer/Counter peripheral

Topics about the Hardware of Revolution Pi
Post Reply
contradict
Posts: 1
Joined: 24 May 2024, 00:02

Timer/Counter peripheral

Post by contradict »

I have two applications that I couldn't figure out how to support with available IO modules.

First, I would like to be able to trigger pulses on a digital output with a configurable duration between 10ms and 500ms. I currently use the "timer" feature on a different PLC to accomplish this and couldn't find an equivalent here.

The other thing that would be convenient is measuring frequency. Many volume flow meters output a signal whose frequency is proportional to flow rate. I found some examples of counting pulses, but it is not clear what the maximum count rate is (I need ~2kHz) or how to add timestamps to turn the count into a rate.

What is the right way to accomplish pulse timing or frequency measurement with RevolutionPi hardware?
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Timer/Counter peripheral

Post by dirk »

Unfortunately, it's always difficult to answer questions relevant to liver science performance without having the system in hand. However, I can tell you that, unfortunately, PiBridge communication does not currently allow you to implement your idea. There is the variable "revpiiocycle" which contains the cycle time in whole milliseconds without rounding. I can recommend you to read this article:
Measuring analog data with the RevPi AIO module
The topic is discussed there.
Post Reply