Hi Azazel,
I don't see anything immediately wrong with your producer loop. You mention the fetch takes approximately 100mS when it should theoretically take 1.2mS. Where does this come from?
The calculations I made are the following (assuming the trigger is a 43khz squarewave on the TRIG input, data to one of the Analog Inputs)
1. Trigger frequency = 43khz, 23.256uS between rising edge of triggers.
2. 512 Records @ 1700 Samples/Record
3. Sample Rate = 100 MS/s
4. Time to acquire 1700 samples = 1700 Samples / 100M Samples / sec = 17uS
5. As time to acquire 1700 samples is 17uS and time between triggers is 23.256uS then total time for the Scope to acquire 512 Records = 512 * 23.256uS = 11.907mS
The time to Fetch these samples from the scope is dependent on the bus moving the data. In this case it's a PXI bus, here is a
link to a Developer Zone article on the PXI Bus.
A realistic number to expect is approximately 100MB/s across the PXI bus.
The total data acquired is 512 record * 1700 samples/record * 2 bytes / sample (in my example) = 1.7408MB.
Time to transfer this data = Data Size / Bus Speed = 1.7408MB / 100MB / s = 17.408mS
I was curious so I went ahead and built a example that performs similiarly with one small change, I'm acquiring from a single channel
and returning a 1d array of doubles. Why are you fetching as a 2d array? Is there more than 1 channel of acquisition in your case?
Please post back if you have anymore questions, thanks!
MatthewW
Applications Engineer
National Instruments
Message Edited by Matthew W on 08-30-2007 05:03 PM