09-05-2007 10:30 AM
09-05-2007 02:12 PM
Dear Jens,
How many channels are you trying to read in and write at the same time? Multiple samples reading and writing will decrease your maximum sampling rate depending on how many samples you use at one time.
Michael Boyd
09-06-2007 02:22 AM
Dear Michael,
Currently I'm trying to read in 1 channel at one sample at a time.This in order to test the highest achievable samplingrate, if this is high enough then I will implement the the write function and add 2 more channels. So in total it wille be 3 channels read and write.
I'm aware that adding more samples and channels will decrease the sampling rate, but I didn't expect that it would be this low (1666Hz) at only 1 channel 1 sanple at a time.
Are you familiar with this problem?And do you maybe have a solution or another way to work around this problem?
Best Regards,
Jens Dassen
09-06-2007 10:23 AM
Jens,
Just a few suggestions:
1) Add code to allow for a few warm-up iterations. This will allow your machine
to bring all the necessary code and data into the CPU cache and not be forced
to survive the initial hit of reading all of it from system RAM.
2) Make sure Legacy USB support is disabled in the BIOS. The BIOS support for
Legacy USB will cause very large interrupts that will keep your single-point
rates down.
3) Try with and without the "data" Shared Variable in the loop, just to get an idea of
how much that is costing you.
4) Remove both indicators from the loop, as this can cause the app to switch to
the UI thread to handle the UI updates.
5) If possible, set your Ethernet driver to work in polling
mode, therefore improving determinism by getting rid of interrupts used for Ethernet-packet
handling. This can be done through MAX.
Alejandro
09-07-2007 03:40 AM
Dear Alejandro,
Thanks very much for the usefull suggestions. I will implement them and feedback the results.
Best Regards,
Jens Dassen
09-13-2007 10:00 AM
Dear Alejandro,
I implemented the suggestions you made. They were very helpfull and imporved the sampling rate. Especially the suggestion of the warmup iterations. This improved the sampling frequency from 1,6 kHz to roughly 16 kHz.
With all the suggestions I now have a maximum samplerate of 19kHz on a pentium 733 Mhz, 256 MBram. I'm still working on improving the speed of the system so maybe I can get higher samplerates than 19 kHz. If you still have some suggestions, they are very welcome.
Thanks for your support,
Best Regards,
Jens Dassen
10-05-2007 10:26 AM