Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This document describes the functionality of Test Mode for the 2015 FIRST competition season. Read
through it to learn how to set up your own test.
Table of Contents
FRC Test Mode ....................................................................................................................................................1
Overview ............................................................................................................................................................1
Dashboard in Test Mode....................................................................................................................................2
Changing Tests ...............................................................................................................................................3
Adjust Outputs in Test Mode .........................................................................................................................3
Programming Test Mode ...................................................................................................................................4
Creating a Test ...............................................................................................................................................5
Example Test SubVI Code ...............................................................................................................................8
Overview
In the Operation tab of the FRC Driver Station you can select Test Mode to run predetermined and
programmed tests. The tests can range from testing different autonomous code, sensors, motors, or
any small amount of code. The objective of Test Mode is to test specific hardware without having to run
all of your code.
Test Mode Tab on the Dashboard (top) and Test Mode on the Driver Station (bottom)
Changing Tests
While still in Test mode, once one test has fully completed, you can click on the Select the test to run
dropdown and the test will immediately start to run. If the test runs infinitely, make sure there is a blank
string wired to the String input of an NT Write String function at the end of your test code.
Test Mode allows you to change the output of certain settings, like the motors or camera settings. Any
value with two asterisks ** in the Network Table, marked by the yellow box in the image above, can be
manually adjusted. Use the control (red box) to adjust the settings on the robot in simulator or
hardware. Select the Enable button shown in the green box to make the settings active.
The Test.vi is where you will create new tests and modify existing tests. The Test.vi will run
in parallel with the Robot Main.vi when Test is enabled in the Driver Station.
4
Creating a Test
In the Block Diagram of the Test.vi, modify the Default Tests string array to add new test names to the
FRC Dashboard drop down menu. Erase the current text and replace with your desired test name. To add
or delete elements, right click the text box and navigate to Data Operations Insert or Delete Element.
Next, add the new test name to the case structure. Select the Example Test case from the Case
Structure, right click on the Case Structure border and select Duplicate Case. Inside quotations, enter
the same name you wrote in the Default Tests, string array, for example Drive Test. You do not have
to duplicate the Example Test, but it is the simplest way to modify your first test.
Now you are ready to modify the code to allow the test to complete your desired action. The simplest
modification is to create a subVI and add your test code into the subVI. To create a subVI, select the For
Loop from the duplicate Example Test case and navigate to Edit Create SubVI. This will keep
everything in Test.vi organized and allow you to update only the necessary subVI in your project when a
specific test must be edited.
Creating a SubVI
7
The subVI can then be designed to run the desired test code. The output of the subVI should be a
blank string, in order to reset the menu in the Test tab on the FRC Dashboard. There are two ways of
modifying the display in the Dashboard: the Progress Text shows the Step Text in the example code
(shown in the red box), and the Progress Bar is output to a slider the in Dashboard (green box). In
your Test subVI, wire constants to the NT Write String or NT Write Number functions to change the
display in Dashboard. Neither of these settings is required for Test Mode; they are there to help
show the progress of the test.
The above drive example drives the motors at a designated speed for a set amount of iterations or until
the stop button is pressed. If you would like the loop to be controlled this is a good alternative so it will
close after x amount of time if something else isnt working properly. The Progress Test is Drive Motors
and the progress bar increases as the iterations run.
10