Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to count every 100 TTL pulses and send 1 pulse out continuously.

Hi,
 
I was trying to count every 100 pulses to send an pulse out back to caller using Task.CIChannels.CreateCountEdgesChannel().
It's like a divider to take a TTL pulses and divided by 100 and send an pulse out. Is there any simple way to do it?
 
Thanks
 
Wen
 
0 Kudos
Message 1 of 2
(3,044 Views)
Hi Wen,
 
You can do this using a counter output task.  You will want to set the counter to output continuously.  You can route the TTL signal to a PFI line and then set the output task to output a pulse based upon ticks.  For example, you could set the task to be idle low and have 98 ticks low and 2 ticks high (total of 100 TTL ticks). 
 
Here is a picture of how this would be done in LabVIEW:
 
The equivalent C function calls would be:
DAQmxCreateCOPulseChanTicks
DAQmxCfgImplicitTiming
DAQmxStartTask
DAQmxGetTaskComplete
DAQmxClearTask
 
In .Net you will want to look at the CODataTicks Structure.
 
Regards,
Jennifer O.
Applications Engineer
National Instruments

Message Edited by Jennifer O on 12-14-2006 04:10 PM

0 Kudos
Message 2 of 2
(3,027 Views)