LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

high speed change detection along with high speed AI

Solved!
Go to solution

I'm working on a helmet testrig. We're using PCI M-6251 card. A 3-axis accelerometer is fixed inside the helmet and its dropped from variable heights upto 3m. When its dropped, i need to acquire the analog input from the accelerometer ( sampling >= 100Khz) and also find the velocity with which it hits the bottom.

 

The way i'm finding the velocity is by two sensors 4cm apart at the bottom . When the helmet assembly passes through the sensors, they become high momentarily and my DI should get me the corresponding time. 

 

This is my problem area and also very crucial part of the program. For 2 seconds or so the data is acquired. One is analog input from 3-channels at sampling rate >=100Khz, second is digital input from these digital sensors( two proximity sensors) within 10msec the helmet assembly passes from one sensor to the other. I'm unable to detect the time when the sensors go high.

 

my first try was (fig Acq1) just a digital input task set to on demand. (the flags are to make sure I get the time only once for each sensor). This always gives me time difference of either 16msec, 32msec or 0 for any speed.

 

So my second try was change detection method (followed one of the programs posted on the forum). This also seems to sense only 0msec, 15msec or 31msec only. This cannot be true since higher heights the helmet is dropped, it is faster and for these the time difference between two sensors it gives is Zero.

 

The way I've implemented change detection is, I just get time stamp for first change detection and second change detection only-hence the case structure inside event structure.

is there any other better way to do this??

 

thanks a lot .

Pallavi

 

 

Download All
0 Kudos
Message 1 of 7
(3,294 Views)

When you send only a screenshot of your VI instead of the actual VI, it is impossible to tell how you have the properties set up inside all of those express VI's.

 

But it seems like you are registering for the change event, but then only relying on single samples and windows timing to tell you how fast it is falling.  Windows timing is going to give you a resolution on the order of 16 msec.

 

Why not acquire from the digitals sensors as a digital waveform with a high enough acquisition rate?  Then you can use the timing properties of the waveform to compare the pulse in one channel to the pulse in the other channel.

0 Kudos
Message 2 of 7
(3,290 Views)

Thanks for your quick reply..

I've attached the two vi's. you'll have to dig this part in the vi though. This part of acquisition is almost towards the end.

 

As you suggested if I do continuous digital in, can I do it without having to use external clock? 

 

Edit: Attachments removed

Message Edited by Support on 03-05-2010 08:08 AM
0 Kudos
Message 3 of 7
(3,283 Views)
I think the previous VI's are too big..Please see the attached vi's below that contain only the acquisition part. 
Download All
0 Kudos
Message 4 of 7
(3,267 Views)
Solution
Accepted by topic author palkin

I don't see any reason why you would need an external clock.  The PCI-6251 has an internal clock.

 

I would look in the example finder for DAQmx examples that use analog and digital inputs.  I think one that would work for you is Multi-Function-Synch AI-Read Dig Chan.vi

0 Kudos
Message 5 of 7
(3,248 Views)

I think the example Multi-Function-Synch AI-Read Dig Chan.vi is going to work for me...Thanks so much for pointing it out. I'm going to test it today onsite.

 

I was looking at the timing property node, to extract the timing info in the digital channels ( time when it goes high) should I use change detection? . I'm not very familiar with hte properties since I've only used express vi so far  this is my first usage of DAQmx.  Also to get the time info can I do it while it is reading the channels or should i store the data and then later detect it?

 

Thanks...

 

0 Kudos
Message 6 of 7
(3,225 Views)

Hi Ravens Fan,

 

Thanks  very much for pointing me out in the right direction.. Initially the example din't work for me the timing was getting off and din't understand.. later browsing through the forums downloaded "Get terminal name with device prefix.vi " into my system and that seemed to solve it..

 

Currently this problem is solved but now a new one has surfaced.. I have posted the query under a different thread

 

Pallavi

 

0 Kudos
Message 7 of 7
(3,186 Views)