Increment a Counter Bit based on threshold criteria

  • Software
  • Increment a Counter Bit based on threshold criteria
Xander Goldstein

Posted on 28.09.2021 21:15

I am trying to use my IOLITE to monitor voltage from a battery pack, I have it set to an IOLITE-LV analog input and have the nominal +6V recording on the monitor. What I'm trying to achieve is that I need to count how many times during the test the voltage drops below a defined value. What would be the best way to calculate this and display the "count" number? Thank you.

Gregor Šmit

Posted on 30.09.2021 12:57

Dear Xander,


thank you for contacting us. In the attachment is a data file with an example. Formula to count the number of times the signal is below 0.5:

ecnt(edge('signal'<0.5)

When a signal is below 0.5 the edge function returns 1 and the ecnt function counts the edges. In the attached example a sine wave is used and the predefined value is 0. The counter value is displayed on a digital meter.



Kind regards.


Attached files:
Xander Goldstein

Posted on 30.09.2021 15:46

@Gregor Šmit

Thank you! that will definitely get me in the right direction.

Login to reply to this topic. If you don't have account yet, you can signup for free account .