05-06-2011 07:43 AM
Hi all,
maybe a newbie question but I did not find an exact answer so far.
I have two signals.
A slow one which I want to use as start/stop trigger and a fast one from which I want to count the edges.
I want to measure the count of edges of the fast signal occurring between two rising edges of the slow trigger signal.
I read the two edge separation help and examples and always found three signals needed.
So my question.
Is it possibel to use two edge separation with only two signals and conncect the slow one (trigger)
to both GATE and AUX ?
Or maybe anyone can tell me how to accomplish this measurement task best.
Thanks a lot for any help,
Ralf
Solved! Go to Solution.
05-06-2011 10:27 AM
Since a picture's worth a thousand words, here, try something like this:
Here's the idea:
1. Counter is configured for period measurement with units set to Ticks. Normally this would register the # of edges of an internal timebase clock between consecutive edges of the pulse train whose period is being measured. Here we are overriding the normal behavior a little bit.
2. Note the DAQmx Channel property node. We are going to tell the task to count your faster pulse train *instead* of counting an internal timebase clock.
3. In period mode, the count will reset to 0 on each cycle of the period signal. So you'll get a buffer of values telling you how many faster pulses occurred between *every* consecutive pair of slower pulses.
4. We'll ignore element 0 of the array because its value will be fairly random, representing the time from when the task started until the 1st period edge. It's very often not meaningful.
-Kevin P
05-10-2011 07:54 AM
Hey Kevin,
thanks a lot. Works perfect.
You really helped me out,
Ralf
07-14-2022 10:10 AM
I'm also working two edge separation with two signals measuring/plotting delta T between two rising edges. How do I change the acquisition rate? Right now I count 30 samples/second on the output spreadsheet. I need at least 200 kHz.
07-14-2022 12:11 PM
Please post your code, preferably after File->Save For Previous Version back several years. 2016 maybe?
My guess is that you have a software-timed "on demand" task and then starting and stopping it each iteration of your main loop. You need to configure a buffered measurement with DAQmx Timing. You can get a pretty good head start with the shipping example "Counter - Read Pulse Width and Frequency (Continuous).vi"
-Kevin P
07-14-2022 12:45 PM
HAHA I just saw your reply on this thread while I was sending you a question (same topic) on another thread where you will find the VI and a sample of the data. You must be THE guru! Thanks again so much for your help. Let me know if you need any other information from me.
07-14-2022 04:14 PM
Followup is over in the other thread you linked where there's more history and context.
-Kevin P