Test and Measurement Forum

Rapid Block Mode LabVIEW PS4224

Post your LabVIEW discussions here

Re: Rapid Block Mode LabVIEW PS4224

Postby BSI » Thu Jan 24, 2013 7:15 pm

Following up on this thread to obtain a Rapid Block Mode with a 4000 series scope, I changed the code using the ps4000.dll instead of the ps3000.dll .


SDK: r10.4.3.1
LabVIEW 11.0.1.f2
Win 7 64
Pico 4224.

The code looks like this:
Capturecode.PNG


Capture.PNG


ps4000SetDataBufferBulk is used as many times as there are data captures. ps4000GetValuesBulk is used once, and the data is passed using LabVIEW reference to the Channel A Buffer indicator. This VI is used inside the SDK's PS4000 Rapid Block Example.

The VI runs without crashing, however there is a problem in the content of the produced data: It seems that each data capture is shifted by one sample.
Capture 0 is fine,
Capture 1 is shifted by 1 point, its first data point being the last data point of capture 0 , or a wrap of the last point in the same data set.
...
Capture i is shifted by i point, its first data point being the last data point of capture i-1, or a wrap of the last point in the same data set:

So for a 800 pts long square wave, with 400 points as pre-trigger, 400 pts as post triggers it would look like this:

capture 0:
Capture0.PNG


capture 20: 20 samples lag
Capture20.PNG


capture 255: 255 samples lag
Capture255.PNG



Of note too, the Overflow array at the output of the GetValueBulk shows an array containing 1s ( 1,1,1,1...).

I then tried the same code but with the ps3000.dll with a pico 3206a and it works as expected, that is all the bulk captures come out with no lag (which I suspect is an overflow) . The overflow array still shows ( 1,1,1,1...) with the ps3000.dll .

Finally, the ps3000 rapid block example does not use the "SetDataBufferBulk" call , but rather the "SetDataBuffer" call, while the ps4000.dll use the "SetDataBufferBulk"... which is somewhat confusing. The ps3000aSetDataBuffer has a
"waveform" input which would suggest it is in fact doing a bulk setting of the buffer.... Confused yet?

Any idea of what is going wrong? It looks like either the ps4000SetDataBufferBulk or the ps4000GetValuesBulk creates/reads out the data with a lag or a wrap of 1 sample for each requested data capture ...

Thx for checking this out.

L.

PS:
The standard example for Rapid Block produces the expected data with the expected signal for all data captures, all identical to Capture 0 plot above, and this is what is expected. However, not taking advantage of the ps4000GetValuesBulk, it takes 1.5 sec to obtain the data instead of ~ 30 ms. This is why I want to use the ps4000GetValuesBulk instead of calling the GetValues multiple times.
BSI
Newbie
 
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: Rapid Block Mode LabVIEW PS4224

Postby Hitesh » Thu Jan 31, 2013 5:34 pm

Hi,

This appears to be fixed in a dll that is not currently available in the SDK but requires further investigation in relation to a rapid block capture.

Thanks,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2000
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Rapid Block Mode LabVIEW PS4224

Postby BSI » Tue Feb 05, 2013 11:25 am

Ok, I applied a temp. fix that may be helpful. It builds on the previous example using LV DataReference and correct the "Wrap" by re-shifting each capture by one sample. As a result if one wants to acquire 100 samples, 10times (ncapture = 10), one should set the buffer to 100+10 samples. Then shift each capture i by i samples.
The VI is attached, and a screen shot shows how to use it.

Capture1.PNG

Capture2.PNG


cheers,
L.
Attachments
FixWrapIssueFor_R10.4.3.1.vi
(27.92 KiB) Downloaded 150 times
BSI
Newbie
 
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: Rapid Block Mode LabVIEW PS4224

Postby BSI » Thu Mar 14, 2013 8:11 pm

Just noticing something here:

Does the above shifting issue occurs with a 4227 ??? It did with 4224, but now on a 4227 it does not...
Thx
L.

SDK: r10.4.3.1
LabVIEW 11.0.1.f2
Win 7 64
Pico 4227
BSI
Newbie
 
Posts: 0
Joined: Wed May 12, 2010 3:15 pm
Location: Canada

Re: Rapid Block Mode LabVIEW PS4224

Postby Hitesh » Mon Mar 18, 2013 12:00 pm

Hi,

The bug seems specific to the PS4224/4424. It has been flagged for investigation.

Thanks,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2000
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Previous

Return to LabVIEW

Who is online

Users browsing this forum: No registered users and 1 guest