02-18-2014 12:07 PM
I am using NI-DAQmx C/C++ API. How can I set up a counter to produce a retriggerable single pulse? That is, I need to trigger an output pulse, and while the pulse is being generated, if a new trigger comes in, it resets the counter so that the pulse timing is extended.
Is that what the DAQmxSetStartTrigRetriggerable property does? I'm guessing that the ability to do this depends on the hardware being used?
Thanks!
Solved! Go to Solution.
02-18-2014 05:45 PM
No, in DAQmx a "retriggerable" pulse is one that re-arms once it has finished outputting. Any trigger that occurs while the pulse is still being generated would be ignored.
What hardware are you using?
Best Regards,
02-18-2014 06:29 PM
OK, thanks John. I've asked my customer what device he's using.
The need is a replacement for the (ancient) NI-DAQ API GPCTR_Set_Aplication() with ND_RETRIG_PULSE_GNR with something equivalent in NI-DAQmx.
02-18-2014 06:32 PM
He's using a PCIe-6251; previously he used a PCI-MIO-16E-4 under the old NI-DAQ.
02-19-2014 09:25 AM
@WM_John_Weeks wrote:
I need to trigger an output pulse, and while the pulse is being generated, if a new trigger comes in, it resets the counter so that the pulse timing is extended.
...
The need is a replacement for the (ancient) NI-DAQ API GPCTR_Set_Aplication() with ND_RETRIG_PULSE_GNR with something equivalent in NI-DAQmx.
I'm glad you clarified. ND_RETRIG_PULSE_GNR does not extend the pulse timing if an additional trigger is received during generation. From the NI-DAQ Function Reference Manual:
ND_RETRIG_PULSE_GNR: ... Any gate transitions received during the pulse generation are ignored.
With this in mind, DAQmxSetStartTrigRetriggerable is in fact what you would want to use to get the same behavior in DAQmx.
Best Regards,
02-19-2014 03:08 PM
Thanks for the link to the (ancient) documentation- it's been a long time since I did anything with the Traditional NI-DAQ.
I've added an option to my NI-DAQmx code to set the retriggerable option; I trust my customer will be happy.
Again, Thanks!!!