Go to Post If Andy asked y'all to stand on your head, would you do that, too? ;) - Madison [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-10-2010, 20:01
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
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.
Attached Files
File Type: vi High speed DAQ.vi (36.4 KB, 23 views)
__________________
-- Marshal Horn
Reply With Quote
  #2   Spotlight this post!  
Unread 21-10-2010, 22:37
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #3   Spotlight this post!  
Unread 21-10-2010, 22:49
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
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.
__________________
-- Marshal Horn
Reply With Quote
  #4   Spotlight this post!  
Unread 22-10-2010, 07:57
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
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.
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 21:17.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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