Unable to continuously stream data for continuous processing

Post your LabVIEW discussions here
Post Reply
rohanp
Newbie
Posts: 0
Joined: Mon Oct 11, 2021 8:15 pm

Unable to continuously stream data for continuous processing

Post by rohanp »

I am using Picoscope 3406D here and trying to understand the stream mode algorithm. I obtained the example files from GitHub

Referring to the PicoScope3000aExampleStreaming.vi, below is my screen capture of front panel of the VI that reflect my settings in use:


As you would notice, the Auto Stop is False.

Then, I expect the code to continuously stream data. To continuously process this data, I am on a lookout for “output array for Channel A”
My understanding is that below shown marking (red arrow) on the block diagram is the appropriate signal line (correct me if I am wrong):


When I run the VI, which remains unaltered as obtained from github, it shows a running plot for channel A as expected.
However, it was found that the outer while loop in which “output array for Channel A” (marked with red arrow) gets defined, only executes once ever (unless apply setting is selected which is irrelevant).


The size of the output array for Channel A remains equal to the set Overview Buffer size.

Then I could only conclude that the inner while loop which sets the Channel A plot running, keeps on showing same data over and over.

Could you help me understand what am I doing wrong here? How to obtain continuous data from channel A for continuous processing? I could achieve my objective if I knew which array is continuously updated as channel A data.

For reference, I have attached the VI as well.
Your help is appreciate in understanding this topic.
Thanks,
Attachments
PicoScope3000aExampleStreaming.vi
(22.16 KiB) Downloaded 775 times
SC2.png
SC1.png

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

Re: Unable to continuously stream data for continuous processing

Post by AndrewA »

Hi,
The short answer is shown in the image below, by the red arrow. In the inner loop PicoScope3000aGetStreamingValues sub vi, is called and polls "IsReady" function in a loop until new data is ready. The wrapper shared library function gets data copied into the array.
This is then indexed using the 'Array Subset' LabVIEW function.

The streaming examples actually break LabVIEW coding rules of data being written back onto the wire, by the Pico shared library function.
We have this on list of improvements to create new examples using LabVIEW pointers.(DSNewPtr() and MoveBlock())
More detailed discussion is here-
topic30231.html
Attachments
streaming.png
Regards Andrew
Technical Specialist

Post Reply