Running several acquisitions in a single VI run with 2204a

Post your LabVIEW discussions here
Post Reply
davidesc
Newbie
Posts: 0
Joined: Wed May 05, 2021 8:16 am

Running several acquisitions in a single VI run with 2204a

Post by davidesc »

Hi,
We are developing a LabVIEW application where we need to perform a series of several acquisitions with a Picoscope 2204A.
Ideally, the application should have a button that allows the user to run several acquisitions without having to stop the rest of the VI.

We started out from the example provided for the fast streaming mode: picosdk-ni-labview-examples-master\ps2000\32-bit-examples\PicoScope2000ExampleFastStreaming.vi

The example itself works fine, but we are having trouble adapting it to perform several measurements.

As you can see in the attached VI, we tried using a "latch when release" button inside a while loop. The button is used to enter in a case structure which performs the measurement. This seemed to work at first but after the first acquisition the most internal while loop gets stuck somehow and the application keeps acquiring samples forever. Additionally, it is needed to close Labview to run the VI again, which is also the only way to open the Picoscope relay and safely remove the device from the computer.

Are we missing something in the way the acquisition steps are supposed to work?

Thanks for your help
Davide
Attachments
picoscope.vi
(426.21 KiB) Downloaded 282 times
picoscope.vi
(426.23 KiB) Downloaded 288 times

AndrewA
PICO STAFF
PICO STAFF
Posts: 400
Joined: Tue Oct 21, 2014 3:07 pm

Re: Running several acquisitions in a single VI run with 2204a

Post by AndrewA »

Hi,
Yes once you enter the loop the scope will capture the data continually until the Stop function is called.
You can't have two loops for each channel just one for all channels.
Yes I think you have misunderstood how the streaming mode works.

It may be easy if you can explain what you want to do with scope.
Number of channels, sample rate, number of samples/capture length or only stop capturing when you press Stop for example.
Do you need a trigger?
If capturing continuously what do you want to do with the data? write to file, display the last N samples etc.
Regards Andrew
Technical Specialist

davidesc
Newbie
Posts: 0
Joined: Wed May 05, 2021 8:16 am

Re: Running several acquisitions in a single VI run with 2204a

Post by davidesc »

Thanks for your answer,
AndrewA wrote:
Fri May 07, 2021 8:29 am
Yes once you enter the loop the scope will capture the data continually until the Stop function is called.
Or it could also stop when the maximum number of sample is reached, right? But the problem is that after the first capture the Stop button does nothing though.
AndrewA wrote:
Fri May 07, 2021 8:29 am
You can't have two loops for each channel just one for all channels.
Oh ok, so I will have to merge the two blocks into one, for starters
AndrewA wrote:
Fri May 07, 2021 8:29 am
Yes I think you have misunderstood how the streaming mode works.

It may be easy if you can explain what you want to do with scope.
Number of channels, sample rate, number of samples/capture length or only stop capturing when you press Stop for example.
Do you need a trigger?
If capturing continuously what do you want to do with the data? write to file, display the last N samples etc.
We need to acquire from both channels, with a sample rate that can be set from the front panel. Stop condition and triggers are not absolutely needed. Ideally the data would be shown on screen during the capture and saved every time the acquisition stops, but really the point is to save the data to disk.

Post Reply