Very slow data acquisition
Posted: Mon Mar 20, 2017 10:29 pm
Hi community!
I want to use the 2 high speed ADCs to simultaneously acquire samples from the 2 high speed inputs. After acquiring e.g. 16384 samples I want to set a few GPIOs and sample again. It is important that the time gap between those 2 shots is very small.
My first approach was using the SCPI application. I tested the provided Matlab example script and got the sampled data. I modified the script and inserted a loop where i sampled 10 times in a row. I made sure to not include the pause for filling the sample buffer. The problem is that each acquisition of 16384 samples needs approximately 1 second.
My guess was that matlab, the network communication or the conversion from string to numeric data was the bottleneck. So I tried the example program in C (Examples/C/acquire_trigger_software.c ). Unfortunately this program isn't really faster. Of course i removed the pause(1) and also the command line output.
Finally I tried the acquire tool in Test/acquire/acquire.c. Unlike the other two programs this was very fast.
Why is there such a high difference in speed? Is there a way to speed up the scpi server approach because that would be my favourite if it's fast enough?
Thanks in advance!
I want to use the 2 high speed ADCs to simultaneously acquire samples from the 2 high speed inputs. After acquiring e.g. 16384 samples I want to set a few GPIOs and sample again. It is important that the time gap between those 2 shots is very small.
My first approach was using the SCPI application. I tested the provided Matlab example script and got the sampled data. I modified the script and inserted a loop where i sampled 10 times in a row. I made sure to not include the pause for filling the sample buffer. The problem is that each acquisition of 16384 samples needs approximately 1 second.
My guess was that matlab, the network communication or the conversion from string to numeric data was the bottleneck. So I tried the example program in C (Examples/C/acquire_trigger_software.c ). Unfortunately this program isn't really faster. Of course i removed the pause(1) and also the command line output.
Finally I tried the acquire tool in Test/acquire/acquire.c. Unlike the other two programs this was very fast.
Why is there such a high difference in speed? Is there a way to speed up the scpi server approach because that would be my favourite if it's fast enough?
Thanks in advance!