Hardware: DAQCard-AI-16XE-50
Software: NI-DAQ 6.9.1 call from C++
Q- Does anyone have sample code to initiate a callback function in C++ when a pulse edge is input to a DAQCard-AI-16XE-50? I am using ACH1 as the input channel. Pulse edge occurance will be low duty cycle.Below code doesnt work..
(I could use a latch & poll but edge triggering would be cleaner!)
status = Set_DAQ_Device_Info(1,ND_AI_FIFO_INTERRUPTS,
ND_INTERRUPT_EVERY_SAMPLE);
retValue=NIDAQErrorHandler(status,"Set_DAQ_Device_Info (FIFO Interrupts)",0);
status = Set_DAQ_Device_Info(1,ND_DATA_XFER_MODE_AI,
ND_INTERRUPTS);
retValue=NIDAQErrorHandler(status,"Set_DAQ_Device_Info",0);
status = Config_ATrig_Even
t_Message(1,1,"AI1",3,1,1,0,
0,0,0,0,(unsigned int)EdgeCallbackFunction);
retValue=NIDAQErrorHandler(status,"Config_ATrig_Event_Message",0);
Thanks Millions if you help!!