How to calibrate NXT motors to travel the same distance? The motors included with the NXT are not all created equal - when given the same input power level, they do not always go the same distance or turn at the same rate. 

I measured this by creating a small program to turn two motors at the same speed, and measure their rotation. The results showed differences of over 100 degrees within less than a minute of driving.



Is there any way to either mechanically calibrate the motors, or easily account in the program for the difference in their powers once it has been determined? Given that the NXT can detect how far each motor has rotated, is there any way to have it automatically adjust the speed of one of the motors when it detects that it's "falling behind"? (Note that I'm using LabVIEW 2011 for programming this, but I would accept an answer that is just a code concept, if it could potentially be implemented in LabVIEW.)
You can't calibrate the motors, neither mechanically or in software. There is however several methods in the software to account for this.

The standard NXT firmware contains a synchronization mode which attempt to keep the two motors aligned. In NXC you can do this by using the function OnFwdSync like this:
OnFwdSync( OUT_AC, 75, 0 );
First parameter is the motors to sync, the second is the power and the third defines the difference in speed between the motors (used for the tribot).

This article tells how to do the same in RoboLab: How does NXT motor synchronizing work in ROBOLAB?

In NXT-G I think synchronization is on per default in the move block, correct me if I'm wrong.

I don't know how to do this in LabView. However I have heard there is some blocks to do this in the "NXT I/O»NXT Native I/O»Output" palette, try looking there.

You can make your own controller by looking at the rotation value. Calculate the difference and set the speed like this:

Motor A = power + weight * difference
Motor B = power - weight * difference


The weight is how much the difference should affect the motor speed, you will need to experiment a bit to find a good value here. You might also want to take the 100% limit in account. If the power for one motor goes over 100%, do this:

if( Motor A &gt; 100 )
   Motor B = Motor B - ( Motor A - 100 )

if( Motor B &gt; 100 )
   Motor A = Motor A - ( Motor B - 100 )