Go to Post Maybe its time we should all get back to the basics...the joy of building something amazing with the people you care about. - Andy Grady [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 02-02-2013, 16:28
cammy:)'s Avatar
cammy:) cammy:) is offline
Cammy
FRC #3008 (Kalani Falcons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Hawaii
Posts: 11
cammy:) is an unknown quantity at this point
Need help programming a potentiometer

Hello--
we have been recently trying to program a potentiometer, using LabView's potentiometer example VI on our robot. However, we are using a VEX potentiometer instead, and when we ran the code on our robot we did not get any voltage readings on the front panel or the FRC Driver Station. The program seems to be working fine, but it isn't reading any voltage from the potentiometer.

The potentiometer is currently wired into the analog breakout port 2. Do we need to wire it differently, or modify any parts of the program?

A little assistance would be much appreciated. Thanks!
__________________
☁ ☁
┏┷┷┓ ♪
▌▣﹏▣ ▌♫
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2013, 17:28
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,034
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Need help programming a potentiometer

Quote:
Originally Posted by cammy:) View Post
Hello--
we have been recently trying to program a potentiometer, using LabView's potentiometer example VI on our robot. However, we are using a VEX potentiometer instead, and when we ran the code on our robot we did not get any voltage readings on the front panel or the FRC Driver Station. The program seems to be working fine, but it isn't reading any voltage from the potentiometer.

The potentiometer is currently wired into the analog breakout port 2. Do we need to wire it differently, or modify any parts of the program?

A little assistance would be much appreciated. Thanks!
Measure the power, signal, and ground pins at the pot with a handheld multimeter and post your results here.


Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2013, 18:00
cammy:)'s Avatar
cammy:) cammy:) is offline
Cammy
FRC #3008 (Kalani Falcons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Hawaii
Posts: 11
cammy:) is an unknown quantity at this point
Re: Need help programming a potentiometer

Ok, so I measured all three pins and they seem to be working fine....
__________________
☁ ☁
┏┷┷┓ ♪
▌▣﹏▣ ▌♫
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2013, 18:35
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 204
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: Need help programming a potentiometer

Simply declare a new analog channel (Begin.VI); in periodic tasks, get your refurm name (outside the loops) then put a get voltage on the inside of a loop running at about 100 times a second. You will need to multiply the voltage from the get voltage block (located in analog) in order to get an accurate reading. then use this number however you wish, maybe send it to a global variable. You could also run the refurm name and the get voltage in the teleop (although periodic tasks is much more efficient for this sort of thing).
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2013, 20:29
cammy:)'s Avatar
cammy:) cammy:) is offline
Cammy
FRC #3008 (Kalani Falcons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Hawaii
Posts: 11
cammy:) is an unknown quantity at this point
Re: Need help programming a potentiometer

Ohh, thanks that's really helpful! Could you maybe show me a picture if possible? But thanks!
__________________
☁ ☁
┏┷┷┓ ♪
▌▣﹏▣ ▌♫
Reply With Quote
  #6   Spotlight this post!  
Unread 05-02-2013, 23:02
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Need help programming a potentiometer

Make sure the potentiometer is wired correctly. The middle goes to the analog signal, one and goes to +5 V, and the other end goes to ground. I am guessing that a Vex potentiometer is wired the same way.
__________________

I am N2IRZ - What's your callsign?
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 04:11.

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