Hi Kaushal,
Since you are currently using only one external clock in addition to the analog input voltage, the Acq-IntClk-DigRef.c would be the example to work with. Most of the changes that you must make to this particular example to get it to run are in the "DAQmx Configure Code" section.
Here is a copy of this portion of the example, with the parameters of most concern to you in bold:
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"
Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",10000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));
DAQmxErrChk (DAQmxCfgDigEdgeRefTrig(taskHandle,"
/Dev1/PFI0",DAQmx_Val_Rising,100));
The DAQmxCreateAIVoltageChan function is used to configure the analog input channel for your acquisition. DAQmxCfgDigEdgeRefTrig is used to configure the terminal used as the source for your digital reference trigger. This example acquires 1000 total samples of the analog waveform, 100 of those samples being pretrigger. A good source of information about the various DAQmx function calls can be found in the NI-DAQmx C Reference Help. This documentation can be found by going to Start>>Programs>>National Instruments>>NI-DAQ>>NI-DAQmx C Reference Help.
In addition, there is good information about getting started with and using DAQmx
here.
Regards,
Andrew W
National Instruments