LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric Indicator adds 1 when LED is activated

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)

0 Kudos
Message 1 of 3
(229 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(217 Views)

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

 

 

 

0 Kudos
Message 3 of 3
(197 Views)