|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
OK so we wanted to install a gyro, and we did it, no explosions yet, but the values aren't correct at all, they randomly fluctuate w/o any response to the actual gyro rotation. We wired all correctly, and programmed according to
![]() Any help? <- my mentor's addition |
|
#2
|
||||
|
||||
|
Re: Gyro problems
When using a gyro, the gyro will not at first give a degree that you do not expect. If you are thinking in the form of 0-360 degrees. You need to use the modular division to get the 0-360 you want. I noticed in your begin that your gain is set to 125 mV/sec, you want to refer to the first technical resources for setting up the gyro. It is actually 7 mV/sec. When setting up the gain it should have .007 as the constant for the set gain vi. Also you probably do not want to continually read a gyro in the tele-op vi, since LabVIEW will continually read the gyro and eat up your processing time. You want to use the example to figure out a loop delay and move your gyro reading into Periodic tasks.
Another note to add is that a gyro will continually add on to itself due to factors you can't control. To mitigate this, you would want to reset your gyro at points where it will not affect your measured heading.(i.e. Reset gyro when the robot faces the drive station.) Last edited by Kevin Phan : 26-01-2014 at 11:24. |
|
#3
|
|||
|
|||
|
Re: Gyro problems
Quote:
ill explain in more detail what you can see when you deploy the robot code it shows a value that gets higher and higher, stops and then lowers itself or raises itself again. can anyone explain why? ![]() |
|
#4
|
||||
|
||||
|
Re: Gyro problems
Try using the gyro "reset" vi. Our team had this same problem last year, and this fixed it
|
|
#5
|
||||||
|
||||||
|
Re: Gyro problems
If you wired it correctly and programmed it correctly and the gyro is working, then you wouldn't be having a problem. Pictures of your actual wiring and actual code would go a long way help others figure out your problem.
Common problems that people have are: Not powering the Analog Breakout Wiring to the Temperature output instead of rate Plugging it in backwards Not using Analog Input 1 or 2. Reading the gyro is not taxing. There is no problem reading the gyro in every loop in telop. All of the hard work is done in the background in the FPGA, all the gyro get does is get the latest value. Last edited by Joe Ross : 26-01-2014 at 14:10. |
|
#6
|
|||
|
|||
|
Re: Gyro problems
Make sure you're not reading the temperature pin instead of the angular rate pin.
|
|
#7
|
|||
|
|||
|
Re: Gyro problems
Hi,
I've been trying to implement a gyro into our code so that we can do field-oriented Mecanum Drive. I've gotten the gyro and the mecanum drive to work in their own programs. However, when I put them in the same program, neither work. I've tried it with both in teliop and with the gryo code in periodic storing angle to a global variable, which is read in teliop with the drive control. With my code as it is right now, if I only deploy teliop.vi from labview, the gyro works. But with the entire code deployed, it doesn't. I'm at my wit's end trying to figure out what's wrong. Any ideas? Thanks |
|
#8
|
||||||
|
||||||
|
Re: Gyro problems
You can't put a while loop in teleop. See Tutorial 7- Integrating Examples into Robot Code.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|