Go to Post We have not always been a winning team but we have always tried to be a quality team. - WynS [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 10-03-2010, 12:43
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Getting the battery voltage

Hi!
I would like to get the voltage of the battery in the code itself.
I belive this is very possible, but I do not know how to do it.
I have the voltage shown properly on the driver station.
If anyone knows how to get the voltage I would appreciate it.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-03-2010, 15:52
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Getting the battery voltage

Since your jumper is setup correctly, you just need to read Analog Input #8

You'll need an OPEN in your BEGIN.VI, then simply do a GET from that analog input.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #3   Spotlight this post!  
Unread 10-03-2010, 16:49
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Re: Getting the battery voltage

I have already tried that, and it gave me a value of 0, than it also gave me 0 on the driver station.
I will try that again.
Meanwhile, any other suggestions?
Reply With Quote
  #4   Spotlight this post!  
Unread 10-03-2010, 19:44
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: Getting the battery voltage

The communication task already acquires Analog Input 8 on slot 1. I don't think the system will let you open it again.

You might be able to modify the Start Communication vi to save the battery voltage in a global variable for you. Find the case where it says "Read the battery voltage every 200ms." and try storing the result of the multiplication in the "0" case into a new global that you can read elsewhere in the project.
Reply With Quote
  #5   Spotlight this post!  
Unread 11-03-2010, 11:46
EricWilliams EricWilliams is offline
Registered User
FRC #2039 (Rockford Robotics)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2001
Location: Rockford, IL
Posts: 103
EricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of light
Re: Getting the battery voltage

Quote:
Originally Posted by Itamar View Post
I have already tried that, and it gave me a value of 0, than it also gave me 0 on the driver station.
I will try that again.
Meanwhile, any other suggestions?
The real question is, why are you reading the battery voltage on the robot side? That sounds interesting.
Reply With Quote
  #6   Spotlight this post!  
Unread 11-03-2010, 13:06
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: Getting the battery voltage

Alternately, just wire the 12V into another AI port and read that.
Reply With Quote
  #7   Spotlight this post!  
Unread 11-03-2010, 13:41
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Getting the battery voltage

Quote:
Originally Posted by 1075guy View Post
Alternately, just wire the 12V into another AI port and read that.
12V is outside of the range of the analog inputs. A voltage divider would be required for this configuration.

If you aren't seeing it on the driver station, you may be missing the jumper that selects it.
Reply With Quote
  #8   Spotlight this post!  
Unread 11-03-2010, 14:06
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Getting the battery voltage

Here is the odd thing. Like the OP, we do not display the battery voltage on the drivers station. It worked just fine until we applied the last updates to both the cRio and the DS. Now it only gives us "0.00".
The jumper is on the outer two pins of the analog bumper, exactly where it was before the update. Other than that, everything works perfectly.

Any ideas?
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #9   Spotlight this post!  
Unread 11-03-2010, 16:53
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: Getting the battery voltage

Quote:
Originally Posted by billbo911 View Post
Here is the odd thing. Like the OP, we do not display the battery voltage on the drivers station. It worked just fine until we applied the last updates to both the cRio and the DS. Now it only gives us "0.00".
The jumper is on the outer two pins of the analog bumper, exactly where it was before the update. Other than that, everything works perfectly.

Any ideas?
Is the green power LED lit on the analog breakout board?
Reply With Quote
  #10   Spotlight this post!  
Unread 11-03-2010, 16:59
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Getting the battery voltage

Quote:
Originally Posted by Alan Anderson View Post
Is the green power LED lit on the analog breakout board?
Yes sir. Our Gyro on Ch.1 works as well, so we know the board is getting power to the bumper.

It really seems odd to us. The ONLY thing we changed between when it worked and when it didn't was the curio firmware and the DS software.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #11   Spotlight this post!  
Unread 15-03-2010, 20:02
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Getting the battery voltage

we had an issue similar to this but the problem was intermittent, eventually traced it back to a flakey jumper, try changing it out see if that makes a difference
Reply With Quote
  #12   Spotlight this post!  
Unread 15-03-2010, 21:31
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Getting the battery voltage

Quote:
Originally Posted by Zme View Post
we had an issue similar to this but the problem was intermittent, eventually traced it back to a flakey jumper, try changing it out see if that makes a difference
This is what I'm leaning toward as well. It will be one of the first things we check when we open the bag.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #13   Spotlight this post!  
Unread 24-03-2010, 14:16
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Getting the battery voltage

Well, the jumper checked out normal. So now we are at a loss. We will have the robot out of the bag for four hours this Saturday, hopefully we can figure this out.

Does anyone else have any ideas what may be preventing this from working correctly?
Again, it worked fine until we did the last cRio and DS updates.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
Reply With Quote
  #14   Spotlight this post!  
Unread 26-03-2010, 00:28
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Getting the battery voltage

Quote:
Originally Posted by billbo911 View Post
Well, the jumper checked out normal. So now we are at a loss. We will have the robot out of the bag for four hours this Saturday, hopefully we can figure this out.

Does anyone else have any ideas what may be preventing this from working correctly?
Again, it worked fine until we did the last cRio and DS updates.
Any chance your code is now opening channel 8 on its own? This will cause a resource in use error. I'm guessing your module is ok since you said the gyro works... metal shavings in the db15 connectors can kill the slot and make all channels return 0.

If you have both analog modules installed, you could read the battery voltage from the slot 2 module.

-Joe
Reply With Quote
  #15   Spotlight this post!  
Unread 26-03-2010, 01:18
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Getting the battery voltage

We've seen this before when the analog breakout itself went bad at MARC last year - we were helping the robot next to us and NO one could figure out why they weren't getting battery voltage - so we started swapping out hardware.

You might try swapping your analog breakout.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Battery voltage Yuan Xue Lim Electrical 7 04-02-2009 23:10
paper: Reading the FTC Battery Voltage PhilBot Extra Discussion 4 16-01-2009 08:46
[FTC]: Reading the 12V Battery voltage in LabVIEW PhilBot FIRST Tech Challenge 7 12-01-2009 21:13
The 8.2 (or 8.3) Battery Voltage Bug eugenebrooks Programming 167 21-02-2008 20:05
Battery Voltage Neal Probert Programming 3 09-01-2003 10:18


All times are GMT -5. The time now is 11: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