RapidBlock, Streaming, psStop & other stuff

Post your LabVIEW discussions here
Post Reply
MikeNuke
Newbie
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

RapidBlock, Streaming, psStop & other stuff

Post by MikeNuke »

Hi!
I am doing changes in my labview software we use to acquire data.
Right now we are working in RapidBlock mode, with this sequence:

ps4000OpenUnit
ps4000SetChannel
ps4000SetTriggerChannelConditions
ps4000SetTriggerChannelDirections
ps4000SetTriggerChannelProperties
ps4000GetTimebase
ps4000MemorySegments
ps4000SetNoOfCaptures

acquisition while loop
[ ps4000RunBlock

waiting while loop
[ ps4000IsReady ]

(ps4000Stop)
ps4000SetDataBufferBulk
ps4000GetValuesBulk
***DATA PROCESSING*** ]

ps4000CloseUnit


The pointers for the SetBuffer are set with the LabVIEW DSNewPClr, and the data are retrieved with the MoveBlock function.

The IsReady library is called in a while loop stopping when, of course, the Pico is ready. I also added a stop button for this loop, but if we use it the GetValues gives error for "no samples available".
Can I solve this problem by putting a ps400oStop between the stopped loop and the GetValues?

My second question is about the sampling mode I am using. I found in the manual that also the streaming mode can be used with segmenting. Can I easily modify my software from RapidBlock to Streaming? Which part must be changed?

Thanks!
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division

MikeNuke
Newbie
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: RapidBlock, Streaming, psStop & other stuff

Post by MikeNuke »

Hi!
Does anybody know if the segmented streaming is actually possible?
And for what concerns ps4000Stop is it right the way I want to use it for the RapidBlock mode?
Thanks!

Mike
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: RapidBlock, Streaming, psStop & other stuff

Post by Martyn »

If you press the Stop Button, or use ps4000Stop, before the rapid block collection has been completed you will need to read out the data a segment at a time, to get any valid blocks that contain data.

Segmenting the scopes memory for streaming is not required as the data is transmitted directly to the driver. The ps4000MemorySegments command will be accepted but serves no purpose, so don't use it when streaming.

edit: This is possible with newer devices but not the older 4224/4424/4262
Martyn
Technical Support Manager

MikeNuke
Newbie
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: RapidBlock, Streaming, psStop & other stuff

Post by MikeNuke »

Hi Martyn,
Thank you for the reply.
I changed my software, but I have a problem with the ps4000RunStreaming call library; I used the same contained in the SDK, but LabVIEW (2010) gives me a 1097 error.
I am not sure of what error could be, I am attaching the SUBVI I bilt with the call library inside.
Thank you!

Mike
Attachments
ps4000RunStreaming.vi
(18.84 KiB) Downloaded 559 times
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: RapidBlock, Streaming, psStop & other stuff

Post by Martyn »

We have updated the streaming examples and wrapper code so can you try with the attached drivers and Labview vi's
Attachments
Updated Files.zip
(5.45 MiB) Downloaded 397 times
Martyn
Technical Support Manager

MikeNuke
Newbie
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: RapidBlock, Streaming, psStop & other stuff

Post by MikeNuke »

I noticed that there are a ps4000RunStreaming and a ps4000RunStreaming-2.
I tried both functions with both dll versions (SDK and attached), but I am always getting the same error.
I don't know if it is important, but I am using LabVIEW 2010 32bit with Windows 7 professional 64bit.
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: RapidBlock, Streaming, psStop & other stuff

Post by Martyn »

Have you put the dll's in the correct folder according to the details in the following thread posthttp://www.picotech.com/support/topic12601.html
Martyn
Technical Support Manager

MikeNuke
Newbie
Posts: 0
Joined: Thu Oct 31, 2013 1:49 pm

Re: RapidBlock, Streaming, psStop & other stuff

Post by MikeNuke »

Hi!
I copied each single call library needed in my program from the example VI and now it is working with both SDK dll and the one attached here. I will check again to understand why the version I copied in the subVI wasn't working.
Thank you for the help!

Mike
MikeNuke
Politecnico di Milano
Department of Energy, Nuclear Engineering Division

Post Reply