Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Interrupt triggered DMA (http://www.chiefdelphi.com/forums/showthread.php?t=87223)

kamocat 21-10-2010 20:01

Interrupt triggered DMA
 
1 Attachment(s)
I'm trying to use an analog accelerometer to measure impacts.
To do that, I'm using an interrupt on an Analog Trigger to wait for an impact, and Direct Memory Access to acquire the data.
However, there appears to be an issue with DMA carrying over data from the last acquisition, despite my "read" telling me there is no more data.
Here's a screenshot of my VI:

The vertical line in the graph about 0.2 seconds in is what I'm referring to. (Please ignore the incorrect date in the timestamp)

In addition to this issue, I was wondering if there was a good way to capture the moment of the impact. Continuously acquiring with DMA doesn't sound very efficient (though it would remove the need for an interrupt).


I've uploaded the VI for your review. It's not neat or documented at the moment, but I can improve that if you would like.

Greg McKaskle 21-10-2010 22:37

Re: Interrupt triggered DMA
 
Actually, if acquisition or transfer has any significant setup time, the typical solution is to do acquisition and then trigger after the acquisition to determine what it is you'd like to retain and log. As for efficiency, try it and measure. Many of these resources are HW capabilities and don't tax the cRIO too much.

Greg McKaskle

kamocat 21-10-2010 22:49

Re: Interrupt triggered DMA
 
Okay, I'll try that.
I suppose I could also log the 5v supply at the same time to take out the noise.

Chris Hibner 22-10-2010 07:57

Re: Interrupt triggered DMA
 
In certain automotive modules, data like that is logged and stored by using a circular buffer that is updated every sample (i.e., data is ALWAYS being logged). When a worthy trigger event occurs, data from X sample before the trigger and Y samples after the trigger are then set aside to be written to non-volatile memory.


All times are GMT -5. The time now is 10:12.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi