We created an odometer VI to keep track of how far total our robot has gone. We used (or abused) a functional global to do everything. It saves data to the file system periodically. It displays it on the DS screen.
We created an example based on the advanced framework. The example uses two encoders, but any sensor that gives you distance traveled could be used.
You need to download Driver Station LCD Library from http://thinktank.wpi.edu/article/144 and place it in the project directory.
All you need to implement this in your own code is the odometer.vi and odometer.ctl and the above driver station LCD library. Everything else is part of the framework, and is intended as an example of how to integrate it into your own code. You can dig into the odometer VI and see examples of writing to files on the cRIO and writing the driver station LCD.


Reply With Quote
