Questions about Picoscope 2203

Post general discussions on using our drivers to write your own software here
Post Reply
bdixon
Newbie
Posts: 0
Joined: Tue Dec 08, 2009 12:10 am

Questions about Picoscope 2203

Post by bdixon »

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

Post by bdixon »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Questions about Picoscope 2203

Post by Robin »

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

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

Re: Questions about Picoscope 2203

Post by bdixon »

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

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Re: Questions about Picoscope 2203

Post by Robin »

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

Post Reply