LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

accelorometer measurement using labview

Hi,

 

i am using NI 9234 to measure the output of accelorometer i have already setted up DAQ assitant to accelaration measurements and connected my accelorometer to NI 9234.

i am newbie to labview my goal is to plot the accelaration output of accelormeter i tried to make the setup as shown in attached file.

the output i am gettting is just one vertical line rather than a half sine wave.

my goal is to get the samples as soon as the accelorometer is activated and record the waveform for few millisecond then save that waveform.

right now i am just getting few vertical lines in the plot when accelorometer gets activated,

please suggest me the procedure and logic required to accomplish my task

 

Thanks,

Ali

 

0 Kudos
Message 1 of 7
(3,576 Views)

Ali,

 

What sampling rate are you trying to achieve?  What do you mean "as soon as the accelerometer is activated"? Do you need triggering?

 

Have you seen this article on setting up accelerometer measurements in LabVIEW?

 

I would also recommend taking a look at the NI Example Finder (Help > Find Examples...) in LabVIEW.  From there, take a look the following examples:

 

Hardware Input and Output > DAQmx > Analog Input > Voltage - Continuous Input.vi

Hardware Input and Output > DAQmx > Analog Input > Voltage - Finite Input.vi

 

Depending on whether you would like to acquire continuously for x milliseconds (or seconds) or acquire n number of samples, one of these two should be very helpful.  Both can be configured for accelerometer measurements by changing the DAQmx Create Virtual Channel VI to be "AI Accelerometer" instead of AI Voltage.

Cody A.
0 Kudos
Message 2 of 7
(3,526 Views)

thank You for your reply.

 

yes  i already went through the document for titled as Making Acceleration Measurements With NI LabVIEW.the want to acheive the maximum possible sample rate.

the shock and vibration example is asking for additional addons when i try to open it.

 

Now what i am trying to do is i made a physical channel setup using Daq Assistant from lab view for accelaration measurement.

 the setup for the accelaration measurement is attached.

For the hardware setup i have an accelorometer and as soon as i physically move the accelormoter  setup i see mutiple outputs of 1000g(just a single line spike) in the graph. contineous output plotted in a graph. as expected the accelormeter would take some time to come back to rest position 

what i am trying to do is to get the plot of accelormeter as soon as its is been moved for first time i want my graph to plot the first spike and plot it in form of half sign wave.

on the basis of above requirements can you suggest me how should i change the graph/logic to get the desired results.

i want to capture the first spike and then resample it to get a much clearer waveform.

i am sorry i might not be able to explain myself but i have attached the VI for your reference.

 

Thanks,

Adnan

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

I would like to add a comment 

i want to capture or extract the part of waveform where the first spike occurs when the accelorometer start giving output.

0 Kudos
Message 4 of 7
(3,504 Views)

Thanks for attaching your VI and screenshot.

 

It sounds like you may want to use an analog start trigger to acquire a finite number of samples once the accelerometer measurement rises above or below a certain level.  If that is the case, check out the Voltage - Finite Input.vi example I mentioned before.  There is a case structure in that code that allows you to add an analog start trigger for your measurement.

 

What do you mean you would like to plot the data in the form of a half sine wave?  What do you mean by resample for  a clearer waveform?

Cody A.
0 Kudos
Message 5 of 7
(3,459 Views)

 

ya exactly i want to acquire a finite number of samples and display it.Thanks for yor recommendation i have checked out the example you mentioned and it seems to be very helpful.

 

normally the shock/vibration output is in the form of half sine wave that lasts for few milli seconds.i actually wanted to zoom in to the graph and see if the output is in form of a curve or not.

By resample i am trying to get a more clearer view of the waveform like if you see in the picture i have attached the waveform graph 2 output is kind of more concentrated(more samples per unit time) so i was trying to get a subset of data from the generated output and resample it using the "subset and resample module" just to see the orignal shape of the output waveform as shown in waveform graph.i am not sure if  this serves what i am trying to acheive or not.

 

Regards,

Ali

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

With any graph in LabVIEW, you can change the range you are viewing, on either axis, by changing the min and max values shown on the graph.  This is done by simply double clicking on the current min or max value, then typing your new min or max.  Be sure autoscaling is turned off for that axis to ensure your edit does not get changed by LabVIEW.  So, if you want to view a smaller portion of data in more detail, try simply changing the range.

 

However, if you want to truly "resample" the data, as in apply some mathematical algorithm to interpolate points in between the actual acquired data points, you can use one of the built in LabVIEW resampling functions to apply this kind of algorithm.

 

Take a look at the "Resampling a Waveform (single-shot)" example VI.  This example can be found by searching the term "resampling" in the NI Example Finder.

Cody A.
0 Kudos
Message 7 of 7
(3,368 Views)