01-17-2010 02:29 PM
I am trying to create an engine management system for a single-cylinder engine using a USB6216 device and LabVIEW 8.2.
I need to create outputs (to a spark plug and injector) at the appropriate point in the engine cycle.
My experimentation has showed that a delay of about 15ms occurs when I request an analogue/digital/counter channel to create a single pulse.
This is too long for my purposes and gives a very erratic output pattern.
I have used triggering on the counter channels to eliminate this delay, but this does not allow me to vary the output pulses according to various parameters I am measuring.
Can you confirm ~15ms is a standard delay for a single sample output (I can not find it on the datasheet), or advice me where I am going wrong.
01-19-2010 03:58 AM
Are you using Hardware Timed Single Point output generation mode? Using this could reduce the delay as the data being sent to the output is stored on the buffer on the device as opposed to being sent directly from the PC.
If you aren't using Hardware Timed Single Point then try utilising that. Let me know how you get on.
01-19-2010 10:36 AM
The USB DAQ devices do not support hardware timed single point (see here).
It sounds like you want to implement some sort of feedback control system with software control of the outputs. USB is not the best platform to build such a system on, as the latency between bus transfers is very high.
Depending on what exactly you need to output, you may be able to use hardware triggering to achieve the results you need. If you need to modify the output on-the-fly through software you might want to consider an FPGA-based solution instead. A PCI DAQ card would give significantly lower latency than the USB equivalent, but the lowest latency would come from performing all of the processing in hardware using an FPGA.
Sorry to be the bearer of bad news, I hope this is helpful.
01-19-2010 11:33 AM
Thanks for the suggestion, however the Labview help file states that:
"M Series USB devices do not support hardware-timed single-point sample mode or Wait for Next Sample Clock." (Timing Considerations with M Series USB Devices)
I am using the LabVIEW PC program to decide each cycle when to send an output to the injector/ignition. This information can not be produced in advance so I can only request an immediate output from the DAQ.
I feel that the DAQ can not be updated fast enough with a single sample output, are there any known limitation to this response time? Would the USB device therefore not be suitable for real time use as an engine management system?
01-19-2010 11:36 AM
This is what I suspected,