Data Sampling with max samplerate over ethernet

Tell us how your experiment is running with Red Pitaya
Post Reply
10er
Posts: 5
Joined: Mon Sep 21, 2015 3:19 pm

Data Sampling with max samplerate over ethernet

Post by 10er » Mon Nov 16, 2015 8:45 am

Hi Nils,

i am a engineer and working at the Fritz Haber Institut of Max Planck Society. At our institute we got a new free electron laser and many groups experiment with them. The measurement we must acquire running continuously with 10Hz respectively 5 Hz.
In near future there are much projects that have all very similar requirements. The specification for the data acquisition projects is to acquire data all 100ms (Triggered) for 1ms with fully sample rate of 125MS/s and send Data (10*125kS=1,25MS/s) to Labview for further processing. Instead of buying much expensive DSO´s i want to check if is possible to realize it with red pitaya boards.

In the Forum „Triggered high speed acquisition“ (viewtopic.php?f=7&t=355&start=10) i found a really similar project.

I have following questions:

-is it possible to realize my functions without edit VHDL code? Since DDR_Dump work it must be possible without i hope…

-I must argue that is better to built a red pitaya box and not to buy expensive DSO´s where i must buy a separate function generator for some (future) projects. It would be eminent to have a „prototype“ running soon to convince the scientists from this solution. It would be grateful if there is a image available with render a similar service.

Best regards,
Thomas

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Data Sampling with max samplerate over ethernet

Post by Nils Roos » Tue Nov 17, 2015 7:05 pm

is it possible to realize my functions without edit VHDL code? Since DDR_Dump work it must be possible without i hope…
The newer ecosystem versions (>= 0.93) have triggered aquisition of longer sequences built in, though not always fully supported through the api. If you feel comfortable with addressing the hardware registers directly in C, you should be able to realize your project on a Red Pitaya.
It would be eminent to have a „prototype“ running soon to convince the scientists from this solution. It would be grateful if there is a image available with render a similar service.
What functions should this prototype perform ? Your previously outlined 10Hz repeating acquisition with a network connection to LabView ?

10er
Posts: 5
Joined: Mon Sep 21, 2015 3:19 pm

Re: Data Sampling with max samplerate over ethernet

Post by 10er » Wed Nov 25, 2015 10:37 am

Hi Nils,

the Prototype should perform triggerd sampling with more than 16kS every 100ms and send them via TCP. I have tried some newer builds(v0.93 and v0,94 R15), but couldn´t sample more then 16kS triggered (acquire only support 16kS). I have much problems with this built, but I recognized later that much problems in consequence of a power supply problem (2,1A, but cause in non-reproducible infrequent errors, replaced due better one and it works). Because of that i have Pavels adc-recorder-trigger running with v0.92 build sample more then 16KS (1MS). Now i want to combine this with the TCP part of Re: Triggered high speed acquisition.
Is it advisable to do this with the v0.92 build or would you try this with the actual v0,94?
How is it possible to sample more than 16kS triggered with the v0.94 built?

Thx Thomas

pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Data Sampling with max samplerate over ethernet

Post by pavel » Wed Nov 25, 2015 11:39 am

10er wrote:i have Pavels adc-recorder-trigger running with v0.92 build sample more then 16KS (1MS). Now i want to combine this with the TCP part
For information.

adc-recorder-trigger could be easily combined with the following TCP code:
https://github.com/pavel-demin/red-pita ... t-server.c

It also runs with 0.94. The following steps should work with 0.94:
  1. download and install the latest Red Pitaya SD card image following the instructions at http://redpitaya.com/quick-start
  2. set FPGA clock to 143 MHz

    Code: Select all

    devcfg=/sys/devices/soc0/amba/f8007000.devcfg
    echo fclk0 > $devcfg/fclk_export
    echo 1 > $devcfg/fclk/fclk0/enable
    echo 143000000 > $devcfg/fclk/fclk0/set_rate
    
  3. configure FPGA

    Code: Select all

    cat adc_recorder_trigger.bit > /dev/xdevcfg
  4. compile and run ADC recorder:

    Code: Select all

    gcc adc-recorder-trigger.c -o adc-recorder-trigger
    ./adc-recorder-trigger > record.dat
Last edited by pavel on Wed Nov 25, 2015 9:43 pm, edited 1 time in total.

10er
Posts: 5
Joined: Mon Sep 21, 2015 3:19 pm

Re: Data Sampling with max samplerate over ethernet

Post by 10er » Wed Nov 25, 2015 11:53 am

Wow, thx Pavel!

I will try it immediately!

Mfg Thomas

pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Data Sampling with max samplerate over ethernet

Post by pavel » Wed Nov 25, 2015 12:02 pm

Thomas, for adc-recorder-trigger, are you using a pre-built SD card image or building .bit file yourself?

10er
Posts: 5
Joined: Mon Sep 21, 2015 3:19 pm

Re: Data Sampling with max samplerate over ethernet

Post by 10er » Wed Nov 25, 2015 2:38 pm

Hey Pavel,

currently i use your Sd Card Image you posted in "Acquire long signal with DMA on triggered input" ( viewtopic.php?f=14&t=819)
Next Monday i will get support from a coder and we try to build it with our changes. (No of samples adjustible, TCP, calibration paramesters)

Following your instruction i have Problem with part 3, configure FPGA. Just get message:
"cat: adc_recorder_trigger.bit: No such file or directory"
Where must be adc-recorder-trigger.c stored on SD-card?

Mfg Thomas

pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Data Sampling with max samplerate over ethernet

Post by pavel » Wed Nov 25, 2015 3:31 pm

10er wrote:currently i use your Sd Card Image you posted in "Acquire long signal with DMA on triggered input" ( viewtopic.php?f=14&t=819)

Following your instruction i have Problem with part 3, configure FPGA. Just get message:
"cat: adc_recorder_trigger.bit: No such file or directory"

Where must be adc-recorder-trigger.c stored on SD-card?
I thought that you were building everything from source. That's why my previous instructions were incomplete.

I've just built adc_recorder_trigger.bit for the latest version of the code. The main difference is the configurable decimation factor (from 10 to 6250).

With 0.94, you can store adc-recorder-trigger.c and adc_recorder_trigger.bit in the home directory (/root).

You can download the latest versions of adc_recorder_trigger.bit and adc-recorder-trigger.c with the following commands:

Code: Select all

wget https://googledrive.com/host/0B-t5klOOymMNfmJ0bFQzTVNXQ3RtWm5SQ2NGTE1hRUlTd3V2emdSNzN6d0pYamNILW83Wmc/adc_recorder/adc_recorder_trigger.bit
wget https://raw.githubusercontent.com/pavel-demin/red-pitaya-notes/master/projects/adc_recorder_trigger/adc-recorder-trigger.c

10er
Posts: 5
Joined: Mon Sep 21, 2015 3:19 pm

Re: Data Sampling with max samplerate over ethernet

Post by 10er » Wed Nov 25, 2015 5:19 pm

Thx, can send commands now without trouble.
On my first try now I get no data sampled.
I tried it with "rw" command first and then store it into *.txt instead of .dat, but no luck.
I will reinstall SD Card, perhaps i wasted it with my first try.

Thx very much for support, I will post when i advance.

Thomas

pavel
Posts: 790
Joined: Sat May 23, 2015 5:22 pm

Re: Data Sampling with max samplerate over ethernet

Post by pavel » Wed Nov 25, 2015 9:51 pm

I tested the commands from my previous comments and found that using the '-O3' flag with gcc was not a good idea. When compiled with this flag, adc-recorder-trigger does not work.

I've just edited one of my previous comments and removed the '-O3' flag.

Then I tried the following commands with 0.94:

Code: Select all

wget https://googledrive.com/host/0B-t5klOOymMNfmJ0bFQzTVNXQ3RtWm5SQ2NGTE1hRUlTd3V2emdSNzN6d0pYamNILW83Wmc/adc_recorder/adc_recorder_trigger.bit
wget https://raw.githubusercontent.com/pavel-demin/red-pitaya-notes/master/projects/adc_recorder_trigger/adc-recorder-trigger.c

devcfg=/sys/devices/soc0/amba/f8007000.devcfg
echo fclk0 > $devcfg/fclk_export
echo 1 > $devcfg/fclk/fclk0/enable
echo 143000000 > $devcfg/fclk/fclk0/set_rate
cat adc_recorder_trigger.bit > /dev/xdevcfg

gcc adc-recorder-trigger.c -o adc-recorder-trigger
./adc-recorder-trigger > record.dat
It worked.

Post Reply
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: No registered users and 14 guests