|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Potentiometer wont work
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. |
|
#2
|
|||
|
|||
|
Re: Potentiometer wont work
Quote:
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. |
|
#3
|
|||||
|
|||||
|
Re: Potentiometer wont work
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.
|
|
#4
|
||||
|
||||
|
Re: Potentiometer wont work
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. |
|
#5
|
||||
|
||||
|
Re: Potentiometer wont work
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. |
|
#6
|
|||
|
|||
|
Re: Potentiometer wont work
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|