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