Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I cause an event to happen at an EXACT count of edges?

Using LabVIEW, and I'm afraid that I am just a beginner. I am currently using the PCI-MIO-16E-4 board, but will actually be using a PCI-6203E eventually.

Anyway, what I want to do is start counting edges on a TTL pulse coming from a gear tooth sensor. The counting is started by a seperate, single TTL pulse coming from an opto-switch. That is all fine. I then want to send a pulse to my injector after an exact no. of pulses. The incoming rate will be no more than 5400Hz, and outgoing 25Hz. I want a similar setup for ignition, but that is secondary for the moment, unless the solution I can come up with requires more counters of course!

I have experimented with Generate Delayed Pulse, but th
ere just seems so much to take in at once.

Any help would be appreciated.
0 Kudos
Message 1 of 2
(3,354 Views)
There are several event counting examples shipped with NI-DAQ and LabVIEW available in the Help>>Examples>>I/O Interfaces>>Data Acquisition menu. If you set, for example, the code to count edges (low to high) on PFI line 0, the code will count all TTL transistions from low to high on that line. You are not limited to the PFI lines for this application. When the count is of sufficient level, you can trigger your output. Specifically, I might recommend the "Count Edges (DAQ STC)" and "Generate Pulse Train (DAQ STC)" examples for illustrations of edge counting and pulse train generation.

Ryan Mosley
National Instruments, Applications Engineer
http://www.ni.com/exchange
0 Kudos
Message 2 of 2
(3,354 Views)