Acquiring data after trigger with c

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

Acquiring data after trigger with c

Post by majtom » Mon Nov 26, 2018 3:52 pm

Hi all,

I need to run a c program which continuously monitors the input on analog input 1 and saves data if a pulse occurs. The pulses last around 10 ms and I would like to save data before and after the pulse. Therefore I believe that a decimation of 1024 (buffer length = 134.218 ms) is the best.

I have tried to modify the acquire_trigger_pose_edge,c program from the Examples folder, but a few things don't make sense to me.

I test my program with a pulse generator that sends a 1V pulse every 5 seconds.

The value I choose for the trigger in: rp_AcqSetTriggerLevel(RP_CH_1,1); does not change anything. I get the output even though my data has not reached the trigger value. Why is that?

Also, I cannot change the decimation, I tried with rp_AcqSetDecimation(65536); which I believe should give me more than 8 seconds of data for a 16k buffer. This would mean at least one pulse. But that does not happen. Why??

Whatever I do, I just get 16k of values very close to 0V.

I hope someone can help me understand what I am doing wrong.

Cheers,
Maja

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

Re: Acquiring data after trigger with c

Post by majtom » Tue Nov 27, 2018 4:26 pm

I figured out why I did not get any pulses in my data. I needed a longer delay after starting acquisition to fill the buffer with fresh data. The decimation was in fact changed.

However, I still do not understand why it triggers even though the voltage does not reach the trigger voltage.

I hope someone has a similar experience?

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