High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger event

Solved!
Go to solution

Dear NI Experts:

 

I use NI-DAQmx ANSI C to develop software to acquire analog signal by PCIe-6351.  The sample clock is generated internally, which will be output to trigger a transducer. The sample clock's rate is about 4HZ. I will acuqire finite amouts of data on each digital trigger, which is  retriggerable. The snippet of code like this:

 

    DAQmxCreateTask("",&taskHandle);
    DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000);
    DAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev1/PFI0",DAQmx_Val_Rising);
    DAQmxSetStartTrigRetriggerable(taskHandle,1);    

    DAQmxRegisterEveryNSamplesEvent(taskHandle,DAQmx_Val_Acquired_Into_Buffer,1000,0,EveryNCallback,NULL);

However I need to record data from RS232 at every trigger starts exactly which need to synchronize with the analog signal record.

So My question is how can I get every start trigger event or call back or can read the timestamp of every start trigger?

Thanks very much.

0 Kudos
Message 1 of 3
(7,205 Views)
Solution
Accepted by topic author Dr.Penn

Hi,

 

Below I have linked a Knowledge Base that will give you some options for getting a timestamp in a C-environment.

 

http://digital.ni.com/public.nsf/allkb/354468202721D85D8625759F004B0357

 

-Jake B.

0 Kudos
Message 2 of 3
(7,196 Views)

Hi Jake,

Thanks for your replay.

Penn

0 Kudos
Message 3 of 3
(7,193 Views)