11-26-2012 09:13 PM
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.
Solved! Go to Solution.
11-27-2012 12:59 PM
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.
11-27-2012 10:40 PM
Hi Jake,
Thanks for your replay.
Penn