Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

retriggered single pulse

Solved!
Go to solution

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!

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 1 of 6
(6,306 Views)

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,

John Passiak
0 Kudos
Message 2 of 6
(6,291 Views)

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.

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 3 of 6
(6,285 Views)

He's using a PCIe-6251; previously he used a PCI-MIO-16E-4 under the old NI-DAQ.

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 4 of 6
(6,283 Views)
Solution
Accepted by WM_John_Weeks

@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,

John Passiak
Message 5 of 6
(6,251 Views)

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!!!

John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 6 of 6
(6,239 Views)