RevpiPyload send_on_event message rate & sensitivity

Moderator: RevPiModIO

Post Reply
benaodisee
Posts: 14
Joined: 14 Apr 2022, 15:03

RevpiPyload send_on_event message rate & sensitivity

Post by benaodisee »

Hi,

Maybe a silly question, but I was wondering what the sample-rate/message-rate is when sending message with MQTT using Revpipyload if send_on_event is enabled?
And which change in input will trigger such an event?

For clarification:
  1. An analog input is currently at 123mV and rises to 124mV => Will an event be triggered?
  2. An analog input is currently at 123mV, rises in an instant to 9000mV and 10 milliseconds after drops to 6000mV => Will an event be triggered (and thus a message be sent) for both values?
User avatar
RevPiModIO
KUNBUS
Posts: 325
Joined: 20 Jan 2017, 08:44
Contact:

Re: RevpiPyload send_on_event message rate & sensitivity

Post by RevPiModIO »

That's not a silly question!

The default cycle time on a multicore RevPi (everything except the Core 1) is 20 ms! And that is the detection rate, too!

So:

1) Yes, if the value changes from 123 to 124, we have an event, same thing in the other direction.
2) No, the internal detection rate is 20 ms (maybe we could crate an update to switch it to 10 ms), so 123 to 9000 and back to 6000 in 10 ms will throw an event after another 10 ms with the value 6000.

Keep in mind, the piBridge's cycle time is about 10 ms, if you use an AIO check "ADC_DataRate" (piCtory) to fit the 10ms if needed.

Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
benaodisee
Posts: 14
Joined: 14 Apr 2022, 15:03

Re: RevpiPyload send_on_event message rate & sensitivity

Post by benaodisee »

Thank you for the clarification, it's crystal clear now :D
Post Reply