From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Raise event every time a counter counts up/down

I need an event that gets raised everytime a counter counts up. For this purpose my first thought was the same es described here in the initial post: http://forums.ni.com/t5/Measurement-Studio-for-NET/Event-on-Counter-Rising-Edge/m-p/708965/highlight...

 

However, I somehow dislike this approach because it's bascially a hack for a very simple function. So, my question is: Is there a chance to register an event that gets raised everytime the counter counts up so that I can poll the current count value of the counter at this moment?

0 Kudos
Message 1 of 3
(4,238 Views)

Hi!

 

your question is a bit unclear to me.

Have you tried the approach and failed?

What exactly is the problem with the approach (register event) (I refer to the example "Gen Event for Ext Signal.vi" in the thread you linked)

How many events per second you would like to generate at maximum speed?

 

Best regards

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 3
(4,181 Views)

Hi, lcm0

 

Have you seen this help topic? http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/usingdaqevents/ (Using NI-DAQmx Events).

 

You might be able to make use of the DigitalChangeDetection event, if your device supports change detection. What hardware are you using? If you choose to go with this approach, you would need to set up a change detection task, and you may need to configure your hardware with a jumper wire between the digital input and your PFI line. 

 

Another option might be to make an analog input task, specifying your digital signal as the sample clock. Then you could use the SampleClock event.

 

Ultimately, what would you like to accomplish by responding to this rising edge event? 

 

Thanks,

Daniel Dorroh
National Instruments
0 Kudos
Message 3 of 3
(4,170 Views)