|
|
| Author |
Message |
kbuckle Newbie
Joined: 10 Nov 2006
Posts: 1
|
Posted: Fri Nov 10, 2006 4:46 am Post subject: Incredibly slow data rates with USB adapter compared to LPT1 |
|
|
Hi
I been successfully using an ADC100 via the parallel port (LPT1) for collecting and processing large datasets. Each reading consists of 200 averaged samples and needs to be acquired to the PC in realtime, i.e. it has to keep up with an external pulse, with up to 50 readings per second. This should theoretically be easy to achieve (with the quoted 2uS acquisition time) and was working fine via the LPT1 port. However I now need to migrate the software to run via the USB adapter and have hit a serious problem.
The unit can only return me 2 readings every second (compared to 50 previously)! Is there something really obvious I am missing here? A clue might be that with the USB adapter it also takes up to 5 seconds to complete the AC100_open_unit call and takes even longer to complete the ADC100_close_unit call (both are almost instant with the LPT1 version).
Here is the test code used for the USB version. It's C++ code but should be easy enough for anyone to read. The EndDataCollection is just a boolean flag triggered by a button press to end the collection loop. I've left out the rest of the AppendRecord line (its just adding the reading to a clientdataset).
| Code: | ADC100_open_unit((short)101);
while (!EndDataCollection)
{
NextReading = (float)ADC100_get_combined_values(0,0,200);
// Add reading to dataset
cdsData->AppendRecord( ...... ) // Full code omitted for clarity
// Listen for events, i.e. 'End' button press
Application->ProcessMessages();
}
ADC100_close_unit((short)101); |
I use exactly the same code (with the 101 ports replaced with 1) for the LPT1 version and it howls along.
Anybody able to shed any light on this for me?
Thanks
Kevin |
|
| Back to top |
|
 |
Michael Guru

Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire
|
Posted: Thu Nov 16, 2006 11:54 am Post subject: |
|
|
Hello Kevin,
Not quite sure what is going on here. I will pass this to one of our software engineers.
Best regards,
Michael |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|