09-04-2007 02:26 PM
DAQmxCreateTask(
"Position",&NI_taskHandle);DAQmxCreateCIAngEncoderChan(NI_taskHandle,
"Dev1/ctr0","",DAQmx_Val_X4,TRUE,0.0,DAQmx_Val_AHighBHigh,DAQmx_Val_Ticks,1024,fTicks,"");DAQmxCfgSampClkTiming(NI_taskHandle,"/Dev1/PFI34",1000.0,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1);
2. What is the reason for the Error Code -200141
(Data was overwritten before it could be read by the system. If Data Transfer Mechanism is Interrupts, try using DMA. Otherwise, divide the input signal before taking the measurement)
Thank you for our help!
09-06-2007
03:10 AM
- last edited on
09-19-2025
10:05 AM
by
Content Cleaner
Hello NITester,
There are functions to enable or disable the digital filters for counter/timer devices in NI-DAQmx see the NI-DAQmx C Reference Help at Start » Programs » National Instruments » NI-DAQ (DAQmxSetCI*).
Look at the following link:
Enabling the Digital Filters for Counter/Timer Devices in NI-DAQmx
The error that you are receiving indicates that the software circular buffer of the counter task is full and therefore previous samples were overwritten causing a loss of data. The software buffer size is directly dependant on the mode of operation as well as the acquisition rate. The actual buffer size can be found on page 2-8 of the NI 660x User Manual, which can be found here:
User Manual NI 660x
So, part of the troubleshooting process is to find out what rate you are sampling at and if you are doing finite or continuous sampling on the counter task. This will help us determine what size buffer you currently have and thus if it is likely that we are overflowing this buffer.
Let us know your findings and we will be happy to help you further.
Have a great day!
Applications Engineer
Benjamin