Potentiometer wont work

We can’t seem to get our potentiometer to work in labview.

We wired it and checked it with a volt meter, as we turn it the voltage on the signal wire does change. We just can’t get any value to show up in an indicator in labview

We are using the analog get voltage vi

Please tell us exactly how you have it wired. Which connector is it going to? Which wires are connected to which pins on the pot?

We can’t help you if we don’t know what your wiring and your code look like.

red attached to one of the outer ones, black to the other outer, with white in the middle (As I read on many threads, this is how to do it). A cut PWM wire, of course. The other end is plugged into the analog breakout (#1 on the breakout, in slot 1 of the cRIO).

All the same settings were used in the programming.

The wiring sounds right for a typical single-turn potentiometer (many multi-turn pots have the wiper terminal at the end).

How are you trying to show the value? Let us see your code.

The laptop is kept at the school so I wont be able to get to it until monday, but basically:

In open:

Open analog input, slot one and channel one, set ref, error into the error out

in teleop, get ref, then get voltage with the voltage wired to an indicator

and in finish, we close it.

Don’t forget that Teleop runs only when the robot is enabled. You won’t see anything change on the indicators if the robot is disabled.

Did you plug it into the analog breakout so that it matches the wiring diagram on the side? The -, on the side closest to the PWM-holder-inner thing, should be the black wire, the middle should be red, and the “Sig” should be the white one.

What output are you getting from the indicator? 0? 5? Is it giving random numbers? Does the value go down when you turn the pot up? Does it change with the pot, but in a weird way?

Random numbers probably means not connected, 0 would probably mean teleop isn’t enabled. If it changes in a weird way when you turn the potentiometer, you might have the PWM cable in the analog breakout backwards. If the value is inversed of what you think it should be, either reverse it in the code (I guess that would be later) or swap the red and black cables.

Try using the Analog Input Example that NI gives you before further testing so you can rule out electrical problems.

When the LabView splash window opens, go to the bottom right corner and click FRC examples, go to the analog folder and click the Analog Input Example. Make sure you set the IP of your robot when you open up the Analog Input Example project.

Here is what I did to show the value which I think is your problem. It writes a string to the driver station and you can look at it when the robot is running.

Capture.PNG


Capture.PNG