continues fast streaming

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

continues fast streaming

Post by Guest »

When i use the fast streaming method i can give a parameters telling it to auto stop if the buffer is full.
ps2000_run_streaming_ns ( handle, 250, PS2000_NS, 1000000, , 1, 30000 );

When i fill true (1) in and call
ps2000_get_streaming_last_values (handle, ps2000FastStreamingReady)
it works, but stops after 1000000 samples.

But i want to continuesly stream data into my application without missing any sample of the signal during the whole time my application is running. So I choise to set to false (0). But then it the
ps2000_get_streaming_last_values (handle, ps2000FastStreamingReady)
fails and returns 0.

I'am doing something wrong but I don't know how to do, because I can't find in the documentation what to do.

Guest

i think i solved it

Post by Guest »

i think i solved the problem, but i'am not sure if it's a continues signal could someone from picoscoop please conform this.

First i found that the ps2000_get_streaming_last_values also return 0 when there is no data available which is just normal and not a error as said in the documentation. So i added i small delay so some data comes available.

Secondly i noticed when filling 1 into is still automatticly stops when the buffer is full. So I call the ps2000_run_streaming_ns again when i notice i'am nearly at the end of the buffer, but i don't know whether this causes any caps in the data flow of samples.

Guest

Post by Guest »

With this solution the picoscoop misses some frames. I would like to know how i can tell the picoscoop to continuesly stream data without caps during the time my applaction runs.

Guest

Post by Guest »

Hello!
I'm experiencing the same problem: ps3000_run_streaming_ns does not work with autostop=false.
Could someone from the staff please read this topic and answer it?

Thank you!

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

I am sorry to hear that you are experiencing problems.

When using the run_streaming_ns with auto_stop set to 0 this will cause the data in your buffer to wrap around. Once the number of samples specified in the function call have been collected you will always be able to get back that number of samples from the buffer after calling stop. These samples will be the most current samples collected.

By calling the run_streaming each time the sampling will start from scratch again and data between calls will be missed.

Once the run_streaming has been called and then you start calling get_last_values this should not be in a tight loop as you will take all the PC's procesor time and not allow the driver to collect the samples off the device. A short sleep just after the run_streaming is sufficient.
Regards,

Mark Spencer

Guest

Post by Guest »

markspencer wrote: Once the run_streaming has been called and then you start calling get_last_values this should not be in a tight loop as you will take all the PC's procesor time and not allow the driver to collect the samples off the device. A short sleep just after the run_streaming is sufficient.
I wish I could use WaitForSingleObject and Events instead of Sleep(0) for synchronization. It would be much better.

Post Reply