Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent DigitalFilterEnable for PCI-6221

Thanks for the info. I will implement one of the workarounds suggested in this thread.
0 Kudos
Message 11 of 12
(1,040 Views)

Hi,

this might be a bit to late, but a customer ran into the same troubles with the digital filtering of PFI lines.

For the use in CVI please have a look at this code, this should work

 

// Buffered ctr0 (Z-SampleClock, A-Trigger)
DAQmxCreateTask("ctrDAQ1", &task_ctr1);
DAQmxCreateCICountEdgesChan(task_ctr1, Ini.chCounter1, "DI_SOURCE1",
DAQmx_Val_Rising , 0, DAQmx_Val_CountUp );
DAQmxCfgSampClkTiming(task_ctr1, Ini.chStartTrigger1, 10.0,
DAQmx_Val_Rising, DAQmx_Val_FiniteSamps , 2);

// ctr1 (Z-Clock)
DAQmxCreateTask("ctrDAQ2", &task_ctr2);
DAQmxCreateCICountEdgesChan(task_ctr2, Ini.chCounterZ1,
"DI_SOURCE2", DAQmx_Val_Rising , 0, DAQmx_Val_CountUp );

// Filter line A
DAQmxSetCICountEdgesDigFltrEnable(task_ctr1, Ini.chCounter1, 1);
DAQmxSetCICountEdgesDigFltrMinPulseWidth(task_ctr1, Ini.chCounter1,
0.000006425);

// Analogacq. ( 2 channels(Kanäle), Z-Sample Clock, A Trigger)
DAQmxCreateTask("DAQ1_Ana", &task_analog1);
DAQmxCreateAIVoltageChan(task_analog1, Ini.chAI1, "DAQ1_AI1",
DAQmx_Val_Diff , -10.0, 10.0, DAQmx_Val_Volts, NULL);
DAQmxCreateAIVoltageChan(task_analog1, Ini.chAILS1, "DAQ1_AI2",
DAQmx_Val_Diff, -10.0, 10.0, DAQmx_Val_Volts, NULL);
DAQmxCfgSampClkTiming(task_analog1, Ini.chTrigger1 ,
Ini.iEncoderRes, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, Ini.iEncoderRes);
DAQmxCfgDigEdgeStartTrig(task_analog1, Ini.chStartTrigger1,
DAQmx_Val_Rising);

0 Kudos
Message 12 of 12
(958 Views)