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
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.
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.