Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Change detection using PCI-6514 and Ni-DAQmx

Hello Daniel,

 

finally I've succeeded  in using filter on the input of 2 ports and with signal event:

 DAQmxCreateTask("TaskSurveillance",&taskHandleSurveillance);
 DAQmxCreateDIChan(taskHandleSurveillance,"Dev1/port1/line0:7, Dev1/port2/line0:7","SurvPort",DAQmx_Val_ChanPerLine);
 DAQmxCfgChangeDetectionTiming(taskHandleSurveillance,"Dev1/port1/line0:7, Dev1/port2/line0:7","Dev1/port1/line0:7, Dev1/port2/line0:7",DAQmx_Val_FiniteSamps,1);
 DAQmxRegisterSignalEvent(taskHandleSurveillance,DAQmx_Val_ChangeDetectionEvent,0 ,DeviceChangeDetectionCallback,NULL);
 DAQmxSetDIDigFltrEnable(taskHandleSurveillance, "Dev1/port1/line0:7, Dev1/port2/line0:7", 0);
 DAQmxSetDIDigFltrMinPulseWidth(taskHandleSurveillance, "Dev1/port1/line0:7, Dev1/port2/line0:7", 0.01);
 DAQmxSetDIDigFltrEnable(taskHandleSurveillance, "Dev1/port1/line0:7, Dev1/port2/line0:7", 1);

Pulse width of 0.01 sec is fine to avoid noise on input.

Best regards,

                                PEY

 

Message Edité par pey le 09-18-2006 04:23 AM

0 Kudos
Message 11 of 11
(1,093 Views)