02-29-2012 11:42 AM
Hi all,
I'm developing an application on a PXI-1000B device in which a DAQ-6259 has to send a trigger signal (in this case, along PXI_Trig0) to a DMM, specifically a PXI-4070. According to another post concerning the 407x series DMMs, they do not reliably trigger on pulses less than 1 µs, and so I've written the following code to try to generate a longer pulsewidth for an analog output task:
// global variables: TaskHandle DAQ_Task_StimTrigger; const uInt8 Trig[16] = {0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0}; // desired min trigger width 1 µs // in main: DAQmxCreateTask("T_di_STr",&DAQ_Task_StimTrigger); DAQmxCreateDOChan(DAQ_Task_StimTrigger, "DAQ/port2/line6", "",DAQmx_Val_ChanPerLine); DAQmxConnectTerms ("/DAQ/PFI14","/DAQ/PXI_Trig0", DAQmx_Val_DoNotInvertPolarity); // PFI14 = port2/line6 DAQmxStartTask(DAQ_Task_StimTrigger); PostDelayedCall (RepeatCallback, 0, 0.01); void CVICALLBACK RepeatCallback(void *callbackData) { ProcessSystemEvents(); if(exitFlag) { DAQmxWriteDigitalLines (DAQ_Task_StimTrigger, // handle 16, // samples per channel FALSE, // auto-start = false 10.0, // timeout DAQmx_Val_GroupByChannel, // specifies data layout Trig, // waveform NULL, // actual number of samples delivered NULL); // reserved PostDelayedCall (RepeatCallback, 0, 0.1); } }
Now, I threw the output of /port2/line6 on a scope, and there is considerable variation in the actual pulsewidth of the signal produced, from the vicinity of 700 ns to up to 3 µs. Specifically, based on a handful of still frames (N=89), I observed a mean PW of 1.15 µs and a standard deviation of 15% (179 ns).
What might be the source of this variation? Will it adversely affect my ability to trigger using this signal using my DMM? Ideally, I will have different tasks triggering on the rising and falling edges of this trigger, so producing a reproducible signal with constant pulsewidth is important to me. I also am running a continuous analog output task using my DAQ card.
03-01-2012 03:59 PM
Since you are concerned with consistency of your trigger pulse width, you need to use a counter output task to generate the pulse.