08-27-2009 08:27 AM - edited 08-27-2009 08:37 AM
I'm using PCI-6025E board which is supposed to acquire data to HDD at around 50Hz. This data rate is checked every 5 ms and calculated by this formula
SetTimer( 1, DATA_RATE_TIMER*1000, NULL );
...
fDataRate = (float)( ulRecordTraces - ulPrevWaveCount )/(float)DATA_RATE_TIMER;
DATA_RATE_TIMER is 5. So it calculates how quickly it stores data into HDD. In DAQ, it does at 50Hz. But in DAQmx, it does only at 25Hz.
In case of using a continuous sampling mode, it slowed down to 16Hz. Now I'm using 25Hz with a finite sampling mode. Just after a trigger on PFI0 is appeared, it acquires AI with external DMI counter on PFI3 pin. This DMI is used to check how fast a service vehicle is moving and how long it drives. In DAQ, it can provide up to 348 MPH or more speed for airborne service with 50Hz, but the data rate is too slow with DAQmx; it can't do it now. Due to slow data rate, it can't provide a precision-high resolution data even if the service vehicle can move fast as usual.
I wonder DAQmx is somehow lagging in AI operation with counter tagging. If I disable start trigger on PFI0, it can go up to 27Hz. How can I fix this? Do you have any idea to increase AI rate?
Thanks,
08-28-2009 04:11 PM
Anarkie,
Thanks for posting the issue on the forum. I understand that you are trying to save the data at rate of 50 Hz to your Hard-Drive, but I am unsure about the calls you are using to save the data to disk. It appears as though you are calculating the time correctly, but I do not believe that the problem lies with the code you listed. Could you attach the code that you are using that collects the data from the 6025E and the code that saves this data to the Hard-Drive. This will help us determine where the problem lies. Thanks!