02-11-2014 03:52 AM
Hi
I'm using a CY7C68013A to stream ADC data to a PC.
On the PC side I'm using a visa Driver (generated by the NI-VISA driver Wizard) and using USB RAW, I'm able to start transferring data to the PC.
Trying to speed up the streaming, I'm using 3 Visa reads in parallel (3 different while loops)) feeding the data to a queue, but it does not seems to have any impact (when compared to a single VISA read)
The ADC is generating about 8.6MBytes/Sec.
Any suggestion?
Thanks in advance
02-11-2014 04:47 AM
Your read is a Control pipe, Bulk pipe or what?
02-11-2014 05:03 AM
Hi
I'm using Bulks..
(Code attached)
02-11-2014 05:20 AM - edited 02-11-2014 05:22 AM
can only suggest two things.
1) Try changing the IO to asynchronous (right-click the Read nodes and select Asynchronous mode) I don't think this will help when dealing with a single device but it's easy to try.
2) Read less data at a time. You might be running into memory allocation problems reading relatively large blocks at a time. Try reducing the individual block size and see what happens.
Shane.
PS what speed ARE you getting?
PPS Try dequeuing your data to prevent memory allocation becoming a factor in your benchmark.
02-11-2014 05:38 AM
Thanks for the suggestions.
Changing the IO to asynchronous did not had any impact, and reading less data leads to more data holes.
(I’m probing the ADC with a scope to check for streaming “halts”)
I’m able to read at 8.6Mbytes/s (and even more) but I always get “gaps” that depending on the block size can reach 1ms.
The code I sent is only a fraction of the actual code. On the actual code I’m dequeuing the data on another while loop (for data storage, signal processing, etc)
BR
02-11-2014 10:35 AM
Hmm, the request you send is to start the device streaming, right? I presume there's zero buffering on your device?
I don't know if you can set up multiple Bulk reads in parallel. I know it works for Interrupts (otherwise you can miss mouse events) but I've never tried it for Bulk.
Sorry, I'm at the end of my experience in these matters.
Shane.
02-11-2014 11:21 AM
Hello
Yes, I have implemented some vendor commands, and that one is to start streaming.
Regarding your second question: I dont have any buffering/fifos between the ADC and the Cy7.
Thanks again