FRC LabVIEW Programming

FRC LabVIEW Programming
FRC LABVIEW
PROGRAMMING
Last Updated: 01-07-2017
FRC LabVIEW Programming
Table of Contents
Setting up the Development Environment ........................................3
Installing LabVIEW for FRC 2017 (LabVIEW only) .....................................................4
Installing the FRC 2017 Update Suite (All Languages) .......................................... 28
Creating Robot Programs ................................................................. 48
Creating, Building and Loading your Benchtop Test Program............................ 49
LabVIEW Resources ........................................................................... 54
LabVIEW Porting Guide - 2014 to 2015 .................................................................. 55
LabVIEW Resources .................................................................................................. 62
Waiting for Target to Respond - Recovering from bad loops .............................. 63
Talon SRX CAN........................................................................................................... 66
FRC LabVIEW Programming
Setting up the Development
Environment
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 3
FRC LabVIEW Programming
Installing LabVIEW for FRC 2017 (LabVIEW only)
Note: This installation is for teams programming in LabVIEW or using NI Vision Assistant only. C++
and Java teams not using these features do not need to install from the DVD.
Download and installation times will vary widely with computer and internet connection
specifications, however note that this process involves a large file download and installation and
will likely take at least an hour to complete.
Uninstall Old Versions (Recommended)
NOTE: The cRIO-FRCII (4-slot) is supported by the 2015 software, but the cRIO-FRC (8-slot) is not.
The LabVIEW for FRC 2014 license has been extended. If you wish to keep programming 8-slot
cRIOs you will need to maintain an install of LabVIEW for FRC 2014. While these versions should be
able to co-exist on a single computer, this is not a configuration that has been extensively tested.
Before installing the new version of LabVIEW it is recommended to remove any old versions. The
new version will likely co-exist with the old version, but all testing has been done with FRC 2017
only. Make sure to back up any team code located in the "User\LabVIEW Data" directory before un-
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 4
FRC LabVIEW Programming
installing. Then click Start >> Control Panel >> Uninstall a Program. Locate the entry labeled
"National
National Instruments Software", right-click on it and select Uninstall/Change.
Select Components to Uninstall
In the left pane of the dialog box that appears, select all entries
entries. The easiest way to do this is to
click the top entry to highlight it, then scroll down to the bottom entry, press and hold shift and
click on the last entry then release shift. Click Remove
Remove. Wait for the uninstaller to complete and
reboot if prompted.
Getting LabVIEW Installer
Either locate and insert the LabVIEW DVD or download the LabVIEW 2017 installer from
http://www.ni.com/download/labview-for-frc-17.0/6489/en/
If downloaded, right click on the downloaded file (NI_FRC2017.zip) and select Extract All.
Note: This is a large download (~4GB). It is recommended to use a fast internet connection and to
use the NI Downloader to allow the download to resume if interrupted.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 5
FRC LabVIEW Programming
Installing LabVIEW
National Instruments LabVIEW requires a license. Each season’s license is active until January 31st
of the following year (e.g. the license for the 2017 season expires on January 31, 2018)
Teams are permitted to install the software on as many team computers as needed, subject to the
restrictions and license terms that accompany the applicable software, and provided that only
team members or mentors use the software, and solely for FRC. Rights to use LabVIEW are
governed solely by the terms of the license agreements that are shown during the installation of
the applicable software.
Welcome
Double click on autorun.exe to launch the installer. If prompted to allow changes click Yes. To
install LabVIEW to program your FRC robot, click the top option Install Everything for LabVIEW
Development
Development. To install only NI Vision Assistant for use with C++ or Java, click Install Only NI Vision
Development Module.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 6
FRC LabVIEW Programming
Warnings
Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 7
FRC LabVIEW Programming
Product List
Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 8
FRC LabVIEW Programming
Product Information
Un-check the box, then click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 9
FRC LabVIEW Programming
User Information
Enter name, organization, and the serial number from the LabVIEW packer in your KOP. Click
"Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 10
FRC LabVIEW Programming
Destination Directory
Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 11
FRC LabVIEW Programming
License Agreements (1)
Check "I accept..." then Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 12
FRC LabVIEW Programming
License Agreements (2)
Check "I accept..." then Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 13
FRC LabVIEW Programming
Driver Software Installation
If you see this screen, Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 14
FRC LabVIEW Programming
Disable Windows Fast Startup
If you see this screen, click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 15
FRC LabVIEW Programming
Start Installation
Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 16
FRC LabVIEW Programming
Overall Progress
Overall installation progress will be tracked in this window
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 17
FRC LabVIEW Programming
Individual Product Progress
Each product installed will also create an individual progress window like the one shown above.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 18
FRC LabVIEW Programming
Product Information
Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 19
FRC LabVIEW Programming
Installation Summary
If internet access is available and you are ready to activate, click "Next"; otherwise uncheck the
"Run License Manager..." and click "Next".
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 20
FRC LabVIEW Programming
NI Activation Wizard
If internet connection is available, click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 21
FRC LabVIEW Programming
NI Activation Wizard (2)
The serial number you entered at the "User Information" screen should appear in all of the text
boxes, if it doesn't, enter it now. Click "Next".
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 22
FRC LabVIEW Programming
NI Activation Wizard (3)
Check "Log in to your User Profile" and enter your NI user profile information, or click "Create a
new Account" then click "Next".
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 23
FRC LabVIEW Programming
NI Activation Wizard (4)
Click "Next".
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 24
FRC LabVIEW Programming
NI Activation Wizard (5)
Click "Next".
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 25
FRC LabVIEW Programming
Activation Success
The Activation Wizard will contact NI and complete the activation. You should then see the window
shown above. Click "Finish" to complete the installation.
Restart Message
Select "Yes"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 26
FRC LabVIEW Programming
NI Update Service
On occasion you may see alerts from the NI Update Service about patches to LabVIEW. It is not
recommended to install these updates unless directed by FRC through our usual communication
channels (Frank's Blog, Team Updates or E-mail Blasts).
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 27
FRC LabVIEW Programming
Installing the FRC 2017 Update Suite (All
Languages)
The FRC 2017 Update Suite contains the following software components: LabVIEW Update, FRC
Driver Station, and FRC Utilities. If an FRC 2017 LabVIEW installation is found, the LabVIEW Update
will be installed or updated, otherwise this step will be skipped. The FRC Driver Station and FRC
Utilities will always be installed or updated. The LabVIEW runtime components required for the
driver station and utilities is included in this package. No components from the LabVIEW DVD are
required for running either the Driver Station or Utilities
Utilities.
Note: The 2017 DS will only work on Windows 7, Windows 8, Windows 8.1, and Windows 10. It will
not work on Windows XP.
Note for LabVIEW Teams: CAN Talon SRX has been removed from WPILib. See this blog for more
info and find the CTRE Toolsuite installer here: http://www.ctr-electronics.com/control-system/
hro.html#product_tabs_technical_resources
Uninstall Old Versions (Recommended)
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 28
FRC LabVIEW Programming
LabVIEW teams have already completed this step, do not repeat it. Before installing the new
version of the NI Update it is recommended to remove any old versions. The new version will likely
properly overwrite the old version, but all testing has been done with FRC 2015 only. Make sure to
back up any team code located in the "User\LabVIEW Data" directory before un-installing. Then
click Start >> Control Panel >> Uninstall a Program. Locate the entry labeled "National
National Instruments
Software", right-click on it and select Uninstall/Change.
Select Components to Uninstall
In the left pane of the dialog box that appears, select all entries
entries. The easiest way to do this is to
click the top entry to highlight it, then scroll down to the bottom entry, press and hold shift and
click on the last entry then release shift. Click Remove
Remove. Wait for the uninstaller to complete and
reboot if prompted.
Downloading the Update
Download the update from http://www.ni.com/download/first-robotics-software-2015/5112/en/
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 29
FRC LabVIEW Programming
Windows 8
If installing on Windows 8 or 10 and the above error appears, jump down to the Addendum on
Windows 8 installation before returning here to re-start the installation.
Welcome
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 30
FRC LabVIEW Programming
RIght click on the downloaded zip file and select Extract All. If you downloaded the encrypted zip
file, you will be prompted for encryption key from the kickoff broadcast. Open the extracted folder
and any subfolders until you reach the folder containing "setup" (may say "setup.exe" on some
machines). Double click on the setup icon to launch the installer. Click "Yes" if a Windows Security
prompt appears. Click "Next" on the splash screen that appears.
Product List
Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 31
FRC LabVIEW Programming
Product Information
Un-check the box, then Click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 32
FRC LabVIEW Programming
User Information
Enter full name and organization and the serial number from your kit of parts then click Next
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 33
FRC LabVIEW Programming
License Agreements
Select "I accept..." then click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 34
FRC LabVIEW Programming
License Agreements Page 2
Select "I accept..." then click "Next"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 35
FRC LabVIEW Programming
Summary Progress
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 36
FRC LabVIEW Programming
Detail Progress
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 37
FRC LabVIEW Programming
Installation Summary
Make sure the box is checked to Run License Manager... then click Next
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 38
FRC LabVIEW Programming
Activate
Select your desired activation method (Internet activation recommended), then click Next
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 39
FRC LabVIEW Programming
Serial Number Confirmation
Make sure the serial number in the box matches the one from your kit, then click Next
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 40
FRC LabVIEW Programming
User Profile
Log in or create an NI Profile. One profile may be used for multiple installations.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 41
FRC LabVIEW Programming
User Profile 2
Click Next
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 42
FRC LabVIEW Programming
User Profile 3
Click Next
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 43
FRC LabVIEW Programming
Finish
After the product is activated, Click Finish. If prompted to Reboot, click Yes
NI Update Service
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 44
FRC LabVIEW Programming
On occasion you may see alerts from the NI Update Service about patches to LabVIEW. It is not
recommended to install these patches. FRC will communicate any recommended updates through
our usual channels (Frank's Blog, Team Updates or E-mail Blasts).
Addendum - Installing on Windows 8
If installing on Windows 8 or 10, the Microsoft .NET Framework 3.5 may need to be installed. If you
see the dialog shown above, click "Cancel" and perform the steps shown below. An internet
connection is required to complete these steps.
Programs and Features
Open the "Programs and Features" window from the control panel and click on "Turn Windows
features on or off"
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 45
FRC LabVIEW Programming
Windows Features (.NET Framework 3.5 not on)
Select ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" to enable it (a black dot, not a check box
will appear) and then click "OK". When installation finishes restart installation of FRC 2016 Update
Suite.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 46
FRC LabVIEW Programming
Windows Features (.NET Framework 3.5 already on)
If a black dot is shown next to ".NET Framework 3.5" the feature is already on. Click "Cancel" and
restart installation of FRC 2017 Update Suite.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 47
FRC LabVIEW Programming
Creating Robot Programs
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 48
FRC LabVIEW Programming
Creating, Building and Loading your Benchtop
Test Program
This document covers how to create, build and load an FRC LabVIEW program onto a roboRIO.
Before beginning, make sure that you have installed LabVIEW for FRC and the FRC Driver Station
and that you have configured and imaged your roboRIO as described in the Getting Started with
the 2016 Control System manual.
Creating a Project
Launch LabVIEW and click the FRC roboRIO Robot Project link in the Projects window to display the
Create New FRC Robot Project dialog box.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 49
FRC LabVIEW Programming
Configuring Project
Fill in the Create New FRC Project Dialog:
1.
2.
3.
4.
5.
Pick a name for your project
Select a folder to place the project in.
Enter your team number
Select a project type. If unsure, select Arcade Drive - roboRIO.
Click Finish
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 50
FRC LabVIEW Programming
Running the Program
1. In the Project Explorer window, double-click the Robot Main.vi item to open the Robot
Main VI.
2. Click the Run button (White Arrow on the top ribbon) of the Robot Main VI to deploy the
VI to the roboRIO. LabVIEW deploys the VI, all items required by the VI, and the target
settings to memory on the roboRIO. If prompted to save any VIs, click Save on all
prompts.
3. Using the Driver Station software, put the robot in Teleop Mode. For more information
on configuring and using the Driver Station software, see the FRC Driver Station
Software article.
4. Click Enable
Enable.
5. Move the joysticks and observe how the robot responds.
6. Click the Abort button of the Robot Main VI. Notice that the VI stops. When you deploy a
program with the Run button, the program runs on the roboRIO, but you can
manipulate the front panel objects of the program from the host computer.
Note that a program deployed in this manner will not remain on the roboRIO after a power cycle.
To deploy a program to run every time the roboRIO starts follow the next step, Deploying the
program.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 51
FRC LabVIEW Programming
Deploying the program
To run in the competition, you will need to deploy a program to your roboRIO. This allows the
program to survive across reboots of the controller, but doesn't allow the same debugging
features (front panel, probes, highlight execution) as running from the front panel. To deploy your
program:
1. In the Project Explorer, click the + next to Build Specifications to expand it.
2. Right-click on FRC Robot Boot-up Deployment and select Build. Wait for the build to
complete.
3. Right-click again on FRC Robot Boot-Up Deployment and select Run as Startup. If you
receive a conflict dialog, click OK. This dialog simply indicates that there is currently a
program on the roboRIO which will be terminated/replaced.
4. Either check the box to close the deployment window on successful completion or click
the close button when the deployment completes.
5. The roboRIO will automatically start running the deployed code within a few seconds of
the dialog closing.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 52
FRC LabVIEW Programming
Next Steps
To continue Getting Started with the 2016 Control System, see Programming your radio for home
use.
To learn more about LabVIEW, see LabVIEW Resources
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 53
FRC LabVIEW Programming
LabVIEW Resources
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 54
FRC LabVIEW Programming
LabVIEW Porting Guide - 2014 to 2015
LabVIEW teams will find the VIs and palletes in the 2015 FRC version of LabVIEW very familiar.
Teams should only need to make minor changes to get a 2014 program to run on a roboRIO. This
document highlights changes in the 2015 VIs and how they correspond with the old code.
Joystick Get
• The old Joystick Get VIs have been replaced with a single VI that provides an array (instead
of a cluster) for each type of input (axes, buttons and POVs).
• POVs have been changed to be a unique output and to an angle (0 to 360 with -1 indicating
not pressed).
• Joysticks, axes, POVs, and buttons (in LabVIEW, buttons are still 1 based in C++\Java) are 0
based
• The DS will now support up to 6 joysticks with a dynamic number of axes, buttons and
POVs
Module and Channel numbers
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 55
FRC LabVIEW Programming
As the roboRIO has no modules, module numbers have been changed to a Controller number
which currently has only one option (and therefore does not need to be wired). Channel numbers
have been changed to be 0-based (matching the channel numbers on the roboRIO).
Compressor
Compressor code is no longer required (when using the PCM) unless you wish to get advanced
information from or exercise control over the compressor. Opening any solenoid on the PCM the
compressor is attached to will automatically enable the closed loop control for that compressor.
Sensor "Start/Stop" - Encoders, Counters, etc.
Sensors which uses to require explicit Start and Stop VIs have been changed to Start on Open.
Stop has been removed. If you wish to keep track of values over a single explicit period, call Reset
at the start of the period. If you wish to keep track of values over multiple explicit periods, you will
have to track this in your code (Reset at the start of each period and keep track of the sum in your
code).
DS User Messages
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 56
FRC LabVIEW Programming
The User messages window on the Driver Station has been removed, therefore this functionality
has been removed from the pallete. As a replacement, the default Dashboard contains a number
of controls and indicators of different types on the "Basic" tab that teams may wish to use to
display robot information or provide input. To write to these controls, use the SmartDashboard
VIs, the key names to use are listed on the Dashboard.
File IO
On the cRIO, files could be written to the root drive (C:\) or you could create subfolders within that
location. On the roboRIO you should write files to /home/lvuser or create a subdirectory
underneath that for your files. Note that a File Create will fail if the directory does not exist so you
will need to programatically create the directory or create it via SFTP/SSH before trying to create a
file in that directory.
DS IO, Enhanced IO, and Kinect
The Cypress Firsttouch board support and Kinect server support has been removed from the DS
so these palletes and VIs have been removed. Teams can use the Dashboard or USB HID devices
to replace the Cypress board functionality. The TI Launchpad and 16 Hertz Leonardo++ included in
your Kit of Parts can both be programmed to appear as HID devices to be used for custom I/O
(click the links for more info). Teams wishing to use the Kinect as an input device will need to
modify the Kinect server to send data directly to the robot using Network Tables or one of the
ports available on the field network.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 57
FRC LabVIEW Programming
SPI
With the built-in SPI ports, the SPI Ooen and configuration has been simplified and consolidated to
a single VI:
• The Clock Phase and Clock Active state have been combined into a mode Enum
• The "MSB First" boolean input has been removed, you will need to flip your data before
sending if you need to send LSB first
• The "Frame Mode" input has been removed. The SPI port on the roboRIO does not support
this.
• The "Bits per word" input has been removed. The SPI port on the roboRIO does not support
this.
• The "Chip Select Active Low" input on the 2014 config VI has been flipped to be a "Chip
Select Active High" input on the 2015 open VI.
I2C
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 58
FRC LabVIEW Programming
The Compatibility mode input has been removed from the I2C Read and I2C Write VIs. This is not
necessary on the roboRIO I2C.
I2C addressing has changed from an 8-bit address on the cRIO to a 7-bit address on the roboRIO.
An 8-bit address includes the bit for whether an operation is a read or write while a 7-bit address
does not (the R/W bit is appended by the driver when performing the operation).
Camera
The Camera VIs have been modified to support USB cameras (tested with the Microsoft Lifecam
HD3000). For complete information see the examples and the Vision Processing section.
New VIs
In addition to the changes, a number of new VIs have been added to support the new capabilities
of the roboRIO and the new Control System. For additional help with these VIs, drag them into
your project, right click on them and select Help.
Joystick Info
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 59
FRC LabVIEW Programming
New VIs have been added to get information such as the name, type, and axis, button and POV
count of each Joystick and to set HID outputs for devices which support them (such as the TI
Launchpad).
Potentiometer
These VIs use the output voltage of the analog supply to provide a normalized (0 to 1) reading
from a potentiometer or other ratiometric sensor
Switch
These VIs help abstract switches used as Limit Switches or Counting Switches.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 60
FRC LabVIEW Programming
Accelerometer
The accelerometer VIs have been generalized to apply to the internal accelerometer, analog
accelerometer, or the ADX345 connected to either the I2C or SPI interface.
Analog Output
These VIs control the 2 Analog Outputs on the MXP port
Power
These VIs provide information about the roboRIO power state, PCM faults, current, and voltage,
PDP faults, current and voltage, and the enabled state of the FPGA outputs.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 61
FRC LabVIEW Programming
LabVIEW Resources
To learn more about programming in LabVIEW and specifically programming FRC robots in
LabVIEW, check out the following resources.
LabVIEW Basics
National Instruments provides a combination of videos and traditional text/picture tutorials on the
basics of LabVIEW. These tutorials can help you get acquainted with the LabVIEW environment and
the basics of the graphical, dataflow programing model used in LabVIEW.
FRC Mastery Videos
Though they have not been updated to match changes to the robot framework code, the FRC
Mastery series of videos are still a helpful guide to understanding the basics of FRC programming
in LabVIEW. Most or all of the content in Steps 1, 2, 3, 4, 6, and 7 of the 2011 FRC Steps to Robot
Success will match fairly closely to the 2015 code.
NI FRC Tutorials
National Instruments also hosts many FRC specific tutorials and presentations ranging from basic
to advanced. For an in-depth single resource check out the FRC Basic and Advanced Training
Classes linked near the bottom of the page.
Installed Tutorials and Examples
There are also tutorials and examples for all sorts of tasks and components provided as part of
your LabVIEW installation. To access the tutorials, from the LabVIEW Splash screen (the screen that
appears when the program is first launched) click on the Tutorials tab on the left side. Note that
the tutorials are all in one document, so once it is open you are free to browse to other tutorials
without returning to the splash screen.
To access the examples either click the Support tab, then Find FRC Examples or anytime you're
working on a program open the Help menu, select Find Examples and open the FRC Robotics
folder.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 62
FRC LabVIEW Programming
Waiting for Target to Respond - Recovering from
bad loops
If you download LabVIEW code which contains an unconstrained loop (a loop with no delay) it is
possible to get the roboRIO into a state where LabVIEW is unable to connect to download new
code. This document explains the process required to load new, fixed, code to recover from this
state.
The Symptom
The primary symptom of this issue is attempts to download new robot code hang at the "Waiting
for the target (Target) to respond" step as shown above. Note that there are other possible causes
of this symptom (such as switching from a C++\Java program to LabVIEW program) but the steps
described here should resolve most or all of them.
Click Cancel to close the download dialog.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 63
FRC LabVIEW Programming
The Problem
One common source of this issue is unconstrained loops in your LabVIEW code. An unconstrained
loop is a loop which does not contain any delay element (such as the one on the left). If you are
unsure where to begin looking, Disabled.VI, Periodic Tasks.VI and Vision Processing.VI are the
common locations for this type of loop. To fix the issue with the code, add a delay element such as
the Wait (ms) VI from the Timing palette, found in the right loop.
Set No App
Using the roboRIO webserver (see the article RoboRIO Webdashboard for more details). Check the
box to "Disable RT Startup App".
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 64
FRC LabVIEW Programming
Reboot
Reboot the roboRIO, either using the Reset button on the device or by click Restart in the top right
corner of the webpage.
Clear No App
Using the roboRIO webserver (see the article RoboRIO Webdashboard for more details). Uncheck
the box to "Disable RT Startup App".
Load LabVIEW Code
Load LabVIEW code (either using the Run button or Run as Startup). Make sure to set LabVIEW
code to Run as Startup before rebooting the roboRIO or you will need to follow the instructions
above again.
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 65
FRC LabVIEW Programming
Talon SRX CAN
The Talon SRX motor controller is a CAN-enabled "smart motor controller" from Cross The Road
Electronics/VEX Robotics. The Talon SRX can be controlled over the CAN bus or PWM interface.
When using the CAN bus control, this device can take inputs from limit switches and
potentiometers, encoders, or similar sensors in order to perform advanced control such as limiting
or PID(F) closed loop control on the device.
Extensive documentation about programming the Talon SRX in all three FRC languages can be
found in the Talon SRX Software Reference Manual on CTRE's Talon SRX product page.
Note: CAN Talon SRX has been removed from WPILib. See this blog for more info and find the
CTRE Toolsuite installer here: http://www.ctr-electronics.com/control-system/
hro.html#product_tabs_technical_resources
FRC LabVIEW Programming Last Updated: 01-07-2017
Page 66
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement