


Next we will see if our code works! Interfacing with the Robotīattery Voltage Display Team Number (Make sure it is correct) Mode Selection Teleoperated = Driver Autonomous = Computer Control Practice = Run like a match Elapsed time since start of robot communication PC Battery Communication Status Communication = a connection to the cRIO Robot Code = the user code is running User Messages (This area can be controlled by the robot program) Communication Status Enable/Disable Buttons Station Number for Competition Useġ8 Driver Station Setup Tab ID Team number to connect to robot
#Frc labview 2013 update full
This section uses a “State Machine” Case structure Inside a while loop Continues to loop until robot Disabled “Robot Mode” controlled by Driver Station or by Field Management System (In Competitions) “Robot Mode” selects Case 13ġ4 Tele-op.VI Out of Box Code will drive 2 motor drive with Joystick axes 1 & 2 Reads Refnums from Begin.vi Gets Joystick Axis data Cluster of data – uses the “Unbundle by Name” function block Sets Drive Motor Speed Arcade drive X axis turns, Y axis fwd / reverse Use Context Help (CTRL H) to investigate blocks These are available but not required 14įirst: Modify Joystick axes for a PS3 controller Right click on Axes elements Change Axes 1 & 2 to Axes 3 & 4 Right thumb control on PS3 style controller Next access Joystick Buttons by connecting to a “Unbundle by name” function from the “cluster,“ palette From WPI Robotics Library/ Actuators/ MotorControl Bring the Refnum Get and provide name Bring Motor Set Output vi and connect them Now from the “Comparison” palette bring a “Select” Block Button output is true or false Select function assigns a value if true and another if false Create constant of 1 if true and 0 if false Wire output to the Set Output block - Results in motor going full speed if trigger is pressed.

vi Identify where plugged in What type of controller Add Refnum Set.vi Give it a name 12ġ3 Robot Main – Calling TeleOp or Autonomous.vi Tell which PWM port plugged into, give it a name Why is one motor inverted? Set up for 1 joystick Tell where plugged into DS “refnum” i.e.name of devices Device info stored by that name to be recalled when device is used (e.g.in tele- op) 11Įdit vi: Add an accessory motor: Open function palette and select: WPI Robotics Library / Actuators / Motor Control Add Open Motor. Motor configuration set up for 2 motors drive. “Opens” devices Tells program where device is plugged into cRio Gives the device a “Refnum” name which can be recalled from other areas of the program (such as tele-op) Initialize additional components desired to be added to the system here 10ġ1 Begin.vi Camera configuration – unlikely to need to change this, if use it at all - Discuss in later session. We will focus on the main block VIs: Begin TeleOp Autonomous X For now, never mind these 8ĩ OPEN – SET/GET - CLOSE Programming of devices in general follows the following protocol: Open a Device, Tell the code where it is plugged in Give it a name Get info from a device, or Set a value to a device Close the Device Open a Joystick Get the Y Joystick Value Close the Joystick Open a motor Set the motor speed Close the motorġ0 Begin.vi Initializes the camera, motors, joysticks Select and modify sub-VI's from here Or click on sub VI from Project Explorer Recommended not to make changes to “Robot Main.vi” 7 Give cRIO IP address – your team number goes in xx.yy e.g Click “Finish” 4ĥ Project Explorer Project Explorer appearsĪll code listed under “RT CompactRIO target 10.xx.yy.2” Displays pre-written set of VI's to allow for an out of box solution Top level VI is “Robot Main.vi” Double click to open it 5įront Panel has controls and indicators Not much on this one Driver’s Station is main operator interface Click on “Window” Then Select “Show Block Diagram” 6

1 FRC Robot Framework Labview Made Easy (er) For FIRST Robotics 1Ģ FRC Framework Base Code with Architecture Pre-configuredĭefines Interaction between code sections Designated places to add functionality Focus on robot functionality rather than program structure Let's walk through this together 2ģ FRC Project Select FRC cRIO Robot Project Dialogue box opens 3Ĥ Create Project Give Project a name Choose where to save project
