03-04-2010 11:09 PM
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
Solved! Go to Solution.
03-04-2010 11:31 PM
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.
03-05-2010
12:09 AM
- last edited on
03-05-2010
08:08 AM
by
Support
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
03-05-2010 02:46 AM
03-05-2010 09:24 AM
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
03-07-2010 09:54 PM
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...
03-13-2010 01:19 AM
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