Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Does the SOURCE signal must be a period signal?

Hi
I am using a 6602 broad for counting events
I wanna count the random signal(B) in each period of an period-signal(A), from a specified time.
The first plus of the signal B trigged the counts.

So I set signal B as the gate, and set signal A as the SOURCE. The mode is "bufferd period measurement".
But the error 10920 always occurs, and the counts have recorded are totally wrong.
When I set signal A as the GATE, and set the internal timebase as the SOURCE, the error disappears.
But using this setting, I cann't specified the trigger time.

So, is my error caused by setting the random signal as the SOURCE ?

How can I imply all my request.
0 Kudos
Message 1 of 4
(3,443 Views)
Shireman

When you say the "mode" is "buffered period measurement", do you mean that the program you are using is the example program "Measure Buffered Period"? If I understand your question correctly, this example program should be applicable to what you are trying to do.

The "Measure Buffered Period" example program has the following description:

DESCRIPTION:
This VI counts a series of pulse periods and stores them into a buffer, using an NI-TIO based device (e.g.: 6602). The counter increments its count everytime a pulse comes into its source input, and transfers that value to memory upon every time a rising edge comes into its gate input. After the counter value is stored in memory, the counter is reloaded with a zero. The data in memory is rea
d continuously in the while loop, until the Stop button is clicked or an error occurs.

So if you want to measure the number of pulses of signal B in one period of signal A, you would wire signal B to the Source, and wire Signal A to the Gate.

Russell G.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,443 Views)
Thank you very much. Mr. Russell

Exactly as you say, I use the example of "Measure Buuffered Period". But there is something strange: when I set the Internal Timebase as the source, the frequency is 20MHz, everything runs right. But when I use signal B as the Source, whose frequency is about 10kHz, 10920 error occurs. I know that error occurs when the DMA bus is busy. But my question is why this doesn't happen when I use the Internal Timebase, whose frequency is much higher than the signal B. Is the reason is the signal B is not a period signal? So what can I do?
0 Kudos
Message 3 of 4
(3,443 Views)
What is the frequency of your Gate signal? Due to the source time base limitation, the gate signal must have a pulse width of at least (1 / source frequency). For example, if using the time base of 10 kHz as the source, the gate pulse width must be greater that 100us in order to register a count. Since your source signal is not periodic, I would recommend a gate signal of much less than 5 kHz.

Do you get the same behavior if you use a different counter?

Here is a link that has more information on this error. You may have a noisy source signal.

Russell G.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,443 Views)