rp_AcqSetTriggerDelay(); does not change the delay

Applications, development tools, FPGA, C, WEB
Post Reply
majtom
Posts: 19
Joined: Thu Nov 08, 2018 10:29 am

rp_AcqSetTriggerDelay(); does not change the delay

Post by majtom » Wed Nov 28, 2018 2:35 pm

Hi,

I am modifying the acquire_trigger_posedge script from the pitaya C examples.

When I change the value of rp_AcqSetTriggerDelay(0); it does not change anything. If I assume that rp_AcqSetTriggerDelay(0) equals a delay of 8192 samples (as I have seen written many places in this forum) at decimation 65536 a delay of 8192 should delay the end of the sampling by more than 8 seconds. But it does not. There is never a delay after my trigger. I just get the buffer values right away, and only the very beginning of my pulse is visible in the end of the data.

The documentation says:
@param decimated_data_num Number of decimated data. It must not be higher than the ADC buffer size."
But I can set it as high as I want without getting error messages when compiling.

When I printf rp_AcqGetTriggerDelay(tptr); it returns 0, no matter how i change the input of rp_AcqSetTriggerDelay().

Does anyone have experience with this?

Pineapple
Posts: 7
Joined: Fri Oct 26, 2018 11:20 am

Re: rp_AcqSetTriggerDelay(); does not change the delay

Post by Pineapple » Thu Nov 29, 2018 10:31 am

Hi,

I had the same problem.
My solution is to obtain the triggering point in the buffer:

Code: Select all

rp_AcqGetWritePointerAtTrig(&trigger_position);
Than form that value you can set the acquisition form the buffer as you like, for example if you one the triggering event at the center of your acquired data you can think of something like this:

Code: Select all

rp_AcqGetDataV(RP_CH_1,trigger_position-half_buff_size, &buff_size, buff)
For sure if you manage to make work the delay function is a better solution but I didn't so this is what I used to bypass the problem.

majtom
Posts: 19
Joined: Thu Nov 08, 2018 10:29 am

Re: rp_AcqSetTriggerDelay(); does not change the delay

Post by majtom » Thu Nov 29, 2018 3:05 pm

Dear Pineapple,

Thank you very much for sharing your idea.

I tried your solution, but maybe I am missing something. The red pitaya is still stopping its sampling immediately after the trigger. So I don't get the pulse that I am actually interested in. I just get the trigger measurement (one high data point) in the middle of a buffer with otherwise just noise.

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 20 guests