From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-20-2016 06:27 PM - edited 09-20-2016 06:38 PM
I have created a digital edge retriggerable digital output (finite) task as the following: (in DAQmx C)
DAQmxCreateTask("",&_taskHandle);
DAQmxCreateDOChan(_taskHandle,"/Dev2/port0/line6","",DAQmx_Val_ChanPerLine);
DAQmxCfgSampClkTiming(_taskHandle,"/Dev2/Ctr0InternalOutput",_clockRate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,static_cast<uInt64>(_sampleCount));
DAQmxCfgOutputBuffer(_taskHandle,static_cast<uInt32>(_sampleCount));
DAQmxCfgDigEdgeStartTrig(_taskHandle,"/Dev2/PFI4" ,DAQmx_Val_Rising);
DAQmxSetStartTrigRetriggerable(_taskHandle,true);
DAQmxWriteDigitalLines(_taskHandle,static_cast<int32>(_sampleCount),FALSE,-1,DAQmx_Val_GroupByChannel,_pDigital,NULL,NULL);
DAQmxStartTask(_taskHandle);
///// sample clock:
DAQmxCreateTask("", &_taskHandleCO);
DAQmxCreateCOPulseChanFreq(_taskHandleCO, "/Dev2/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, _clockRate, 0.5);
DAQmxCfgImplicitTiming (_taskHandleCO, DAQmx_Val_ContSamps, _numSamples);
DAQmxStartTask(_taskHandleCO);
When I run the task without setting retriggerable, it output correct signal. However, if I run with retriggerable, it output almost exact 2 times faster than normal. For example, a pulse with width of 10 ms became 5 ms, and repeat itself again to be 2 pulse of 5 ms. It is repeatable no matter how many or how fast the triggers supplied.
My card is PCIe-6363. I don't know what causes this strange behavior, and hopefully someone can help on this.
Thank you.
Solved! Go to Solution.
09-21-2016 07:04 PM
Hi,
Have you check the example of DAQmx in C about a Retriggerable task?
Look for it at the attachments. In this example it comes how to do a retriggerable task with DAQmx C. Try implementing the Retriggerable function as they do in this example.
09-23-2016 05:24 PM
It goes away after reset configuration. Might be worthwhile for future notice.
09-26-2016 04:43 PM
Hi!
Please mark your post as the solution so it can be used for future reference.