Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter source

Solved!
Go to solution

Hello friends,

I need some help. I am trying to determine the time between each pulse emitted by an output of the USB-6351 card on my test bench.

To be more specific, this test bench emits an output signal from an external source in the form of a Gaussian pulse [5V;0V] around 10kHz. As soon as the card detects a signal edge, it sends a pulse signal to the output to activate a device. I want to know the time between each pulse emitted by the card. Do you know how to do this?

To make things easier, I have attached the corresponding vi to this message.

Do I need to put a loop and read the signal? Is there an existing function for this?

If you have the answer or a starting point, I'd love to hear it!

Best regards

 

0 Kudos
Message 1 of 5
(128 Views)

Can you explain the meaning of a "Gaussian pulse at 10kHz"? Do you have 10k pulses per second? Is the 10kHz a carrier frequency?

0 Kudos
Message 2 of 5
(100 Views)

Good question!

My signal will be similar to the one attached to the email. It is a square wave distributed around 10 kHz.

But the shape of the signal doesn't matter. A continuous square wave with a frequency of 10 kHz is sufficient to test the program.
I would like to measure the time between each input signal in order to determine the characteristics of the source. But I don't know how to go about it. Using a loop with a timer? Or is there another, more accurate solution?

Screenshot from 2025-08-21 14-07-13.png

 

0 Kudos
Message 3 of 5
(77 Views)
Solution
Accepted by topic author did.rider38

You're in the right place (the Counter/Timer forum), but on the wrong track (code shows an output task rather than a measurement task).

 

Try starting from the shipping example named "Counter Read Pulse Width and Frequency (Continuous)" and choose the tab for Period measurement.  That will measure all the interval times between consecutive rising edges of the external frequency.  (If you need to measure between falling edges, you can wire that up in the block diagram to override the rising edge default.)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 4 of 5
(69 Views)

Thanks Kevin_Price !

It's the good solution ! Thanks for your help !

0 Kudos
Message 5 of 5
(47 Views)