04-17-2024 12:19 AM
Hello!
I'm a beginner with labview, and I am trying to create a program that tracks the number of times an object passes an IR sensor (done using an NI-DAQ). Currently, I have a program that activates an LED when the sensor is passed, however when I have tried to then add an indicator for the amount of times it has been activated, the number has been increasing exponentially for when the LED is on, rather than just adding 1 to the number.
I know that this is probably just from my lack of knowledge, and I've been looking for hours to find a solution, but cant see where I have gone wrong (probably a small silly thing).
I have attached the VI, and would really appreciate some help. (hope the file opens, haven't done this before)
04-17-2024 12:57 AM
Hi mmrooke,
mmrooke04@gmail.com wrote:
when I have tried to then add an indicator for the amount of times it has been activated, the number has been increasing exponentially for when the LED is on, rather than just adding 1 to the number.
Hint: you don't want to add 1 each time the "LED is on" (aka boolean signal is TRUE), but only when the "LED switches on" (aka there's a rising edge in the boolean signal)!
One more hint: LabVIEW comes with a PtByPt-BooleanCrossing function…
04-17-2024 01:44 AM
Thanks for the fast reply,
Thank-you so much for your help, I was able to get it working after learning how the PtbyPt boolean-crossing function worked. I didn't even know it was a function, so thank-you so much.
Have a great day