ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Counter (BOOL)

Hello, I am trying to count the number of times a signal goes from 0 to 1 from a digital input (cDAQ 9375).  Seems like an event structure is perfect for this, but once I started experimenting with the concept using (value signaling) property node, it doesn't work.  I've attached what I have so far as a first attempt, if anyone has a better idea or can explain the best way to count state changes from a DOUT IO card I'd appreciate it.

0 Kudos
Message 1 of 3
(1,508 Views)

Events are for user interactions and having a value change event that fires with each iteration is pointless (signaling properties fire even if the value does not change!).

 

Since you are polling a DI, you don't need any event structures at all. Just use a feedback node that increments whenever the boolean goes from false to true.

 

A counter should be blue, not orange. Why is there a timeout event if you are not using it?

0 Kudos
Message 2 of 3
(1,494 Views)

See if this can give you some ideas...

 

 

altenbach_0-1692648923238.pngaltenbach_0-1692648923238.png

 

0 Kudos
Message 3 of 3
(1,490 Views)