Go to Post That's is why I raised this question, becuase I do not know all the facts (I doubt anyone does). - Ken Leung [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 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: 137
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
  #2   Spotlight this post!  
Unread 21-01-2011, 08:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
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,833
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
  #3   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: 87
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
  #4   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 21:21.

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