Normalizing Potentiometers on Startup

Hello all.

I’m using some 10-turn potentiometers for a few different applications. One of them involves a very close opening in which a shooter has to actuate to.

My concern is that if we do not install the potentiometer in an extremely precise manner, and it does not agree with my code, it may cause conflicts in our mechanisms. Is there a way that anyone knows of to normalize the potentiometers to 0 on startup? I am already used the normalize potentiometer value VI included in the LabVIEW code to normalize the values from 0 to 1. And I can easily normalize them from negative one to one with a little math. But is it possible to reset to 0 at startup?

I realize that this could trim some of the range off of the potentiometer, but I don’t plan on using more than one or two full turns.

Thanks!

I did it using a First Call. Place something similar to this code in your TeleOp and Autonomous VIs. This should reset the encoders whenever the robot is enabled into one of these modes. Works great for me.

Capture.JPG


Capture.JPG

You could add a calibrate button to the Dashboard that tells the code to take the current pot reading as the new home position and save it to a local roboRIO file.
On startup read the local calibration file and use the value found there.