Need help programming a potentiometer

we have been recently trying to program a potentiometer, using LabView’s potentiometer example VI on our robot. However, we are using a VEX potentiometer instead, and when we ran the code on our robot we did not get any voltage readings on the front panel or the FRC Driver Station. The program seems to be working fine, but it isn’t reading any voltage from the potentiometer.

The potentiometer is currently wired into the analog breakout port 2. Do we need to wire it differently, or modify any parts of the program?

A little assistance would be much appreciated. Thanks!

Measure the power, signal, and ground pins at the pot with a handheld multimeter and post your results here.

Ok, so I measured all three pins and they seem to be working fine…

Simply declare a new analog channel (Begin.VI); in periodic tasks, get your refurm name (outside the loops) then put a get voltage on the inside of a loop running at about 100 times a second. You will need to multiply the voltage from the get voltage block (located in analog) in order to get an accurate reading. then use this number however you wish, maybe send it to a global variable. You could also run the refurm name and the get voltage in the teleop (although periodic tasks is much more efficient for this sort of thing).

Ohh, thanks that’s really helpful! Could you maybe show me a picture if possible? But thanks!

Make sure the potentiometer is wired correctly. The middle goes to the analog signal, one and goes to +5 V, and the other end goes to ground. I am guessing that a Vex potentiometer is wired the same way.