PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Analog Acquisition problems

I have some problems with sound application. My program continuous acquires sound

signal and puts the samples to the output immediately in C language with Windows XP

operating system. I am using two PXI-4461 modules and the controller is 8109. The

sample rate is 8000 and the number of samples to read and write per iteration are 200.

And the problem is my program can't run for a while. After a few minutes, the program

fails and returns the exit error that the read buffer overflow or write buffer

underflow. In addition, the delay between the input and output should be within 100 ms.

Is there anything I can do to solve this problem?

0 Kudos
Message 1 of 4
(4,129 Views)

Please help me!

0 Kudos
Message 2 of 4
(4,094 Views)

@ocean9 wrote:

I have some problems with sound application. My program continuous acquires sound

signal and puts the samples to the output immediately in C language with Windows XP

operating system. I am using two PXI-4461 modules and the controller is 8109. The

sample rate is 8000 and the number of samples to read and write per iteration are 200.

And the problem is my program can't run for a while. After a few minutes, the program

fails and returns the exit error that the read buffer overflow or write buffer

underflow. In addition, the delay between the input and output should be within 100 ms.

Is there anything I can do to solve this problem?


Are you using LabVIEW for the code or C? Mainly overflow of data happens when you didn't properly handle arrays and queues. Can you explain the code you have done?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 4
(4,090 Views)

I wrote it in C language, the coding is in the attachment.

I have tried a lot of methods to solve this problem, such as return function, for() loop,  and write and read in different threads, and I found for() loop had the best performance but still all of the methods I tried in my program can't run for long time, After a few minutes, the program fails and returns the exit error that the read buffer overflow or write buffer underflow.

 

Hope for your help.

Thanks

0 Kudos
Message 4 of 4
(4,083 Views)