Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get rid of OverFlow Error?

Hello,
Why am I getting overflow error  at RPM > 1500? I have two counter tasks to measue RPM. I am asking for 72000 samples, so the read NI command will acquire that many samples, flush and refill automtically without the need for me to do any house keeping on the buffer ? I am getting err 200279, I know the Buffer size is big enough. I  saw somewhere something about using Relative to and offset to take care of Overflow problems ? Does anyone know how I could use that?
I used the following to overwrite, but it didn't seem to work. Does anyone know why this won't overwrite overflow?

DAQmxErrChk (DAQmxSetReadOverWrite(m_taskHandle2, DAQmx_Val_OverwriteUnreadSamps));

DAQmxErrChk (DAQmxSetReadRelativeTo(m_taskHandle2, DAQmx_Val_MostRecentSamp));

DAQmxErrChk (DAQmxSetReadOffset(m_taskHandle2, 0));

Thanks

0 Kudos
Message 1 of 3
(7,491 Views)

I need some more information form you: What DAQ card are you using? How many pulse you should have in one revolution when the RPM is equal to 1500? Are you building your task from scratch or are you using one of the shipped examples? You might want to take a look at How to ignore DAQmx overwite error 200279?.  Is it possible for you to include your code as an attachment?

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 2 of 3
(7,459 Views)

Search your computer for “MeasDigFreqBuffCont_LargeRange2Ctr” it is an example that you should have already install since it comes as part of the NI DAQmx drivers.  It might give you different approach on how to measure RPM.  I would like to clarify what is your input to the counter (i.e. encoder)? Why are you setting up two counters?

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 3 of 3
(7,447 Views)