|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
||||
|
||||
|
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? |
|
#4
|
|||||
|
|||||
|
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. |
|
#5
|
|||
|
|||
|
Re: Getting the battery voltage
The real question is, why are you reading the battery voltage on the robot side? That sounds interesting.
|
|
#6
|
|||
|
|||
|
Re: Getting the battery voltage
Alternately, just wire the 12V into another AI port and read that.
|
|
#7
|
|||
|
|||
|
Re: Getting the battery voltage
Quote:
If you aren't seeing it on the driver station, you may be missing the jumper that selects it. |
|
#8
|
||||
|
||||
|
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? |
|
#9
|
|||||
|
|||||
|
Re: Getting the battery voltage
Quote:
|
|
#10
|
||||
|
||||
|
Re: Getting the battery voltage
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. |
|
#11
|
|||
|
|||
|
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
|
|
#12
|
||||
|
||||
|
Re: Getting the battery voltage
This is what I'm leaning toward as well. It will be one of the first things we check when we open the bag.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |