[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.

What a great VI and program for all to use Phil. Thank you!

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.

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

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?

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,