09-19-2006 03:42 PM
09-20-2006 03:47 PM - edited 09-20-2006 03:47 PM
Message Edited by Kenn N on 09-20-2006 03:48 PM
09-20-2006 05:01 PM
Hi Kenn
Thank you very much for your reply . I have seen this example. But it doesnt clarify the questions I have.
My objective is to count the edges of the source (later will be an APD) taking the gate into account. But the counts should not be cumulative. I want to do the edge counting of the source taking both the high and the low frequency of the gate and buffer the edge counts of the source at every rising edge of the gate (Pause trigger will not work because I need to count the edges at both the rising edge and falling edge fo the gate ).
Should I have to use the period measurement in this scenario ?
In my Example the Counter6 which generates the continuous pulse (stimulates the APD) which is connected to the Counter 5's input (30 KHZ). For testing purpose I'm using another counter 7 (10 KHZ) which generates continuous pulse output connected to the gate of Counter 5 .
In this case if I use the period measurement what will be my measurement time?.I'm not clear with the following statement in your reply
" The period of the gate signal is then calculated by multiplying the count and the source period. ".
How will I know the count because thats what I want to find . What will be the source period ? .I think I'm missing something.
Can you please clarify.
Thank you
Murugan
09-21-2006 03:28 PM
09-22-2006 03:04 PM
Hi Kenn
Thanks for your explanation.
I have a unknown source(I dont know the count or the source period). The gate is a known signal of 10KHZ. I need the non cumulative count of the edges in the source with reference to the gate.
Question 1 :Should I make use of the period measurement in this case ?
Question 2: If period measurement is the mode I have to go for what will be the measurement time parameter in the create period measurement in the above scenario? Is it 1/10KHZ ?
Can you please answer these questions?
Thank you
Mullai JK
09-22-2006 03:50 PM
I have a unknown source(I dont know the count or the source period). The gate is a known signal of 10KHZ. I need the non cumulative count of the edges in the source with reference to the gate.Question 1 :Should I make use of the period measurement in this case ?
Question 2: If period measurement is the mode I have to go for what will be the measurement time parameter in the create period measurement in the above scenario? Is it 1/10KHZ ?
Answer 1: Yes, to measure non-cumulative counts per sampling interval, period measurement is the correct choice. The "gate signal" can be thought of as a "sampling clock". What's being sampled is the value in the count register. That value increases with every input "source" edge. In period measurement mode, the counter hardware resets that count back to 0 on every "gate" edge.
Answer 2: Dunno the syntax for your programming environment -- I only know LabVIEW. But the calculation would be (1/10 kHz) / (counts per interval).
Answer 3: Based on your 30 kHz source signal example, you may end up with a lot of quantization error. If your source signal is nominally, say, 5 times the freq of your gate signal, you could reasonably expect to see period values of 4,5, and 6. These in turn will suggest periods of 25, 20, and 16.667 microseconds, a fairly large quantization effect percentage-wise. Just an FYI.
Answer 4: If your external Source signal may occasionally drop to a frequency lower than the Gate signal, you may also need to look into setting up "Duplicate Count Prevention." It's a topic that has come up quite a bit here so you should be able to get a bunch of search hits.
-Kevin P.
09-22-2006 04:00 PM
09-25-2006 03:11 PM
Hi Kenn and Kevin
Thanks for your explanation. It worked with 2 counters.
One thing that bothers me is even if I ignore the gate signal but specify the measurement time (i.e) 1/Gate frequency alone in my period measurement function it counts the number of edges in the unknown source based on the measurement time given. But I still use 2- counter high frquency measurement. Is this another way of doing it ?
One Counter:
Source: Unknown frequency .
Gate : nothing
task.CIChannels.CreatePeriodChannel("/Dev1/Cntr1,
"BufferedEventCounting" , .000000025, 53.6, CIPeriodStartingEdge.Rising, CIPeriodMeasurementMethod.HighFrequencyTwoCounter, .0002, 4, CIPeriodUnits.Ticks);where .0002 is the measurement time which is 1/Gate frequency.
Thanks
Murugan.
09-26-2006 10:12 AM
09-27-2006 10:57 AM
DaqSystem
.Local.ConnectTerminals( "/Dev1/Ctr5Gate","/Dev1/PFI8");to connect Counter 5's gate to Counter 7 output. Is this correct ?
I also wanted to internally connect the counter 7 output to another counters gate.
What is the syntax for it? If I do the connect terminal it says the resource is reserved.
I couldnt find enough information in the .NET C# help. The help doesnt give the picture of what can be done. It just gives the bits and pieces we have to do a serach and fill the rest.
What does the yellow boxes in the device routes specify ?
Thanks
Murugan