Go to Post With any dollar amount to invest I would be more interested in the number of individuals (students is too narrow) impacted than the number of teams created--after all, this is about people. - kramarczyk [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-02-2016, 15:42
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Normalizing Potentiometers on Startup

Hello all.

I'm using some 10-turn potentiometers for a few different applications. One of them involves a very close opening in which a shooter has to actuate to.

My concern is that if we do not install the potentiometer in an extremely precise manner, and it does not agree with my code, it may cause conflicts in our mechanisms. Is there a way that anyone knows of to normalize the potentiometers to 0 on startup? I am already used the normalize potentiometer value VI included in the LabVIEW code to normalize the values from 0 to 1. And I can easily normalize them from negative one to one with a little math. But is it possible to reset to 0 at startup?

I realize that this could trim some of the range off of the potentiometer, but I don't plan on using more than one or two full turns.

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 21-02-2016, 18:53
Trinitrotoluene's Avatar
Trinitrotoluene Trinitrotoluene is offline
Registered User
FRC #3102 (Nevis Tech-No-Tigers)
 
Join Date: Jul 2013
Rookie Year: 2012
Location: Nevis, MN
Posts: 15
Trinitrotoluene is an unknown quantity at this point
Re: Normalizing Potentiometers on Startup

I did it using a First Call. Place something similar to this code in your TeleOp and Autonomous VIs. This should reset the encoders whenever the robot is enabled into one of these modes. Works great for me.
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	26
Size:	25.5 KB
ID:	20139  

Last edited by Trinitrotoluene : 21-02-2016 at 18:55. Reason: Clarity.
Reply With Quote
  #3   Spotlight this post!  
Unread 21-02-2016, 19:12
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,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: Normalizing Potentiometers on Startup

You could add a calibrate button to the Dashboard that tells the code to take the current pot reading as the new home position and save it to a local roboRIO file.
On startup read the local calibration file and use the value found there.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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:07.

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