LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Acquisition over Crank angle with two trigger signals

 

 

The capture 720, miss 720 pattern is pretty much expected, as predicted in my earlier message.

 

You relate your need to keep retriggering on TDC pulses to the idea of stopping the engine

mid-cycle while the program continues running.  At a first level of approximation, that shouldn't

drive you to need to do retriggered finite acquisitions.  If the engine comes to a halt, no new crank

angle pulses come in, no new samples are taken, no problem.  You just need to work on handling

the timeout cases where the full set of 720 samples aren't yet available.  Eventually, some seconds,

minutes, or hours later, you'll start the engine back up and produce the rest of the crank angle pulses

for that cycle.

 

The second level of approximation is where there may be some details to work out.  The counter

task meant to measure periods could experience rollover during long idle times.  There's a chance

that the shaft may rock backwards after stopping, and a further chance any such backwards motion 

can result in an extra couple crank angle pulses that cycle.

 

Is there a real value other than slight convenience in keeping the program running when the engine

stops?  It may be important to start making a clear distinction between non-negotiable requirements

and stuff that might just be nice-to-haves that seem like they *ought to* be fairly straightforward.

 

 

-Kevin P

 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 11 of 14
(1,179 Views)

Well, it is more for convenience to not have to restart the programm. I could live with having to restart it every time I start the engine.

The problem with just using the first TDC trigger signal is this: The TDC signal and the degree pulses are coming from two different encoders. When changing the engine speed the encoder with the degree crankangle pulses flexes slightly so it changes a fraction of a degree up two a couple degrees in relation to the TDC signal. Therefore a retriggering of TDC is necessary. I need to be able to change the speed on the fly, while the programm is running. 

 

 

0 Kudos
Message 12 of 14
(1,175 Views)

 

So you *want* the 0 degree pulse point for slow speeds to be at a different rotational angle than the 0 degree point for fast speeds?  Just making sure, I haven't done engine testing.

 

 

Also, I'd say there's a subtle definition problem going on.  The couple degree phase shift caused by speed changes means you aren't getting 720 degrees per cycle every time, you're getting a variable # of measured degrees between successive TDC pulses, anything from 718 to 722.  This variability makes it hard to solve with a fixed task configuration.  Here's my next inclination:

 

- config your 2nd counter as a retriggerable single pulse, with TDC pulse as trigger signal, crank angle pulses as an external timebase, configure 2 Ticks each for high time, low time, and initial delay.  Re-triggering pulse behavior is different on various MIO boards, you'll need to know and account for your own.

- wire the 2nd counter output to an additional AI input channel.

- This 2nd counter's pulse is "timed" by the crank angle pulses which are also your AI sample clock.  This way you can't miss it while the engine is stopped.  By capturing this pulse with your other AI data, you can always find the TDC sample #'s and extract the 718-722 samples between successive ones.

 

  Not real elegant, but should be effective.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 13 of 14
(1,168 Views)

It seems that your issue is not so much software as the design, construction, and installation of your sensors. If the coupling between the engine and the various sensors has a varying angle relationship depending on speed or torque output, you really have no idea what you are measuring!

 

If the sensing system is not up to the job, the data collection system is irrelevant.

 

Given your hardware description, I would consider doing a continuous acquisition using the crank angle as a clock.  Make sure that you have some means (such as a timeout) to stop the acquisition if the engine stops turning (and producing clock pulses).  Verify that the timeout process does NOT use the sample clock for determining when to interrupt. Just record the TDC pulse on another input channel. Then find the edges of the TDC pulses in software to select subsets of data for each cycle.

 

Lynn

0 Kudos
Message 14 of 14
(1,159 Views)