Hi, I want to program a PC application that uses the Red Pitaya board for data acquisition.
The application will work on Linux.
Are there libraries (for Linux PC) to accessing the board and read the information (enable triggers, select channel, etc)? or I have to do "C" slave programs for the Red Pitaya board and that they communicate with the PC application.
I do not want to use SCPI comands, I need it as quickly as possible.
Thank you.
Carlos.
PC application.
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: PC application.
Hi Carlos,Carlos wrote:Are there libraries (for Linux PC) to accessing the board and read the information (enable triggers, select channel, etc)? or I have to do "C" slave programs for the Red Pitaya board and that they communicate with the PC application.
... I need it as quickly as possible.
I'm afraid that the "C" slave program is currently the only option if you need fast communication.
For example, the following program can continuously transfer the ADC samples via TCP at 63-65 MB/s (500-520 Mb/s):
https://github.com/pavel-demin/red-pita ... t-server.c
If you need faster than 500 Mb/s transfer rates, then I'd suggest to have a look at the NETMAP and mTCP frameworks:
https://github.com/luigirizzo/netmap
https://github.com/eunyoung14/mtcp
Best regards,
Pavel
-
- Posts: 26
- Joined: Tue Nov 17, 2015 9:58 am
Re: PC application.
Thanks Pavel, a few more questions ...
Why do you use two threads in the program? It is to use the power of the two cores of the microcontroller?
Why you not use the API rp.lib?
How to read the ADC? How you initiate the ADC?
Greetings and thank you very much
Carlos
Why do you use two threads in the program? It is to use the power of the two cores of the microcontroller?
Why you not use the API rp.lib?
How to read the ADC? How you initiate the ADC?
Greetings and thank you very much
Carlos
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: PC application.
Exactly. Since you asked for "as quickly as possible", I sent you an example of a TCP server that runs on Red Pitaya and uses both of its cores to transfer the ADC samples via TCP at 63-65 MB/s. When using one core, the transfer rate is ~15% lower.Carlos wrote: Why do you use two threads in the program? It is to use the power of the two cores of the microcontroller?
It's just an example of a relatively simple and fast TCP server, you can change it to use Red Pitaya API.Carlos wrote: Why you not use the API rp.lib?
How to read the ADC? How you initiate the ADC?
This code is working with the following FPGA configuration:
https://github.com/pavel-demin/red-pita ... design.tcl
The ADC samples are directly transferred to RAM. The ADC data processing chain consists of the following elements:
- ADC interface
- FIFO (transports samples from ADC clock domain to FPGA clock domain)
- CIC filter (applies a moving average filter and accepts 1 sample every M samples)
- RAM writer (gets samples from AXI-Stream bus and writes them to RAM via AXI bus)
-
- Posts: 58
- Joined: Wed Jan 13, 2016 12:57 am
Re: PC application.
Hello Pavel,
I'd like to use the adc-test-client to send data to a labview TCP server VI (rather than receive data from its adc-test-client).
I want to know if using the read/send functions would be enough. In other words, what do I need to worry about in order to achieve this?
Thanks in advance.
I'd like to use the adc-test-client to send data to a labview TCP server VI (rather than receive data from its adc-test-client).
I want to know if using the read/send functions would be enough. In other words, what do I need to worry about in order to achieve this?
Thanks in advance.
-
- Posts: 58
- Joined: Wed Jan 13, 2016 12:57 am
Re: PC application.
Should I post a new topic about this please let me know.
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: PC application.
Unfortunately, I don't have any idea of what "LabView TCP server VI" is and how it communicates. Can't it communicate directly with a TCP client or server running on Red Pitaya?
-
- Posts: 58
- Joined: Wed Jan 13, 2016 12:57 am
Re: PC application.
I apologize for not explaining.
In essence, I have a Labview program that communicates with your TCP client code (adc-test-client). Upon connection, the labview program plots the data coming in from the Red Pitaya.
However, the adc-test-client code only receives data from the socket (Labview is not intended to send data). I just wanted to verify if implementing the read and send functions along pipeline and DMA (in your adc-test-client code) to adc-test-server code would work such that it sends sends data to the Labview server.
Thanks again for your attention.
In essence, I have a Labview program that communicates with your TCP client code (adc-test-client). Upon connection, the labview program plots the data coming in from the Red Pitaya.
However, the adc-test-client code only receives data from the socket (Labview is not intended to send data). I just wanted to verify if implementing the read and send functions along pipeline and DMA (in your adc-test-client code) to adc-test-server code would work such that it sends sends data to the Labview server.
Thanks again for your attention.
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: Google [Bot] and 85 guests