Scope doesn't respond to parameters sent to driver

Scope doesn't respond to parameters sent to driver, a forum discussion on Cleverscope Mixed Signal USB Oscilloscopes. Join us for more discussions on Scope doesn't respond to parameters sent to driver on our Other Issues forum.

Back to Forum Index : Back to Other Issues   RSS
tomas.celeda

22 Oct 2009
Posts:

Hello,
I have a cleverscope with 4M memory and want to use it to grab frames from an ultra-sound scanner. I would like to get as many fps as possible with maximum sampling rate (rate is 100 Mhz). Now I am trying to set acquire parameters for the driver.

I have used these settings:

acquire.StartTime = 0.000;
acquire.StopTime = 0.0333;
acquire.AcquireMode = 2; //Triggered
acquire.ABandwidth = 1; //100 MHz
acquire.BBandwidth = 1; //100 MHz
acquire.TriggerSource = 2; // 2 = external trigger (has 30Hz)
acquire.TriggerAmplitude = 1; // trigger amplitude in volts
acquire.NumSeqFrames = 1;
acquire.SamplerResolution = 1; // 1 = 12 bit, 0 = 10 bit;
samples_required = 4000*1000;

Then I call start acquire function and wait for incomming samples. It takes about 2700 ms and after that I got 33k of samples.
The function to retrieve data doesn’t return anything at first and then (after 2.7s) it returns the 33k chunk.
This reflects 100MHz for 33ms.

My problem is that number of samples and time for grabbing data doesn’t cahnge when I change my parameters. I have tried to decrease StopTime, to change samples_required or to chaneg NumSeqFrames. For example:

samples_required = 1000;
acquire.NumSeqFrames = 1;
acquire.StopTime = 0.001;

And still I have got 33k samples in 2700ms.

Any ideas about what could go wrong?

Thank you

Best regards,
Tomas Celeda
bartschroder

24 Oct 2009
Posts: 477

Hello Tomas,
The Cleverscope is fundamentally an oscilloscope, and not a data acquisition card. So the process of capturing is quite seperate from the process of playing back. Often with an oscilloscope, you capture something, and then pan and zoom around in it. Because the buffer is so big, we cannot transfer the full amount and give fast snappy response. So we only transfer a sub set of the buffer, as a playback. So you will find two sets of times - the one in the acquire variable that specifies what will be acquired, and the playback start and stop time passed to cscope control when you ask for a playback.

The acquire start and stop times are relative to the trigger, which is always time 0. So in your example you set the acquire start time to 0 (which means no pre-trigger samples) and the stop time to 0.0333 secs. With 4M memory, and 2 frames, the maximum capture time at full rate is 20ms. We are capturing 33.3ms, and so the capture sample interval will be 20ns. You will capture 33.3e-3/20e-9 = 1,665,000 samples.

During playback you specify the playback start and stop time. The playback time range should be in the range specified for the capture, or the playback will be truncated. So say you wanted to return between 0 and 30ms, and 10,000 samples, in the Cscope Control Driver call, you set ReplayStartTime to 0, and ReplayStop Time to 30m, and SamplesInReplay to 10,000 and then do an acquisition. An acquire automatically does a replay as well. The decimation you specify (sampled, peak captured, or averaged) will be used to extract the 10,000 samples from the buffer of 1.6M samples, and return them.

If you wanted to replay another data set, say 30,000 samples from +5ms to +12msec, you would call the Cscope Control Driver again, with the replay command, but now ReplayStartTime would be +5ms, and ReplayStopTime would be +12msec, with SamplesInReplay at 30,000. The driver would return 30,000 samples over the time range you specified.

So to recap:
Acquire.StartTime and Acquire.StopTime specify the captured duration relative to the trigger. The scope will always capture as many samples as it can.

ReplayStartTime, ReplayStopTime and SamplesInReplay specify the samples actually returned in the replay.

I hope this helps. Please look at the SimpleScope example to see how we do it there.
Back to Forum Index : Back to Other Issues   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.

×

Your shopping cart is empty.