

For this kind of action, you will use the Read VI. You may want to use the IMU output to accurately track your robot's direction of travel so that you drive straight, or rotate to the right angle.

When you're done, your IMU blocks in Begin.VI should look like this. I've named mine “MyIMU” but you can change this to whatever you want. Right click on the “refnum name” pin on the Registry Set VI and click “Create -> Constant” and create a unique name that you will use to refer to this IMU in the rest of your code. Now you need to assign a name to your IMU. Then, connect the ADI IMU DevRef Out pin on the Open VI to the ADI IMU DevRef pin on the Registry Set VI. Grab the Registry Set VI from the ADIS16470 IMU palette and place to the right of your Open VI. Now you need to assign a reference name to this IMU so that you can refer to it in other VIs. Remember, it's vital that the robot remains completely stationary during this calibration time! You can optionally specify a custom calibration time as shown below, but the default is 4 seconds if you don't define it. Bring the Open VI into your Begin.vi code. The first step is to create a new instance of the IMU. All VIs for the ADIS16470 library can be found in the pallet shown below. This can be found in the project window under Team Code. Open your robot project, or create a new one if you don't have one created already, and open up your Begin.vi block diagram.
