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