LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

counter problem

Hi, I´m using the two counters of my PCI6036E für simple event counting. I
count the rising flanks of a TTL signal coming out of a Leybold energy
analysator. My problem is that, ever when I open another application next to
my measuremnt executable or browsing the network or simply doing something
else with the PC (Athlon XP 1700+) than the counters get wrong values. So
the recorded spectra look like this (see the link below). So every programm
I open and every folder I browse produce spikes in spectra. How can I
prevent my counters from counting wrong values.
My programs is adapted from the example "Count Edges (DAQ-STC)". The
programm is written with Labview 7.1.1 but the problem is also reproducable
in LV6.1 and 7.0.

http://www.pe.tu-clausthal.de/~pesba/download/niforums/counter.jpg

Thanks for your comments

Greets

Stephan


0 Kudos
Message 1 of 2
(2,582 Views)
Hello Stephan,

In general, counter operations are performed in hardware on the counter chip, that means that something that happens in the operating system does not have influence on the way the counter works istelf.
But it may have influence on the VI that is reading the counter register. Depending on the way you program, if windows is just occupied with some other job to do, the vi may fail to read the counter register at the desired time, thus missing a sample - at the same time the counter register is not reset to zero and the next reading will be a higher count as you normally would expect.
You can prevent effects like this by using buffering. Its just the same procedure as for analog input - buffering prevents that you are losing samples. Have a look at examples like "count buffered edges" and I am sure you will see better results.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 2
(2,562 Views)