Potentiometer

Hello,
Sorry to bug you again, but we are trying to use a potentiometer to set the speed of a motor, but for visualizing what is happening, we are temporarily using a servo in it’s place. We wired a 10 turn pot to the analog module on the crio with the signal wire going to the sweeper pin on the pot.

When we move the pot it sets the servo to one of two positions, either fully rotated one way, or fully rotated the other, and it happens after a fraction of a turn from one endpoint on the pot. So if we are fully CCW on the pot the servo is in one position, if we move the pot about 1/16 of a rotation the servo moves to the opposite end. We tried two different pots to make sure it wasn’t the pot, and they are both 10k ohms. I don’t think I need to wire a resistor in series or anything like that, do I?

I tried using both the GetValue and the GetVoltage functions and have the same issue. Here is the code:

AnalogChannel *MainPot;
float PotValue;
int Temp;


MainPot= new AnalogChannel(1);
PotValue=Temp=0;


			Temp=MainPot->GetValue();
			PotValue=Temp;
			PotValue=PotValue/1000;
			Servo6->Set(PotValue);

I divided GetValue by 1000 because it is a value of 0-1000 (and the Set Servo is -1 to 1) if I understand it right. I used a temporary variable temp to make sure there was no conflict in changing variable types. When I used GetVoltage I divided by 5 because the voltage is 0-5. Is there something obvious I am missing?

What are the other two pins on the potentiometer connected to?

they are connected to the analog breakout as well

What is the voltage on the “sweeper pin” (?) as you turn the potentiometer?

It does read 0-5v, but we noticed that the breakout gets hot when the pot is plugged in (both pots, and both breakouts we have, since we have a spare). My mind goes to some sort of short, but we double checked our power to the breaker, and the pot wiring, and it’s good. Ideas?

What manufacturer and part number is the pot, and what is its value? Can you post a clear picture of how you have the wiring connected to it?

We just decided to clean up the crio and cards, and after cleaning everything up it worked again. Not sure what exactly caused it, but I guess we should try to keep a cleaner environment…