06-08-2017 08:52 PM
1. I was able to read in digital logic pulse waveform by using hardware timed digital input port (port 0) on X series DAQ 6323 with CVI code below:
DAQmxCreateDIChan( TaskHdl[DI], "Dev1/port0", "", DAQmx_Val_ChanForAllLines);
DAQmxCfgSampClkTiming(TaskHdl[DI], "/Dev1/20MHzTimebase", samp_rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, BUF_SZ);
DAQmxReadDigitalU32(TaskHdl[DI], DAQmx_Val_Auto, 1.5, DAQmx_Val_GroupByChannel, Dbuf, BUF_SZ, &actual_samp, 0);
2. However, I want a trigger signal so that captured waveform will stay the same. As indicated in X-series DAQ user manual, a square wave functioning as trigger signal was fed into PFI14 line, it works well under MAX (sampling rate at 1MHz, 1000 points continuos). Please see attached figure.
3. However I could not get the following code to work as MAX. Any idea?
DAQmxCreateDIChan( TaskHdl[DI], "Dev1/port0", "", DAQmx_Val_ChanForAllLines);
DAQmxCfgSampClkTiming(TaskHdl[DI], "/Dev1/20MHzTimebase", samp_rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, BUF_SZ);
DAQmxCfgDigEdgeStartTrig(TaskHdl[DI], "/Dev1/PFI14", DAQmx_Val_Rising);
DAQmxCfgDigEdgeRefTrig(TaskHdl[DI], "/Dev1/PFI14", DAQmx_Val_Rising, pretriggerSamples);
DAQmxReadDigitalU32(TaskHdl[DI], DAQmx_Val_Auto, 1.5, DAQmx_Val_GroupByChannel, Dbuf, BUF_SZ, &actual_samp, 0);
06-09-2017 02:39 PM
Hi Charlie2016,
Can I ask what do you mean by it doesn't work? Can you attach a picture of what you are getting so that we can compare? Or are you getting an error?
Regards,
Alyssa H.
National Instruments