Go to Post stop whining about something that can be solved by working harder. - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2011, 16:09
Arthur But' Arthur But' is offline
Registered User
FRC #2213
 
Join Date: Nov 2010
Location: Israel
Posts: 17
Arthur But' is an unknown quantity at this point
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).
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2011, 16:27
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2011, 04:58
Arthur But' Arthur But' is offline
Registered User
FRC #2213
 
Join Date: Nov 2010
Location: Israel
Posts: 17
Arthur But' is an unknown quantity at this point
Re: Potentiometer use in Labview

Thank you.

Can someone also give an example of how it supposed to look like?
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2011, 04:37
Arthur But' Arthur But' is offline
Registered User
FRC #2213
 
Join Date: Nov 2010
Location: Israel
Posts: 17
Arthur But' is an unknown quantity at this point
Re: Potentiometer use in Labview

Quote:
Originally Posted by Arthur But' View Post
Thank you.

Can someone also give an example of how it supposed to look like?
Anyone?
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2011, 05:31
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 134
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
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.
__________________
Doug Norman
National Instruments
Reply With Quote
  #6   Spotlight this post!  
Unread 21-01-2011, 08:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,713
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-01-2011 at 16:34.
Reply With Quote
  #7   Spotlight this post!  
Unread 21-01-2011, 16:28
Clayton Yocom's Avatar
Clayton Yocom Clayton Yocom is offline
Programming Mentor
FRC #0027 (RUSH)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Clarkston, MI
Posts: 86
Clayton Yocom will become famous soon enoughClayton Yocom will become famous soon enough
Send a message via AIM to Clayton Yocom Send a message via MSN to Clayton Yocom Send a message via Yahoo to Clayton Yocom
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 21-01-2011, 17:33
Arthur But' Arthur But' is offline
Registered User
FRC #2213
 
Join Date: Nov 2010
Location: Israel
Posts: 17
Arthur But' is an unknown quantity at this point
Re: Potentiometer use in Labview

Thank you all very much, u helped me a lot

Last edited by Arthur But' : 21-01-2011 at 18:02.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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