LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error in counting.

Hi,
I am using the measure buffered period vi from LV 6.0 to measure the time averaged period of a square wave. I am using the signal as the gate and the internal clock as the timebase with a frequency of 100KHz. The problem i am having is that the VI does not produce the right output. About 60% of the time the value is right but the other 40% it is wrong and it seems that it is missing a pulse from the signal and counts double the period/ half the frequency. I am not sure why this is happening. Also this error gets worse as i increase the time base. I have grounded the signal appropriately so that shouldnt be an issue. Is there any way to rectify it? Is there some technique using the other counter i have on the board (pci-6052e) to resolve this.
Thanks in advance,
Shyam Menon.
0 Kudos
Message 1 of 3
(2,725 Views)
I think you need to post either a code example of a picture of your block diagram (No BMP please :p).

That way we can have a look at what's actually going on and maybe at least find out if it's a hardware or software problem.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 3
(2,708 Views)
Hi Shane,
I should have done this before but i am posting a section of my code now. The top parts are about scanning the analog channels connected to my scxi 1120 module and the bottom part is for scanning the counter pin. Since i read the pci-6052e has 3 dma modules, i shouldnt hopefully have problems with data transfer. Another thing i found is that i need to have sufficient delay time in the read buffer vi so that all the data gets written to the file otherwise i am missing some of the data. Hope this helps you to understand my problem better.
Thanks,
Shyam.
0 Kudos
Message 3 of 3
(2,696 Views)