Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Engine speed and control - basic

Hi. Thanks for any assistance you can provide. I'm a beginner to LabView, and have hit a brick wall/deadline.

Right, I have a nice TTL signal coming from a Hall effect sensor on a gear tooth wheel. There are 108 teeth per revolution and my max engine speed will be 3000rpm, so the max frequency is 5400Hz. I want to do a few things with this, coupled with a TTL signal of TDC.

1) I want to calculate the speed of the engine accurately. I think I can use the Measure Frequency VI, but only if I start it correctly - otherwise it depends if it measures the right no. of pulses. What is the best way to trigger this?

2) The TDC signal will hopefully be used to start counting the pulses/teeth from the sensor. After an EXACT
no. of pulses, I want to then write to a digital line to control fuel injection, and an EXACT no. of pulses later do the same for ignition. The VIs I've found and experimented with do not seem to be able to monitor the COUNT exactly, due mainly to WHILE loop iteration speed (I think). I tried using a static DIO line and my own program with Digital Read Line VI, and it worked at slow speed, but nowhere near the speed I need it to. The VI takes too long to execute as far as I could work out.

I initially thought I'd get away with a PCI-6503 board, but soon realised I probably need counters. I am now testing on a PCI-MIO-16E-4, and have ordered a PCI-6023E which will be used finally.

Any suggestions would be appreciated.
0 Kudos
Message 1 of 3
(3,124 Views)
Frequency measurement uses two counter to take the higher frequency measurements. In order to take lower frequency measurements, especially under 10kHz, I would recommend doing a period measurement and taking the inverse which will give you frequency.

You can use the buffered period measurement example to take period measurements continually and simply convert the period measurement to frequency (1/period).

Use the 20MHz timebase as the source of the counter for better resolution and your signal will connect to the gate of the counter.
0 Kudos
Message 2 of 3
(3,124 Views)
I am also performing an engine control using TTL pulses. I am using the advanced counter vi's, Group Config (set to Retriggerable Pulse), Set Attribute (to set the delay and pulse width in pulses of the source), and Program to start the pulsing. You will probably want to use higher frequency clock source than the 108 teeth/rev for fuel-injection control, as that wouldn't give you very fine control over your fuel charge. I am using an optical encoder with 3600 signals/revolution, but there is probably a way to use one of the built in clocks as the source. A counter can be triggered with your TDC signal, used to set off your retriggerable pulses for fuel injection and ignition and then reset to zero with the next TDC signal and it will happen over and over again. You're w
elcome to email me here and I might be of more help directly. I'm just in the early phases, but have my fuel injection and ignition systems working.

Vern Smith, vsmith@berglin.com
0 Kudos
Message 3 of 3
(3,124 Views)