Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

measure pulse width with 4 counter simultaneously

Hello,

 

I am using NI PCI-6601 measure the pulse width with 4 counter simultaneously, due to only a DMA channel on this card so I selected interrupt data transfer mode to read data from PCI bus for 4 counters, but it working only for few seconds then a error message prompted:

 

Error -200141 occurred at DAQmx Read (Counter 1D DBL 1Chan NSamp).vi

Measurements: Data was overwritten before it could be read by the system.......(See attached picture: TestUI and Error MSG.bmp)

 

I know the problem caused due to system is unable to read back data from PCI6601's memory as fast as they card countered. My quesition is:

1. The timebase is 20Mhz(Sample rate), how to change the sample rate slower (like 100Khz) ?

2. Any good solutions can meet my requrement?

 

Attached is my source code, Test.vi is the main VI.

 

Thanks for your help.

Steven

0 Kudos
Message 1 of 3
(5,854 Views)

Hi Stephen, you should increase the number of samples per channel in DAQmx Read VI.

0 Kudos
Message 2 of 3
(5,846 Views)

What's more, you could include four channels in one task, so you don't need to build four task!

 

0 Kudos
Message 3 of 3
(5,844 Views)