Gyro Help

Recently, we have tried to program our gyro but LabVIEW seems to find an error that is setting us back. We want to know if we could get some help with this since this is a real headache pls. GyroOpen seems to be the problem but everything is wired up correctly.

We are using this guide for gyro -

We can’t see that error unless you show it to us. If we don’t know what it says, we’re not likely to be able to help you resolve it.

…everything is wired up correctly.

Prove it. :slight_smile: Tell us what kind of gyro you are using, and describe exactly where you are connecting each of its pins. If possible, take a picture and post it so we can see what you are talking about.

Sorry about that, here are the photos of the problem

Just for Reference - This is the part number of the gyro we are going to use (ADW22307)

That appears to be a cRIO project, because it says ‘slot 1’ rather than ‘controller 1’.

Are you doing this on a roborio? If so, you started the wrong framework when creating the project.

Let me clarify what one of our students is trying to explain so everyone has more detail on what we are seeing.The project is setup as a RoboRio project. So far this is the only WPI library we can not get to work. The Gyro appears to not be upgraded for some reason. Our motors, joystick, encoders, digital I/O, Solenoids all compiled correctly. Motors and joystick hardware have been tested on the RoboRio with this code minus the Gyro As of right now it is not a Gyro hardware issue because the code will not compile with the Gyro present in the code.

We are wondering if any other teams are having the same issue?

I’d suggest trying the stand-alone gyro example found from the Getting Started window under:
Support -> Find FRC Examples… -> FRC Robotics -> roboRIO -> Sensors -> Gyro

That eliminates any code on your part as the cause and gives a wiring diagram to double-check.

I promise that the example works fine for me.

Note: the examples are setup to run over the USB connection by default.

I should reinforce what Tom mentioned. It appears that code has an old Gyro vi from last year, as if someone cut and pasted it from old code rather than building it from the 2015 palette.

I also found an anomoly using the LabVIEW vi. The analog gyro open command works fine on ai0 and ai1 but there are no selection inputs for ai2 and 3. Also there is only one controller selectable which does not include the mxp connector. Looks like we need another software upgrade soon from ni.

Or since the code consistently indicates that you can only choose channel 0 or channel 1, perhaps that is a limitation of the fpga accumulator.

Do you need this for the other channel, or were you just noticing it?

Greg McKaskle

Greg, there are 4 ain connectors on the front roborio and 4 on the mxp. Surely, ni programmed the FPGA to handle all 8 AIN lines or NI would have said something. I would like to use more than 2 AIN lines.


There are eight AI, but how many accumulators are there? And are they multiplexed to allow for any AI to feed into them?

I believe the raw AI and other analog items like pots let you use the four built-in and four MXP channels.

I couldn’t find definitive documentation, so I’m interpreting someone’s code for intent. I can verify a bit later today, and if I’m wrong, I’ll file the bug report and let you know how to work around the bug in the wrapper. But from what I see, it looks like the wrapper is guiding you to pick from the only channels that make sense due to the underlying implementation.

Greg McKaskle

In the cRIO system, you could only use gyros on AI1 & 2 (0 & 1 on the RoboRIO). This limitation is not new.