|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Interrupt triggered DMA
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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
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. |
|
#4
|
||||||
|
||||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using Interrupts or DMA or timing to control digital I/O switch | mikeppalmer | NI LabVIEW | 13 | 23-02-2010 13:36 |
| Sequence of solenoids triggered by a button? | Team1908 | NI LabVIEW | 4 | 21-02-2010 21:33 |
| interrupt enable | 3dude_2231 | Programming | 6 | 10-02-2008 16:08 |
| Interrupt question | Kashi Chan | Programming | 2 | 07-03-2005 08:28 |
| enable interrupt | Dean | Programming | 2 | 13-02-2005 07:37 |