![]() Now you need to assign a name to your gyro. Then, connect the GyroDevRef pin on the Open VI to the GyroDevRef on the Registry Set VI. Grab the Registry Set VI from the Gyro palette and place to the right of your Open VI. Now you need to assign a reference name to this gyro so that you can refer to it in other VIs. Unless you are using the CS Jumper version of the gyro and want to use C1 or C2 by moving the jumper, do not change this variable! LabVIEW will automatically assign the gyro to CS0, which is the default. ![]() Right click on the “ SPI Bus” pin on the Open VI and click “Create -> Constant” to insert an enumerated variable. Next, you need to tell LabVIEW which SPI “chip select” (CS) it will be using. Select “XRS450 SPI Open” to tell your robot that you're working with the ADXRS450 board. When you first bring the instance into your code, it will default to an analog gyro, so you will need to change the type using the drop-down menu below the VI's icon. It doesn't matter where you place it in this VI. Bring the Gyro Open VI into your Begin.vi code. ![]() You can find the gyro VI under WPI Robotics Library -> Sensors -> Gyro. The first step is to create a new instance of the gyro, then assign a reference name to it so that you can call the gyro reference anywhere in your robot code. This can be found in the project window under Team Code. Open your robot project, or create a new one if you don't have one created already, and open up your Begin.vi block diagram. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |