IP Configuration and Setup
To run this program you must first have the latest FRC control system software updates. Attached to either this article or in the update is located the zip file containing the labview project to run this program. Start by opening the FRCDiagnosticWindow.lvproj file. Once this is open, under the "My Computer" section is a vi called PC.vi. Open this VI and run it. In the upper left you will see a box where you can enter your team number to configure this project. On the right hand side of this is located four lights to indicate which parts of your control system are connected and configured properly. If any one of these are not lit please check that the IP Address of the given item is correctly set and that it is connected to the network you are on.
This program can be used by Inspectors to check that the FPGA image and other installed files on the cRIO are correct at competitons. This will be done by running the program and checking the "FPGA and COMM OK" light on the DiagnosticWindow.vi or on the FPGACheck.vi. It can also be used by teams to check for software or hardware problems in netowrk communication, what sensors are returning, or that outputs are correct. This is meant to be an effective way to check for problems in your control system.
To run the diagnostic Window, open the FRCDiagnosticWindow vi from the LabVIEW project explorer and click the run arrow to deploy and start the program. Please note that running this program will cause your team's deployed program will be erased. You must redeploy it before attempting to run the program again.
In the lower right section of the window you will see a light for "FPGA and COMM OK" and "Robot Enabled." If the Robot Enabled light is red or the dongle is in the disable state, the robot is disabled and no values will be sent out. If the light is green and the dongle is also in the enabled state, the robot is enabled. If the "FPGA and COMM OK" light is green, the FPGA is the correct version and the base library you are using are correct. Below this is the Battery Voltage as retrieved from port 8 on analog slot 1, scaled to the actual voltage seen on the robot. To stop the vi, click the STOP button in this section.
The left portion of the Diagnostic Window is dedicated to the testing of the motors and sensors connected to the digital sidecar. The sidecar can be selected by selecting the slot to which it is connected via the drop-down box in the lower portion of this section. Once the slot is selected, on the left hand side, the PWMs can be controlled using the sliders. To the left of the sliders are indicator lights as to whether the given port is turned on. To turn on a port click the light so that it appears green. A red light means that the port is turned off and no PWM value will be sent to it. Below these sliders is a "RESET PWMS" button which will reset all sliders to 0.
On the right hand side of the digital section is located the digital inputs and outputs. The direction is signified by the switches on the left that say INPUT when the digital port is and input and OUTPUT when the port is an output. The value of the port is signified to the left where 0 is displayed on a red background or 1 on a green background. Just below this is where the relay outputs are located. Dark red or dark green signifies that that direction on that port is turned off, where bright red or bright green signifies that that direction is turned on.
PLEASE NOTE: It is possible to drive both outputs of the Spike relay to the supply voltage (12V) at the same time. This is an intended feature of the relay, but diagnostic tool users should be aware that in this state the LED on the relay is off, so it can appear as if the relay is not powered when it actually is.
In the upper right portion of the screen is located the solenoid output section. A red button with a 0 on it signifies that the Solenoid output is turned off. A Green button with a 1 on it signifies that the output is turned on.
In the bottom right is located the Analog input values. These values are given in volts and display the average voltage as given by the library functions. Again the slot which is being shown can be selected by changing the drop-down box to either slot 1 or slot 2.