Test and Measurement Forum

Incredibly slow data rates with USB adapter compared to LPT1

Post general discussions on using our drivers to write your own software here

Incredibly slow data rates with USB adapter compared to LPT1

Postby kbuckle » Fri Nov 10, 2006 4:46 am

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: Select all
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
kbuckle
Newbie
 
Posts: 1
Joined: Fri Nov 10, 2006 4:30 am

Postby Michael » Thu Nov 16, 2006 11:54 am

Hello Kevin,

Not quite sure what is going on here. I will pass this to one of our software engineers.

Best regards,
Michael
Michael - Tech Support
Pico Technology
Web Support Forum
Michael
Zen Master
Zen Master
 
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests