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
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
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?