LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a accelerometer using labview

Hi,
 
I own a SerAccel v5 Enclosed is a 3 axis accelerometer from sparkfun electronics. Its uses a rs232 communication protocol and I would like to graph the real time output of this sensor using labview. Detailed specifications for the sensor are included in the following link. I am a complete beginner at this type of computing so I really need help on this.
 
 
Frank
0 Kudos
Message 1 of 3
(3,196 Views)
Frank;

LabVIEW include examples on how to communicate using the serial port. Check the example "LabVIEW <-> Serial.vi"  You should be able to just plug your device to the serial port and talk with the accelerometer using that example.

Enrique

Mensaje editado por Enrique

www.vartortech.com
0 Kudos
Message 2 of 3
(3,190 Views)

Hi,

I am a complete newbie but so far I have been able to communicate through labview using a serial vi and I have now found a labview vi that emulates the functions of hyperterminal which I hope will be useful for my project.

http://www.daqman.com/example.htg/LVTerm.zip

The accelerometer has a output of 250Hz for each axis (X, Y and Z). Here is the link describing the specifications of the sensor.

http://www.sparkfun.com/datasheets/Accelerometers/SerAccel-v5.pdf

Here is an example of the typical output of the accelerometer

X= 0.676 Y=-0.313 Z= 0.754
X= 0.679 Y=-0.326 Z= 0.744
X= 0.676 Y=-0.331 Z= 0.722
X= 0.686 Y=-0.336 Z= 0.725
X= 0.676 Y=-0.339 Z= 0.744
X= 0.691 Y=-0.328 Z= 0.744
X= 0.686 Y=-0.326 Z= 0.706
X= 0.686 Y=-0.339 Z= 0.744
X= 0.686 Y=-0.339 Z= 0.752
X= 0.684 Y=-0.336 Z= 0.744
X= 0.691 Y=-0.326 Z= 0.754
X= 0.691 Y=-0.342 Z= 0.752
X= 0.686 Y=-0.321 Z= 0.744
X= 0.686 Y=-0.318 Z= 0.765
X= 0.686 Y=-0.326 Z= 0.744
X= 0.691 Y=-0.318 Z= 0.722
X= 0.676 Y=-0.328 Z= 0.744

The baud rate is set to the max of 57600. The sampling rate of the sensor is 250Hz. Although I am not sure that hyperterminal is reading data from the sensor at that rate. The faster I can sample the data then the better the time resolution will be for the acceleration event. I need to plot the X, y, and Z axis data versus no. of point in three different graphs on screen.

Looking at different Vi's in the labview forums, I need plotter/data logger so I can display the data in an XY plot and used some history to plot the a trail of points. In parallel a loop is needed to monitor the "log to disk" button and when "on" it would simply write to a file in spreadsheet format. The trick is how do I achieve this??

Has anybody out there got a vi that deals with the output of an accelerometer. I really need this info as I trying to do a volunteer project for training rowers on a rowing ergometer before our rowing season starts.

Frank

0 Kudos
Message 3 of 3
(3,153 Views)