|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||||
|
|||||
|
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? |
|
#3
|
|||
|
|||
|
Re: Current angle from gyro
Quote:
Ethan |
|
#4
|
|||||
|
|||||
|
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. |
|
#5
|
||||||
|
||||||
|
Re: Current angle from gyro
Does it work with the gyro example program?
|
|
#6
|
|||
|
|||
|
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 |
|
#7
|
||||||
|
||||||
|
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.
|
|
#8
|
|||
|
|||
|
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 |
|
#9
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|