Current angle from gyro

Hey, I was wondering if anyone knows how to use the “Gyro Get Angle” block in labview. I wired it up and put an indicator on it, but it seems to just keep increasing in angle infinitely or decreasing in angle infinitely.

Am I doing something wrong with this? Or is the subvi just bad?

Ethan

Did you open a gyro reference in Begin and use the same name for its reference in Teleop?

Do you actually have a yaw rate sensor “gyro” connected on Analog Input 1 or 2?

Analog 1 and it is referenced in begin and uses the same name.

Ethan

There’s nothing wrong with the LabVIEW functions.

If your Get Angle continuously increments or decrements, one of three things is likely. First, you might have a faulty gyro. Second, you might have misconnected to its Temperature output instead of its Rate output. Third, your robot might have been jostled during the brief time the gyro code was being initialized and measuring the sensor’s offset.

Check your wiring first.

Does it work with the gyro example program?

The wiring is good. The angle per second was working fine. So are you saying next time i start it up if it is still it will work?

What is the example gyro code?
Ethan

From the getting started window in LabVIEW, select the “Find FRC examples” in the lower right hand corner. It will give you examples for many different sensors actuators, and other things. The examples show the required wiring and minimal code to get it working.

I didn’t have set gain in there. Could that be it? (I won’t be able to test till tomorrow)

Ethan

I figured it out, it was a stupid error. I made a typo in the reference string.

Thanks for your help!
Ethan