Page 1 of 1

Stream data to PC

Posted: Tue Aug 30, 2016 5:08 pm
by Program
Hi everyone, I've got a question about data streaming from the Red Pitaya to a PC running Windows 7: I would like to write a C program to acquire a certain number of samples with the RP (say 16384), transfer these samples to the PC (either via ethernet or USB) for plotting and then repeat the whole process continuously. I guess I could just write a loop that acquires the samples, stores them in a file and copies the file to the PC via SSH. However, I guess this would be very inefficient as the file would have to be opened and closed every time new samples have been acquired. I would like to be able to just transfer an array with the samples. What would be the easiest way to do this?
As a next step, high-speed continuous streaming over ethernet (similar to the application that streams to DDR3 RAM) would be great.

Re: Stream data to PC

Posted: Tue Aug 30, 2016 9:10 pm
by Nils Roos
If you don't want to use a filesystem-based approach, it would indeed be easiest to open a network socket from the application on the RP to a server running on your PC. Then, you can send an array of samples over the connection whenever you have acquired new data.
high-speed continuous streaming over ethernet (similar to the application that streams to DDR3 RAM) would be great.
The streaming to RAM is only the first stage in that application. After it has some samples in its DDR buffer, It does the socket thing and sends the samples to a remote server.

Re: Stream data to PC

Posted: Wed Aug 31, 2016 10:14 am
by Program
Thanks a lot, I'll look into socket programming then.

Re: Stream data to PC

Posted: Mon Dec 14, 2020 5:39 pm
by ilemonaene
Program wrote:
Tue Aug 30, 2016 5:08 pm
Hi everyone, I've got a question about data streaming from the Red Pitaya to a PC running Windows 7: I would like to write a C program to acquire a certain number of samples with the RP (say 16384), transfer these samples to the PC (either via ethernet or USB) for plotting and then repeat the whole process continuously. I guess I could just write a loop that acquires the samples, stores them in a file and copies the file to the PC via SSH. However, I guess this would be very inefficient as the file would have to be opened and closed every time new samples have been acquired. I would like to be able to just transfer an array with the samples. What would be the easiest way to do this?
As a next step, high-speed continuous streaming over ethernet (similar to the application that streams to DDR3 RAM) would be great.
Hi,

Did you make any progress on this? I am wanting to do something similar, and I am only a beginner on RP. I want to acquire continous data samples and send to PC or store on the DDR memory

Re: Stream data to PC

Posted: Thu Mar 18, 2021 9:41 am
by redpitaya
I recommend to install the latest beta OS. The Streaminghttps://redpitaya.readthedocs.io/en/lat ... aming.html app was much improved from the first release. You can now save locally and then browse files. also there is code available for the PC app receiving the stream
https://github.com/RedPitaya/RedPitaya/ ... ng_manager

Re: Stream data to PC

Posted: Thu Oct 06, 2022 7:01 pm
by kitzhabz
redpitaya wrote:
Thu Mar 18, 2021 9:41 am
I recommend to install the latest beta OS.
The current beta OS is 1.04-28; is this the version you are referring to?
redpitaya wrote:
Thu Mar 18, 2021 9:41 am
also there is code available for the PC app receiving the stream
https://github.com/RedPitaya/RedPitaya/ ... ng_manager
I can't find any details or documentation to help me make sense of the code in this repo. I'm a beginner, and I'm looking for a program that I can use on a Windows 10 PC to continuously stream data directly from the Red Pitaya to a file on the PC over ethernet at >100 kSps.

Re: Stream data to PC

Posted: Fri Oct 07, 2022 8:59 am
by redpitaya
It has been a while since that post, but yes, for the best performance of the Streaming application please install 1.04-28 OS

Here are the details for the Streaming application:
https://redpitaya.readthedocs.io/en/lat ... #streaming

With it you can achieve up to 20 MB/s speed over 1 Gbit network (in ideal conditions) - a direct connection is recommended.