Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: Reading the 12V Battery voltage in LabVIEW (http://www.chiefdelphi.com/forums/showthread.php?t=71535)

PhilBot 07-01-2009 21:02

[FTC]: Reading the 12V Battery voltage in LabVIEW
 
Hi

I got sick of forgetting to turn on our 12V battery (for FTC) and since we can't add any sort of power indicator there's no "easy" way to allert the driver before the match starts.

Well, it turns out that the HiTechnic Motor Controller does actually measure the battery voltage and makes it available as a register.

I wrote a LabVIEW VI to read this register and convert it to milli-volts.

The cool thing is that if the battery voltage is actually OFF, then the VI returns an error. So you can detect low voltage and no-voltage.

I've written a White Paper and attached the VI along with a sample beeper program.

It's here: http://www.chiefdelphi.com/media/papers/2189

If you use it in your "disable"loop it will allert you of a problem while setting up on the field.

emmell 08-01-2009 00:36

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
What a great VI and program for all to use Phil. Thank you!

jbbjjbt 12-01-2009 09:00

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
We tried this over the weekend. This is great. How in the world did you ever figure this out?

PhilBot 12-01-2009 10:50

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
Quote:

Originally Posted by jbbjjbt (Post 799196)
We tried this over the weekend. This is great. How in the world did you ever figure this out?

I emailed Hitechnic and asked (begged) for the register spec for the Motor Controller.

They are planning on releasing this spec. soon, but they let me see the preliminary issue. It probably helped that I'm a FRC Beta Tester, and had already been working with folks from NI and FIRST.

To be fair, I felt that everyone should benefit from what I learned.
So I created the VI and sample program.

Before you ask for a copy of the spec, I was asked not to distribute it, since it was preliminary.

Phil.

EricVanWyk 12-01-2009 11:13

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
Quote:

Originally Posted by jbbjjbt (Post 799196)
We tried this over the weekend. This is great. How in the world did you ever figure this out?

The FRC community has grown accustomed to accepting that Phil does things that others can not. I believe the FTC community will soon follow.

emmell 12-01-2009 11:13

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
Phil:

Can you turn this VI into a NXT-G block for those that are programming in that language.

Thanks,

PhilBot 12-01-2009 11:20

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
Quote:

Originally Posted by emmell (Post 799267)
Phil:

Can you turn this VI into a NXT-G block for those that are programming in that language.

Thanks,

Oh Boy.... now you're really challenging me. I've never done a NXT-G block before (certainly not one that accesses the ports directly). Is it possible to look inside the existing FTC ones to see how they work?

emmell 12-01-2009 21:13

Re: [FTC]: Reading the 12V Battery voltage in LabVIEW
 
Actually it might be easier than you think. Having never done LabView, I don't know what it takes, but NI was nice enough to give us manuals with the FTC install of their software. Look in their subfolder trees under the Manuals folder. There should be a PDF file called "NXT_Creating_MINDSTORMS_Blocks". It looks like it walks your through the entire process.

Thanks,


All times are GMT -5. The time now is 18:03.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi