Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Current angle from gyro (http://www.chiefdelphi.com/forums/showthread.php?t=91084)

Ethan Spitz 06-02-2011 12:26

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

Alan Anderson 06-02-2011 13:47

Re: Current angle from gyro
 
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?

Ethan Spitz 06-02-2011 14:18

Re: Current angle from gyro
 
Quote:

Originally Posted by Alan Anderson (Post 1016876)
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

Alan Anderson 06-02-2011 14:30

Re: Current angle from gyro
 
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.

Joe Ross 06-02-2011 14:36

Re: Current angle from gyro
 
Does it work with the gyro example program?

Ethan Spitz 06-02-2011 14:55

Re: Current angle from gyro
 
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

Joe Ross 06-02-2011 16:28

Re: Current angle from gyro
 
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.

Ethan Spitz 06-02-2011 18:08

Re: Current angle from gyro
 
I didn't have set gain in there. Could that be it? (I won't be able to test till tomorrow)

Ethan

Ethan Spitz 07-02-2011 22:01

Re: Current angle from gyro
 
I figured it out, it was a stupid error. I made a typo in the reference string.

Thanks for your help!
Ethan


All times are GMT -5. The time now is 09:12.

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