Page 1 of 1

Timer/Counter peripheral

Posted: 24 May 2024, 00:23
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?

Re: Timer/Counter peripheral

Posted: 27 May 2024, 15:30
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.