I'm using Windriver, not LabView. The basic idea is to integrate the accelerometer output to get velocity, and integrate velocity to get distance.
Code:
#define X_ACC_ZERO 1.5
#define Y_ACC_ZERO 1.5
AnalogChannel *m_accelerometerX;
AnalogChannel *m_accelerometerY;
m_accelerometerX = new AnalogChannel(2);
m_accelerometerY = new AnalogChannel(3);
// initialize:
XVelocity = 0.0;
YVelocity = 0.0;
XDistance = 0.0;
YDistance = 0.0;
// periodic:
XVelocity += m_accelerometerX->GetVoltage() - X_ACC_ZERO;
YVelocity += m_accelerometerY->GetVoltage() - Y_ACC_ZERO;
XDistance += XVelocity;
YDistance += YVelocity;
You'll probably have to add code to manage drift, shocks due to collisions, etc., which will cause the velocity and distance variables to diverge from the actual robot velocity and distance traveled. Depending on what you need the numbers for, you might need to convert the units e.g. to actual velocity in m/s. Note that 1G is 9.81 m/(s*s) so that's a start.