So, in all of the languages there is a basic framework to start from that does all the background tasks you need to get a complete running system.
While you can write your project from scratch, there is some basic communication to the Driver Station that has to be setup first. And there are field states (Disable, Autonomous, Teleop) that your code has to be capable of responding to.
That background framework is handed to you, so that you don’t have to understand everything all at once.
It also organizes your code structure in a common way making it easier for all of us to help each other.
To start from the default Arcade Drive program:
-
Open LabVIEW and you should see this window if everything has been properly installed (Note: all that stuff under OPEN is just a list of the most recent files that I had open on my PC here at home):
-
Choose FRC roboRIO Project under NEW and you will get this:
-
Enter your team number in the highlighted field and click FINISH to get your default Arcade Project. Your Team number will identify your robot to the competition field and to your Driver Station app running on your PC. There will be a lot of robots and the team number is how we tell them apart.
Expand the Target and Team Code directories and you will see the vi’s that you should be placing your new code in.
This project is a complete user code as is and can be downloaded to run of your roboRIO.
That’s a good first test anyway.
Whenever you work on your robot project, always open the whole project so you get everything necessary to run.
Now, to complete the steps in beginning operation, compile and download your unchanged project to you roboRIO and test it.
A) At the very bottom of your project file list is “Build Specifications”.
Expand that to see the default build spec.
Right-click on that and choose “Build” to compile your program.
B) That will show a bunch of pop-ups as it compiles and checks your default program.
When it is done it will stop on this pop-up and just click Done.
C) Then connect a USB cable to your roboRIO and you can download your compiled program.
Right-click on that build specification again to choose “Run as startup” to start the transfer.
That’s the process of getting your code onto the roboRIO permanently.
Now you can go back and edit Begin to add in your specific Talon code.
So, to help with this I’m going to modify my original suggestion slightly to make it easier for a beginner.
None of the code that follows conflicts with the default code that is already there, so just add these, don’t delete anything else.
Note: These pictures that follow are actually LabVIEW code.
Same them to your desktop, then drag the file onto a block diagram to add the code to your project. You can also enter this all by hand if you want practice.
-
Open the Begin.vi project and drag/drop this image onto the block diagram:
-
Open the Teleop.vi and drag/drop this image onto the block diagram:
Do the Build and Run as startup process with this and I’m hopeful your Talons will stop blinking.
Have you used the required Driver Station app yet to connect to the robot?
The robot needs that to run.
For safety reasons the Driver Station and the roboRIO must be in communication for the robot to operate.
The Driver Station must ENABLE the robot for the robot to start.
The Driver Station must be given your team number to be able to find your robot.