Hi,
I am using a PCI-6602 card and I need to sample the card every 200 millisecond.
According to the "MeasDigFrequency_LowFreq1Ctr" example, I have implemented a code that samples the frequency continuously.
My problem is that if I set the variable SamplesPerChannel to be 1, when my frequency is 1 KHz, I receive many callbacks which is too much and affects the performance. If I set SamplesPerChannel to 20, and the actual frequency is 2Hz, I receive callbacks every 10 second which is not enough.
I try to use another method, according to the "CountDigEvents" example, I have implemented a code that read every 200 millisecond the numbers of event that occur in that period of time (which is supposed to be equal to the frequency). However, I cannot calculate exactly the frequency due to windows clock accuracy.
- Is there a way to set the SamplesPerChannel dynamically? (when the task is already running)
- Could I read every 200 millisecond all the samples (frequency) that are arrived from the last point of my last reading?
Thanks,
Simon.