04-08-2009 11:54 AM
I am exploring the possibility of writing a program for an engine test stand to control the engine ignition timing. I am having trouble coming up with the concept of how to write this though. Basically, we would have an encoder spinning with the crankshaft, and I would need to turn on a digital output during certain encoder counts. For example, if I was using a 100PPR encoder, running an 8 cylinder engine, I would need to turn on an output during the 1st count, 26th count, 51st count, and 76th count, and reset the counter at the 100th count, or at a home signal.
I have tried to write this program, but the way I have done it requires processing, which takes too much time, resulting in missed output pulses at higher frequencies. In fact, it only worked consistently at very low frequencies.
I need to know if there is some way to make an output go high based directly on the count of a counter? Thanks for any help.
Jeremy
04-08-2009 12:10 PM
You need to use hardware triggering.
See if this info helps:
http://zone.ni.com/devzone/cda/tut/p/id/4329