Test and Measurement Forum

Questions about Picoscope 2203

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

Questions about Picoscope 2203

Postby bdixon » Tue Dec 08, 2009 12:18 am

Couple of questions I'm a bit unclear about for the 2203.

Firstly, can compatible streaming be used for continuous streaming (at less than 1000 samples per second) on the 2203 or is it only compatible with fast streaming?

How exactly does fast streaming work (I have looked at the C demo files but am still unclear), I essentially want to capture data continuously until my software instructs the scope to stop. If I just start streaming using run_streaming_ns and let it run, will the buffer be treated as circular so it will it just start writing again from the start once it reaches the end and if so how do I find out which point in the buffer it is currently up to?

Thanks,

Ben
bdixon
Newbie
 
Posts: 0
Joined: Tue Dec 08, 2009 12:10 am

Re: Questions about Picoscope 2203

Postby bdixon » Tue Dec 08, 2009 3:10 pm

OK So to answer my own question, I've got fast streaming to work, I'm happy to let it sit their and stream, overwriting from the beggining of the buffer when it fills up, effectively giving me a (sample_interval*buffer size) infinite loop of capture. Once I've stopped acquisition, how do I find out at which point in the buffer, the most recent value that was written?

Thanks,

Ben
bdixon
Newbie
 
Posts: 0
Joined: Tue Dec 08, 2009 12:10 am

Re: Questions about Picoscope 2203

Postby Robin » Thu Dec 10, 2009 1:07 pm

Hi Ben

In fast streaming, you should use ps2000_get_streaming_last_values to acquire the data from the driver. This function returns the number of samples captured since it was last called, giving you an index to the buffer.

See section 3.3.8.9 of the programmer's guide:
http://www.picotech.com/document/pdf/ps2000pg-en.pdf

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Questions about Picoscope 2203

Postby bdixon » Thu Dec 10, 2009 1:11 pm

Thanks, is there no way of finding out which position in the buffer was last written to after logging has stopped? I have no need to stream the data live, instead getting the raw data without aggregation after it has stopped.

Thanks,

Nem
bdixon
Newbie
 
Posts: 0
Joined: Tue Dec 08, 2009 12:10 am

Re: Questions about Picoscope 2203

Postby Robin » Thu Dec 10, 2009 1:59 pm

I have no need to stream the data live


Calling ps2000_run_streaming_ns starts the unit streaming data.

The only way know is to keep track of the value returned by ps2000_get_streaming_last_values.

Alternatively, when you call ps2000_run_streaming_ns, you can set auto_stop to true, which causes the driver to collect max_samples and then stop. You can then retrieve the data using ps2000_get_streaming_values. However, if you are going to do this and not call ps2000_get_streaming_last_values, you may as well use block mode.

I hope this helps

Robin
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests