Streaming and real time evaluation with PicoScope 4262

Post your LabVIEW discussions here
Post Reply
Emanuel
Newbie
Posts: 0
Joined: Wed Sep 17, 2014 3:11 pm

Streaming and real time evaluation with PicoScope 4262

Post by Emanuel »

Hi,
i'm trying to acquire data continously with streaming mode into LabView 2013 at a sample rate of 2 MS/s and a buffer size of 1000 samples. The data is then processed on the fly: parallel to the acquistion loop there is a FFT running over an array of given size. When starting the program, LV starts to stream data from the PicoScope and stores it in a ring buffer like array from which then the FFT is calculated in a seperate loop. This loop is executed without any wait function asynchronously to the acquisition loop so it can run faster than every 1 ms.
The problem is that the data in the ring buffer can only be updated every ms because of the need for the wait function in the loop, where the callback 'GetStreamingLatestValues' sits in. Is there a way to faster ask the driver for new values?

Thanks in advance!

Best regards,
Emanuel

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Streaming and real time evaluation with PicoScope 4262

Post by Karunen »

Hi Emanuel,

We normally have a wait as this puts less strain on the PC and gives the device some time to collect the values.

But you should be able to remove the wait and ask the driver for new values as soon as you have copied you have copied the values out.

Please note sometimes you may not get any data as the driver/device will not be ready to pass new data.

Kind Regards,
Karunen

Technical Specialist
Pico Technology

Emanuel
Newbie
Posts: 0
Joined: Wed Sep 17, 2014 3:11 pm

Re: Streaming and real time evaluation with PicoScope 4262

Post by Emanuel »

Hello Karunen,

thanks for the quick reply.

I tried doing so and added another port to the PicoScope4000GetStreamingValues.vi, which allows setting different values for ms to wait after every time the driver asks for new samples.
Now the porblem is (as far as i understood, this is the behaviour, which you mentioned in your post above) that if i give the loop zero ms to wait, it will stop reading samples from time to time ('0ms_wait.png'). If i increase the time to wait to 1 ms, the output locks more ore less ok ('1ms_wait.png').
Is it at all possible to read data from the driver/device fast than every 1 ms with labview?

Thanks in advance.

Best regards,
Emanuel
Attachments
output signal with 1 ms to wait
output signal with 1 ms to wait
output signal with 0 ms to wait
output signal with 0 ms to wait
LabView schematics of edited PicoScope4000GetStreamingValues.vi
LabView schematics of edited PicoScope4000GetStreamingValues.vi

Karunen
Advanced User
Advanced User
Posts: 194
Joined: Thu Nov 21, 2013 9:22 am

Re: Streaming and real time evaluation with PicoScope 4262

Post by Karunen »

Hi Emanuel,

I have tested the 4262, using LabVIEW 2013, with 500 ns sample interval and I can see no corruption in the actual signal when I change the wait time to 0.

But I do not have the FFT code so I cannot replicate what you are seeing.
Would it be possible to send your FFT example to support@picotech.com

Would you be able to tell me which driver version you are using?

Kind Regards,
Karunen

Technical Specialist
Pico Technology

Post Reply