Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Potentiometer use in Labview (http://www.chiefdelphi.com/forums/showthread.php?t=89492)

Arthur But' 18-01-2011 16:09

Potentiometer use in Labview
 
Hello.
I just started this year to learn how to work with labview for the FRC competition, and now i understand most of the program.
Nevertheless i still don't understand how to configure the Potentiometer in Labview, also i didn't find any VIs which has anything to do with it.

Basically what we are trying to do is to move the arm, by 3 buttons, so each of them will move arm in a specific angle..... if any one could give me an example of how to operate the Potentiometer in Labview, or if any one would give me a tutorial to it , it would be great!!!

Team 2213 (Israel).

Alan Anderson 18-01-2011 16:27

Re: Potentiometer use in Labview
 
A properly wired potentiometer provides a variable voltage that is proportional to the angle at which it is turned. Voltages are analog signals, and get connected to the Analog Breakout.

Each set of three pins on the Analog Breakout provides exactly what you need to connect to a potentiometer. Wire one end of the pot to the +5 pin (center). Wire the other end of the pot to the Ground pin. The Signal pin goes to the wiper of the pot. Usually, the wiper is the middle one of three connections on the pot. On a typical PWM cable, Ground is black, +5 is red, and Signal is white.

Read the value using an Analog Get function.

Arthur But' 20-01-2011 04:58

Re: Potentiometer use in Labview
 
Thank you.

Can someone also give an example of how it supposed to look like?

Arthur But' 21-01-2011 04:37

Re: Potentiometer use in Labview
 
Quote:

Originally Posted by Arthur But' (Post 1004103)
Thank you.

Can someone also give an example of how it supposed to look like?

Anyone?

Doug Norman 21-01-2011 05:31

Re: Potentiometer use in Labview
 
Have you looked in the Example Finder? There is a Potentiometer with Driver Station example. It's not for the robot side of things, but it does show a potentiometer - the wiring idea is the same. I'll look into adding a robot side potentiometer example to the Example Finder.

Mark McLeod 21-01-2011 08:54

Re: Potentiometer use in Labview
 
I have a simple example of the basic code side on this page about a quarter of the way down, labeled Analog Input example.
But what you're looking for is probably the PID Example close to the bottom.

That demonstrates the use of a steering potentiometer to position a motor based on the position of a joystick.
For your fixed position arm you'd replace the whole joystick input with just a constant = the exact voltage you'd want the arm potentiometer to read when the arm is where in a fixed position.

You'd have to add a case statement to chose the different values you want the pot to have.

Clayton Yocom 21-01-2011 16:28

Re: Potentiometer use in Labview
 
Its pretty easy once you get started, the starting from the example Mark posted, the Analog get returns the value of the potentiometer as a voltage, you can start making this.

You should change the .5 to whatever value you want the motor to run at, and the 2.4 and 2.5 to where you want the motor to stop at which value on the potentiometer, you should also change the way this is done once you get used to PID controls, as this is a really mediocre way to code this, but it works as a proof of concept.

Arthur But' 21-01-2011 17:33

Re: Potentiometer use in Labview
 
Thank you all very much, u helped me a lot ;)


All times are GMT -5. The time now is 10:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi