LabVIEW

TM

Robotics Programming Guide for the FIRST Robotics Competition
LabVIEW Robotics Programming Guide for FRC

January 2009 372668D-01

Support Worldwide Technical Support and Product Information ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Worldwide Offices Australia 1800 300 800, Austria 43 662 457990-0, Belgium 32 (0) 2 757 0020, Brazil 55 11 3262 3599, Canada 800 433 3488, China 86 21 5050 9800, Czech Republic 420 224 235 774, Denmark 45 45 76 26 00, Finland 358 (0) 9 725 72511, France 01 57 66 24 24, Germany 49 89 7413130, India 91 80 41190000, Israel 972 3 6393737, Italy 39 02 41309277, Japan 0120-527196, Korea 82 02 3451 3400, Lebanon 961 (0) 1 33 28 28, Malaysia 1800 887710, Mexico 01 800 010 0793, Netherlands 31 (0) 348 433 466, New Zealand 0800 553 322, Norway 47 (0) 66 90 76 60, Poland 48 22 328 90 10, Portugal 351 210 311 210, Russia 7 495 783 6851, Singapore 1800 226 5886, Slovenia 386 3 425 42 00, South Africa 27 0 11 805 8197, Spain 34 91 640 0085, Sweden 46 (0) 8 587 895 00, Switzerland 41 56 2005151, Taiwan 886 02 2377 2222, Thailand 662 278 6777, Turkey 90 212 279 3031, United Kingdom 44 (0) 1635 523545 To comment on National Instruments documentation, refer to the National Instruments Web site at ni.com/info and enter the info code feedback. © 2008–2009 National Instruments Corporation. All rights reserved. Austin, Texas 78759-3504 USA Tel: 512 683 0100

Important Information
Warranty
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period. National Instruments does not warrant that the operation of the software shall be uninterrupted or error free. A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accepted for warranty work. National Instruments will pay the shipping costs of returning to the owner parts which are covered by warranty. National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it. EXCEPT AS SPECIFIED HEREIN, NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. CUSTOMER’S RIGHT TO RECOVER DAMAGES CAUSED BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER. NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS, OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. This limitation of the liability of National Instruments will apply regardless of the form of action, whether in contract or tort, including negligence. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover damages, defects, malfunctions, or service failures caused by owner’s failure to follow the National Instruments installation, operation, or maintenance instructions; owner’s modification of the product; owner’s abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.

Copyright
Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation. National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.

Trademarks
National Instruments, NI, ni.com, and LabVIEW are trademarks of National Instruments Corporation. Refer to the Terms of Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies.

Patents
For patents covering National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.

WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF RELIABILITY SUITABLE FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN ANY LIFE SUPPORT SYSTEMS WHOSE FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT INJURY TO A HUMAN. (2) IN ANY APPLICATION, INCLUDING THE ABOVE, RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE IMPAIRED BY ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY, COMPUTER HARDWARE MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE FITNESS, FITNESS OF COMPILERS AND DEVELOPMENT SOFTWARE USED TO DEVELOP AN APPLICATION, INSTALLATION ERRORS, SOFTWARE AND HARDWARE COMPATIBILITY PROBLEMS, MALFUNCTIONS OR FAILURES OF ELECTRONIC MONITORING OR CONTROL DEVICES, TRANSIENT FAILURES OF ELECTRONIC SYSTEMS (HARDWARE AND/OR SOFTWARE), UNANTICIPATED USES OR MISUSES, OR ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS SUCH AS THESE ARE HEREAFTER COLLECTIVELY TERMED “SYSTEM FAILURES”). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD CREATE A RISK OF HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH) SHOULD NOT BE RELIANT SOLELY UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE. TO AVOID DAMAGE, INJURY, OR DEATH, THE USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO PROTECT AGAINST SYSTEM FAILURES, INCLUDING BUT NOT LIMITED TO BACK-UP OR SHUT DOWN MECHANISMS. BECAUSE EACH END-USER SYSTEM IS CUSTOMIZED AND DIFFERS FROM NATIONAL INSTRUMENTS' TESTING PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER MAY USE NATIONAL INSTRUMENTS PRODUCTS IN COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT EVALUATED OR CONTEMPLATED BY NATIONAL INSTRUMENTS, THE USER OR APPLICATION DESIGNER IS ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING THE SUITABILITY OF NATIONAL INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A SYSTEM OR APPLICATION, INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN, PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.

Contents
About This Manual
Conventions ...................................................................................................................xv Related Documentation..................................................................................................xvi Programming in LabVIEW .............................................................................xvi Using the CompactRIO Device .......................................................................xvii

Chapter 1 Overview of the FIRST Robotics Competition
FRC Terminology ..........................................................................................................1-1 CompactRIO Device .......................................................................................1-1 Driver Station ..................................................................................................1-2 Field Management System ..............................................................................1-2 Autonomous and TeleOp Modes ...................................................................................1-2 Enabled and Disabled Status..........................................................................................1-3 Init, Execute, and Stop Derived States ..........................................................................1-3 Estop State .....................................................................................................................1-4

Chapter 2 Robot Architecture
CompactRIO Device......................................................................................................2-1 Real-Time Operating System ..........................................................................2-2 FPGA...............................................................................................................2-2 I/O Modules.....................................................................................................2-2 NI 9201 .............................................................................................2-3 NI 9403 .............................................................................................2-4 NI 9472 .............................................................................................2-4 Axis Camera ..................................................................................................................2-5 FRC Software LabVIEW Components..........................................................................2-6 FIRST Robotics Competition VIs....................................................................2-6 FRC Configuration Tools ................................................................................2-6 Setup Axis Camera Tool ...................................................................2-6 CompactRIO Imaging Tool ..............................................................2-7

© National Instruments Corporation

v

LabVIEW Robotics Programming Guide for FRC

Contents

Chapter 3 Configuring the Camera and the CompactRIO Device
Configuring the Axis Camera........................................................................................ 3-1 Setting the Static IP Address of the Computer ............................................... 3-1 Running the Setup Axis Camera Tool ............................................................ 3-3 Configuring the CompactRIO Device ........................................................................... 3-3 Setting the Static IP Address of the Computer ............................................... 3-3 Considerations Before Running the CompactRIO Imaging Tool ................... 3-5 Running the CompactRIO Imaging Tool........................................................ 3-6 Using the Real-Time System Manager to Manage CompactRIO Device Resources ..................................................................................................... 3-7

Chapter 4 Using the FRC Framework
FRC Robot Project ........................................................................................................ 4-1 Basic FRC Robot Project ................................................................................ 4-3 Basic Robot Main VI ........................................................................ 4-3 Basic Robot Global VI ..................................................................... 4-6 Autonomous Independent VI............................................................ 4-7 Build DashBoard Data VI................................................................. 4-7 Dashboard Datatype Type Definition............................................... 4-8 Advanced FRC Robot Project......................................................................... 4-8 Robot Main VI.................................................................................. 4-9 Team Code VIs ................................................................................. 4-10 Type Definitions ............................................................................... 4-14 Deploying the FRC Robot Project .................................................................. 4-16 Deploying The Program Using The Run Button .............................. 4-17 Deploying The Program From The Project Explorer Window ........ 4-17 Building And Deploying A Stand-Alone Application ..................... 4-17 Connecting to the CompactRIO Device ........................................... 4-19 FRC Dashboard Project................................................................................................. 4-19

Chapter 5 Tutorial: Creating an FRC Robot Project
Creating an FRC Robot Project..................................................................................... 5-1 Running the FRC Robot Project.................................................................................... 5-2 Modifying the Basic Robot Main VI............................................................................. 5-2 Running the FRC Robot Project.................................................................................... 5-5 Creating a Stand-Alone FRC Application..................................................................... 5-5

LabVIEW Robotics Programming Guide for FRC

vi

ni.com

Contents

Chapter 6 Tutorial: Creating an FRC Dashboard Project
Displaying Gyroscope Data in the Dashboard Main VI ................................................6-1 Sending Gyroscope Data to the Dashboard Main VI ......................................6-1 Adding an Indicator to the Dashboard Main VI..............................................6-3 Running the Dashboard Main VI ....................................................................6-6 Displaying Multiple Data Values in the Dashboard Main VI .......................................6-7 Creating a Custom Control..............................................................................6-7 Sending Multiple Data Values to the Dashboard Main VI..............................6-8 Adding Indicators to the Dashboard Main VI .................................................6-10 Running the Dashboard Main VI ....................................................................6-13

Chapter 7 Troubleshooting the FRC Robot Chapter 8 Using the WPI Robotics Library VIs
Reference Clusters .........................................................................................................8-1 Error Handling ...............................................................................................................8-3

Chapter 9 Accelerometer VIs
Close.vi ..........................................................................................................................9-1 GetAcceleration.vi .........................................................................................................9-3 Open.vi...........................................................................................................................9-6 SetCenterVoltage.vi .......................................................................................................9-8 SetGain.vi ......................................................................................................................9-10

Chapter 10 Accumulator VIs
GetConfiguration.vi .......................................................................................................10-1 GetOutput.vi ..................................................................................................................10-4 Init.vi..............................................................................................................................10-6 Reset.vi ..........................................................................................................................10-8 SetConfiguration.vi........................................................................................................10-11

© National Instruments Corporation

vii

LabVIEW Robotics Programming Guide for FRC

Contents

Chapter 11 Actuators VIs Chapter 12 AnalogChannel VIs
Close.vi.......................................................................................................................... 12-1 GetAverageVoltage.vi ................................................................................................... 12-3 GetVoltage.vi................................................................................................................. 12-5 Open.vi .......................................................................................................................... 12-8

Chapter 13 AnalogChannel Advanced VIs
GetAverageValue.vi ...................................................................................................... 13-1 GetAveraging.vi ............................................................................................................ 13-3 GetLSBWeight.vi .......................................................................................................... 13-6 GetOffset.vi ................................................................................................................... 13-8 GetSampleRate.vi.......................................................................................................... 13-11 GetValue.vi.................................................................................................................... 13-12 SetAveraging.vi ............................................................................................................. 13-14 SetSampleRate.vi........................................................................................................... 13-17

Chapter 14 AnalogTrigger VIs
Close.vi.......................................................................................................................... 14-1 GetOutput.vi .................................................................................................................. 14-3 Open.vi .......................................................................................................................... 14-5

Chapter 15 Camera VIs
Close.vi.......................................................................................................................... 15-1 Get Image.vi .................................................................................................................. 15-3 Get Image From Controller.vi ....................................................................................... 15-5 Open.vi .......................................................................................................................... 15-7 Start.vi ........................................................................................................................... 15-9 Stop.vi............................................................................................................................ 15-11

LabVIEW Robotics Programming Guide for FRC

viii

ni.com

Contents

Chapter 16 Camera Properties VIs
Get Brightness.vi ...........................................................................................................16-1 Get Color Level.vi .........................................................................................................16-3 Get Exposure.vi .............................................................................................................16-5 Get Exposure Priority.vi ................................................................................................16-7 Get Frame Rate.vi ..........................................................................................................16-9 Get Image Compression.vi ............................................................................................16-11 Get Image Size.vi...........................................................................................................16-13 Get Sharpness.vi ............................................................................................................16-15 Get White Balance.vi .....................................................................................................16-17 Set Brightness.vi ............................................................................................................16-19 Set Color Level.vi ..........................................................................................................16-21 Set Exposure.vi ..............................................................................................................16-23 Set Exposure Priority.vi .................................................................................................16-25 Set Frame Rate.vi...........................................................................................................16-27 Set Image Compression.vi .............................................................................................16-29 Set Image Size.vi ...........................................................................................................16-31 Set Sharpness.vi .............................................................................................................16-33 Set White Balance.vi......................................................................................................16-35

Chapter 17 Communications VIs Chapter 18 Compressor VIs
Close.vi ..........................................................................................................................18-1 GetEnableState.vi ..........................................................................................................18-3 Open.vi...........................................................................................................................18-6 Start.vi............................................................................................................................18-8 Stop.vi ............................................................................................................................18-10

Chapter 19 Counter VIs
Close.vi ..........................................................................................................................19-2 ConfigureTimer.vi .........................................................................................................19-4 Get.vi..............................................................................................................................19-6 Reset.vi ..........................................................................................................................19-9 Start.vi............................................................................................................................19-11 Stop.vi ............................................................................................................................19-13

© National Instruments Corporation

ix

LabVIEW Robotics Programming Guide for FRC

Contents

Chapter 20 DigitalInput VIs
Close.vi.......................................................................................................................... 20-2 GetValue.vi.................................................................................................................... 20-4 Open.vi .......................................................................................................................... 20-6

Chapter 21 DigitalOutput VIs
Close.vi.......................................................................................................................... 21-2 Open.vi .......................................................................................................................... 21-3 SetValue.vi .................................................................................................................... 21-5

Chapter 22 Digital Output Advanced VIs
IsPulsing.vi .................................................................................................................... 22-2 Pulse.vi .......................................................................................................................... 22-4

Chapter 23 DriverStation VIs
Get Analog Input.vi ....................................................................................................... 23-1 Get Digital Input.vi........................................................................................................ 23-2 Get Digital Output.vi ..................................................................................................... 23-2 Set Digital Output.vi...................................................................................................... 23-3 Set User Data.vi............................................................................................................. 23-4 Start Communication.vi................................................................................................. 23-5 Stop Communication.vi................................................................................................. 23-6

Chapter 24 Encoder VIs
Close.vi.......................................................................................................................... 24-2 ConfigureTimer.vi ......................................................................................................... 24-4 Get.vi ............................................................................................................................. 24-7 Open.vi .......................................................................................................................... 24-10 Reset.vi .......................................................................................................................... 24-16 Start.vi ........................................................................................................................... 24-18 Stop.vi............................................................................................................................ 24-21

LabVIEW Robotics Programming Guide for FRC

x

ni.com

.................................................................................................................................................29-2 GetAxis..........vi....................................................................................................................vi...............................................................................................................................................................................................................................................................vi........vi ................................30-4 SetSpeed......................................................................................vi..........................................................................................................................................................................................................................................................25-6 Reset.......25-8 SetGain.........vi .......................29-5 Open............................................................................................vi .....26-5 VerifyString................vi ...vi.......................................vi..........................................................................27-3 Wait..Contents Chapter 25 Gyro VIs Close..26-7 Write..............................................................................................................vi ...............................................vi ......vi .........................................................................................................................................................................................30-8 © National Instruments Corporation xi LabVIEW Robotics Programming Guide for FRC ..................................29-7 Chapter 30 MotorControl VIs Close...........................................................................vi.......................................................................................27-1 Open................................................................................................25-3 Open................................26-9 Chapter 27 Interrupts VIs Close............................................................26-1 Open........................................vi .......................vi ...............................................25-10 Chapter 26 I2C VIs Close.........26-3 Read...........................vi............vi ..........................29-4 GetRawValue..vi ..................................................................................................25-1 GetAngle........................vi......................................................................................................................................................vi .........................................27-5 Chapter 28 IO VIs Chapter 29 Joystick VIs Close......................30-1 GetSpeed.............................................................................................................29-2 Get.........

....................................................................................................vi .................................................................................. 31-14 Chapter 32 Relay VIs Close..........................................................com ........................................................................... 33-1 HolonomicDrive.....................................................................................................................................................vi ....................vi ...........vi..................................vi ................................ 36-1 Flush.Contents Chapter 31 PWM VIs Close................................................................................................... 36-9 Reset..............................................................................................vi.............................vi................. 31-8 SetPeriodMultiplier................................................................... 32-5 Set.......................vi........................................................................................................................................................ 36-3 GetBytesReceived............................................................................................................................................................................................................................... 36-7 Read.........................................vi......... 33-4 TankDrive...............vi....vi...................... 36-11 SetTimeout.........................................vi ..............................................................................................................................................vi ........vi ............ 36-13 Termination.............. 34-1 Chapter 35 Sensors VIs Chapter 36 Serial Port VIs Close.......... 36-15 Write................................vi ............................. 31-1 GetValue........................................................................................ 36-17 LabVIEW Robotics Programming Guide for FRC xii ni...................................................................................................................................................................... 33-10 Chapter 34 RobotDrive Advanced VIs Motors................................. 31-4 Open..vi......................................vi .................................................................................................................................................................................................................. 31-11 SetValue.... 36-5 Open. 32-7 Chapter 33 RobotDrive VIs Close........................vi .......................................................................... 32-3 Open...................vi............................................vi.....................vi ...................................................................................................................

.39-3 Open...................................................................vi.............................................vi ..........................................................vi .........................................vi ............................................................................................................................................40-9 Chapter 41 Utilities VIs FRC FPGAVersion......................................................................................................41-1 FRC LEDs..........................vi ...............................38-9 Chapter 39 SPI VIs Close......38-3 Get........................................................................................................................................37-4 GetPosition....................................................vi .......................vi..................................................................................................40-1 GetRange..............................vi .........40-3 Open............................................................vi............37-11 SetAngle...............................................................................................vi ....................................................................................................vi ..........vi...............................................................................39-1 ConfigureAdvancedOptions..................................vi ......................................vi......................37-7 Open.................................................................................vi .........39-5 Read..........................................................39-11 Chapter 40 Ultrasonic VIs Close........................................................................................................................................vi .............................................................................................................................................................................................................................................Contents Chapter 37 Servo VIs Close.......................................vi ...........................38-7 Set....................................37-14 SetPosition........................................................38-4 Open........................41-4 © National Instruments Corporation xiii LabVIEW Robotics Programming Guide for FRC .40-7 Ping................vi ............................37-17 Chapter 38 Solenoid VIs Close............................................................................................................vi ................vi .....................................................................................................................................................................vi........................................................................vi .........................................41-2 FRC ReadSwitch..............37-1 GetAngle............................................................................................................39-9 Write...........

................vi........Contents Chapter 42 Watchdog VIs Close..........vi...........................................vi ............................ 42-1 Delay and Feed............................................................................................... 42-3 Feed........................................... 42-12 LabVIEW Robotics Programming Guide for FRC xiv ni..........................................vi................vi ................................................................................................vi ............................................................. 42-5 GetStatus................................................................. 42-7 Kill......................................................................................................................................................... 42-10 SetEnabled...............................................................................................................................vi.............com .... 42-9 Open...............

italic © National Instruments Corporation xv LabVIEW Robotics Programming Guide for FRC . which alerts you to important information. Bold text also denotes parameter names. This manual also describes how to configure the CompactRIO device and the Axis camera. Italic text also denotes text that is a placeholder for a word or value that you must supply. Use Wind River Workbench to program a robot in C or C++. emphasis. or a system crash. as well as how to use the FRC framework.About This Manual The FIRST Robotics Competition (FRC) software includes two separate programming environments. select the Page Setup item. Use either environment to develop the robotics program you want to run on the CompactRIO device. Use LabVIEW to program a robot in the LabVIEW graphical programming environment. for information about how to develop a robotics program with Wind River Workbench. bold Bold text denotes items that you must select or click in the software. available by navigating to the Wind River\docs\ extensions\FRC directory and opening C Programming Guide for FRC. This manual discusses how to develop a robotics program in LabVIEW. a cross-reference. and select Options from the last dialog box. data loss. This icon denotes a caution. This icon denotes a note. The sequence File»Page Setup»Options directs you to pull down the File menu. LabVIEW and Wind River Workbench. Refer to the C/C++ Programming Guide for the FIRST Robotics Competition. or an introduction to a key concept. Italic text denotes variables. such as menu items and dialog box options. which advises you of precautions to take to avoid injury. Use this manual to access information about robotics programming concepts and reference information about the FIRST Robotics Competition VIs.pdf. Conventions The following conventions appear in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action.

and so on. properties. subroutines. The FRC Control System Manual also is available on this Web site under Documents and Updates. and reference information about LabVIEW VIs. device names. functions. filenames. tools. variables. This font is also used for the proper names of disk drives. paths. events. operations. directories. menus. step-by-step instructions for using LabVIEW. The LabVIEW Help also lists the LabVIEW documentation resources available from National Instruments.pdf. methods.org/community/frc for official information about the FRC competition. • LabVIEW Robotics Programming Guide for FRC xvi ni. Access this manual by navigating to the National Instruments\LabVIEW 8.com . Access the LabVIEW Help by selecting Help»Search the LabVIEW Help in LabVIEW. and extensions.usfirst. programs. Programming in LabVIEW The following documents contain information that you may find helpful as you use LabVIEW: • Getting Started with LabVIEW for the FIRST Robotics Competition—Use this manual to learn about the LabVIEW graphical programming environment and the basic LabVIEW features you can use to build FRC applications. functions.About This Manual monospace Text in this font denotes text or characters that you should enter from the keyboard. Bold text in this font denotes the messages and responses that the computer automatically prints to the screen. including rules and regulations as well as support information. and syntax examples. dialog boxes. sections of code. monospace bold monospace italic Related Documentation The following documents contain information that you may find helpful as you read this manual. Refer to the FRC Community Web site at www. palettes. subprograms. Italic text in this font denotes text that is a placeholder for a word or value that you must supply. programming examples. LabVIEW Help—Use the LabVIEW Help to access information about LabVIEW programming concepts. This font also emphasizes lines of code that are different from the other examples.5\manuals directory and opening FRC_Getting_Started.

National Instruments FIRST Community—Refer to the National Instruments FIRST Community Web site at ni.pdf. data type terminals.pdf. Access this manual by navigating to the National Instruments\ LabVIEW 8. and using the CompactRIO device for the FIRST Robotics Competition.pdf. NI 9403 Operating Instructions and Specifications—This document describes how to use the National Instruments 9403 and includes specifications and pin assignments for the NI 9403. configuring. Access this manual by navigating to the National Instruments\CompactRIO\manuals directory and opening NI_9472_9474_Operating_Instructions. keyboard shortcuts. and tools for editing. • • • © National Instruments Corporation xvii LabVIEW Robotics Programming Guide for FRC .com/first to access tutorials and examples about using LabVIEW for FRC and to connect with other FRC participants. and debugging.pdf. NI 9472/9474 Operating Instructions—This document describes how to use the National Instruments 9472 and National Instruments 9474 and includes specifications and terminal/pin assignments for the NI 9472/9474. Access this manual by navigating to the National Instruments\ CompactRIO\manuals directory and opening NI_9403_Operating_Instructions. NI 9201/9221 Operating Instructions—This document describes how to use the National Instruments 9201 and National Instruments 9221 and includes specifications and terminal/pin assignments for the NI 9201/9221.pdf.About This Manual • LabVIEW Quick Reference Card—Use this card as a reference for information about documentation resources.5\manuals directory and opening LV_Quick_Reference. Access this manual by navigating to the National Instruments\CompactRIO\manuals directory and opening crio-frc_Operating_Instructions. execution. • Using the CompactRIO Device The following documents contain information that you may find helpful as you use the CompactRIO device: • cRIO-FRC Operating Instructions and Specifications—Use this manual to learn about installing. Access this manual by navigating to the National Instruments\CompactRIO\manuals directory and opening NI_9201_9221_Operating_Instructions.

and one digital output module. The user watchdog can shut down all motors when programming failures.usfirst. also referred to as a cRIO. for more information about the I/O modules that the FRC kit provides. such as infinite loops. For FRC. Robot Architecture. The CompactRIO device serves as the “brain” of each robot and runs the program you develop and deploy from LabVIEW.org/community/frc for more information about the FRC control system and related terminology. FRC Terminology The following terms are useful to know as you build and program a robot for FRC and as you read this manual. © National Instruments Corporation 1-1 LabVIEW Robotics Programming Guide for FRC . the CompactRIO device hosts two watchdogs. Furthermore. the CompactRIO device contains five I/O modules: two analog input modules. occur.Overview of the FIRST Robotics Competition 1 The objective of the FIRST Robotics Competition (FRC) is to build and program a robot to perform certain tasks either autonomously or in response to commands the robot receives from input devices such as joysticks and game controllers. rugged controller consisting of an embedded real-time processor. is a small. and slots for interchangeable I/O modules. The system watchdog shuts down all motors if the communication network fails. Refer to the I/O Modules section of Chapter 2. Refer to the FIRST Community Web site at www. two digital input/output modules. an FPGA (field-programmable gate array). Each module interfaces directly with the FPGA on the CompactRIO device. CompactRIO Device A CompactRIO device. The CompactRIO device also receives data from the driver station and the various sensors that you connect to the I/O modules.

The field management system contains a wireless access point that can communicate with the wireless access points on multiple robots. the robot moves without receiving commands from input devices. Field Management System FIRST uses an FMS during the FRC competition to monitor robot traffic and to send commands to the driver stations.Chapter 1 Overview of the FIRST Robotics Competition Driver Station The driver station passes data between the host computer. such as joysticks and game controllers. The driver station also passes data it receives from the CompactRIO device to the host computer so you can view the data in LabVIEW. input devices. connect the driver station to the FMS instead of to a wireless access point. In TeleOp mode. the robot moves in response to commands it receives from input devices. The FMS can connect through an Ethernet connection to multiple driver stations and through a wireless connection to multiple robots. you develop a program in LabVIEW and deploy that program to the CompactRIO device on the robot. the robot moves and behaves according to instructions in the program. The program must contain instructions that allow the robot to receive LabVIEW Robotics Programming Guide for FRC 1-2 ni. During the actual FRC competition. In Autonomous mode. Connect the driver station using an Ethernet connection to a host computer. When you run the program. the FMS designates the current mode of the competition. You can connect the driver station directly to the CompactRIO device or wirelessly through a wireless access point. and the robot. The driver station can read analog data and can both read and write digital data. field management system (FMS).com . The wireless access point must be on the same local subnet as the wireless access point you connect to the CompactRIO device. As in Autonomous mode. Autonomous and TeleOp Modes The FRC competition consists of two parts: Autonomous mode and TeleOp mode. The driver station receives data from the input devices and sends the data to the CompactRIO device on the robot. such as joysticks and game controllers. You develop a program in LabVIEW and deploy that program to the CompactRIO device on the robot. For example.

Using the FRC Framework. Init. Therefore. relay. Therefore. such as joysticks and game controllers.Chapter 1 Overview of the FIRST Robotics Competition data from the input devices and respond accordingly. Enabled and Disabled Status At certain points in the FRC competition. but the robot cannot move. You can use the joystick that the FRC kit provides. which disables the PWM. When you run the program. You also can use any other joystick. the program continues running between the Autonomous and Teleop parts of the competition. For example. the robot can be in one of the following competition states: • • • • Autonomous Disabled Autonomous Enabled TeleOp Disabled TeleOp Enabled © National Instruments Corporation 1-3 LabVIEW Robotics Programming Guide for FRC . and solenoid outputs. but no motors can move. and solenoid outputs of the robot. rather than motion tasks. you can develop your robotics program to move motors and drive the robot when the robot is enabled. relay. you can develop your robotics program to handle the Disabled status such that the program handles initialization and processing tasks. When the FMS sets the status of the robots to Enabled. or other input device that you choose. Refer to Chapter 4. When the robot is in the Disabled status. to send information to the robot. you still can use input devices. You also still can read information from sensors and perform image processing on the CompactRIO device. Ensure the program you run on the CompactRIO device handles the Disabled and Enabled statuses appropriately. the program on the CompactRIO device must be running. and Stop Derived States During the competition. the FMS sets the status of the robot to Disabled and kills the system watchdog. for more information about the FRC robot project. Execute. game controller. you then can use the input devices to manipulate the behavior of the robot. During these times. the system watchdog re-enables the PWM. connect the input devices to the driver station using a USB connection. when the robot is disabled. If you want the robot to respond to commands it receives from input devices.

or Stop. the robot program transitions first to the Stop derived state of the current state and then to the Init derived state of the new state. you can specify the robot to perform tasks such as stopping motors and closing references. you can specify the robot to move. If the robot reaches the Estop state. if the robot is in the Execute derived state of the Autonomous Disabled state and the FMS sets the competition state to TeleOp Disabled. state is an emergency or disqualification state that shuts down the robot immediately. Estop State The emergency stop.com . For example. or Estop. LabVIEW Robotics Programming Guide for FRC 1-4 ni. In the Stop derived state. the robot can be in one of three derived states: Init. In the Execute derived state. you can specify the robot to perform any initialization tasks. Each time the competition state changes. In the Init derived state. you must reboot the CompactRIO device to restart execution. or perform some other behavior. read and write data.Chapter 1 Overview of the FIRST Robotics Competition For each of these states. Only the FMS can set the robot to this state. Execute. the robot transitions first to the Stop derived state of the Autonomous Disabled state and then to the Init derived state of the TeleOp Disabled state. such as opening sensor or I/O references.

one or more input devices. Robot—Consists of all parts that make up the moving robot. analog and pneumatic breakouts. and one digital output module. and slots for interchangeable I/O modules. a digital sidecar. for more information about the entire FRC controller system. This subsystem includes the CompactRIO device with five I/O modules. Wireless Communication—Establishes wireless communication between the driver station and the robot. is a small. Each module interfaces directly with the FPGA on the CompactRIO device. © National Instruments Corporation 2-1 LabVIEW Robotics Programming Guide for FRC . accessible on the FRC Community Web site at www. and a host computer. also referred to as a cRIO. the CompactRIO device contains five I/O modules: two analog input modules. • • This chapter discusses how to use LabVIEW to interface with the robot subsystem. This subsystem includes wireless access points for the driver station and the CompactRIO device.Robot Architecture 2 The FIRST Robotics Competition (FRC) controller system consists of the following subsystems: • Driver Console—Establishes communication between the CompactRIO device on the robot and the host computer.usfirst. rugged controller consisting of an embedded real-time processor. an FPGA (field-programmable gate array). This subsystem includes the driver station.org/community/frc under Documents and Updates. Refer to the FRC Control System Manual. such as joysticks and game controllers. and an Axis camera. For FRC. CompactRIO Device A CompactRIO device. two digital input/output modules.

The version of the FPGA corresponds to the year of the FRC competition. high-performance FPGA. Some applications require real-time performance that general-purpose operating systems cannot guarantee.Chapter 2 Robot Architecture Real-Time Operating System Most LabVIEW applications run on a general-purpose operating system (OS) like Windows. Using the FRC Framework. the CompactRIO device contains five I/O modules: • • • 2 — NI 9201 analog input 2 — NI 9403 digital input/output 1 — NI 9472 digital output LabVIEW Robotics Programming Guide for FRC 2-2 ni. Each I/O module on the CompactRIO device interfaces directly with the FPGA. In LabVIEW. An FPGA is an embedded chip that you can reconfigure for different applications. The CompactRIO device runs the real-time operating system (RTOS) of Wind River VxWorks. Mac OS. or Linux. Most real-time applications require timing behavior to consistently execute within a small window of acceptable jitter. You can run real-time programs on a real-time target such as a CompactRIO device. I/O Modules For FRC. Real-time systems are deterministic. deploy each application you want to run on the CompactRIO device from the RT CompactRIO Target directory of the Project Explorer window. Use the FRC FPGAVersion VI to determine the version and revision of the FPGA on the CompactRIO device. FPGA The CompactRIO device includes a built-in. Refer to the Deploying the FRC Robot Project section of Chapter 4. Jitter is a measure of the extent to which execution timing fails to meet deterministic expectations. for more information about deploying an application to the CompactRIO device.com . Determinism is the characteristic of a system that describes how consistently the system responds to external events or performs operations within a given time limit.

For example. and Chapter 25. Use the Accelerometer VIs and the Gyro VIs to acquire analog data from those sensors. You then can connect any analog sensors. Swapping the modules after the CompactRIO device boots applies the calibration for the original module to the replacement module. Note You must insert the NI 9201 analog modules before the CompactRIO device boots for accurate calibration of the modules. such as accelerometers and gyros. Inserting the modules after the CompactRIO device boots applies factory default calibration values as the analog module constants. for more information about the Accelerometer and Gyro VIs. you can specify a module value of 1 to use the NI 9201 in slot 1 of the CompactRIO device. you must specify the module and channel you want to use. to the analog breakouts to acquire analog data. You connect an analog breakout to each of the NI 9201 modules. Gyro VIs. Slots for I/O Modules on the CompactRIO Device Slot 1 2 3 4 5 6 7 8 I/O Module NI 9201 NI 9201 — NI 9403 — NI 9403 — NI 9472 When you use the WPI Robotics Library VIs. Accelerometer VIs. Refer to Chapter 9. respectively. NI 9201 The NI 9201 provides connections for eight analog input channels.Chapter 2 Robot Architecture Table 2-1 lists the slots on the CompactRIO device and the modules corresponding to those slots. You then can select a value for the channel on the NI 9201 that you want to use. Table 2-1. © National Instruments Corporation 2-3 LabVIEW Robotics Programming Guide for FRC .

to the digital sidecars to acquire digital data. DigitalInput VIs. and Ultrasonic VIs to acquire digital data from those sensors. Refer to the NI 9201/9221 Operating Instructions document. DigitalOutput VIs. and ultrasonic sensors. Connect a pneumatic breakout to the NI 9472 and connect the solenoid to the pneumatic breakout. LabVIEW Robotics Programming Guide for FRC 2-4 ni. Encoder. Refer to Chapter 12. You use a DSUB cable to connect a digital sidecar to each of the NI 9403 modules. the NI 9472 can output a maximum voltage of 30 V. You can use this module to control a solenoid. for more information about the NI 9403. encoders. Counter VIs.2 V. Chapter 26.Chapter 2 Robot Architecture Use the AnalogChannel VIs to acquire analog data from other analog input devices. Whereas the NI 9403 can output a maximum voltage of 5. the NI 9472 can output a maximum voltage of 12 V. for more information about the NI 9201. NI 9472 The NI 9472 provides connections for eight digital output channels. accessible by navigating to the National Instruments\ CompactRIO\manuals directory and opening NI_9403_Operating_Instructions. Refer to the NI 9403 Operating Instructions and Specifications document. I2C VIs. Encoder VIs. such as counters. and Chapter 40. Use the Counter. Chapter 24. Refer to Chapter 19. You then can connect digital sensors. If you use the pneumatic breakout with the NI 9472. Refer to Chapter 20.com . accessible by navigating to the National Instruments\ CompactRIO\manuals directory and opening NI_9201_9221_Operating_Instructions. Then use the Solenoid VIs to specify whether the NI 9472 sends a 12 V signal to the solenoid. for more information about the AnalogChannel VIs. Use the DigitalInput VIs and the DigitalOutput VIs to send or receive digital data from other digital input and output devices. NI 9403 The NI 9403 provides connections for 32 digital input or digital output channels. AnalogChannel VIs. for more information about the DigitalInput and DigitalOutput VIs. respectively. for more information about these VIs. Ultrasonic VIs.pdf.pdf. and Chapter 21. respectively.

available by selecting Help»Search the LabVIEW Help. so you cannot view the images being acquired. However. for more information about the FIRST Vision VIs. Refer to Chapter 15. Refer to Chapter 15. Axis Camera The robot subsystem includes an Axis camera that you can use to perform image acquisition.pdf. Solenoid VIs. Use the Camera VIs to specify settings for the Axis camera and to acquire images with the camera. Click the Run button of the VI you want to deploy to the CompactRIO device to perform live front panel debugging. Refer to the LabVIEW Help.Chapter 2 Robot Architecture Refer to Chapter 38. Camera VIs. The CompactRIO device is headless. for more information about the Get Image From Controller VI. Note You can send image data to the host computer or perform live front panel debugging only during development. for more information about live front panel debugging. accessible by navigating to the National Instruments\ CompactRIO\manuals directory and opening NI_9472_9474_Operating_Instructions. you can send the image data from the CompactRIO device to the host computer and view the images on the host computer. not during the FRC competition. Use the Get Image From Controller VI to retrieve a specific image on the host computer from the image data that the CompactRIO device sends. You also can use live front panel debugging to view the images on the host computer. Refer to the Deploying The Program Using The Run Button section of Chapter 4. Use the FIRST Vision VIs to process the images you acquire. as you develop the program you want to run on the CompactRIO device. You can acquire images and process them directly on the CompactRIO device. for more information about the Solenoid VIs. Refer to the NI 9472/9474 Operating Instructions document. © National Instruments Corporation 2-5 LabVIEW Robotics Programming Guide for FRC . Camera VIs. for more information about the Camera VIs. Using the FRC Framework. for more information about the NI 9472.

Chapter 2

Robot Architecture

Before you can use the Axis camera, you must configure it with the correct username and password. Use the Setup Axis Camera Tool, available by selecting Tools»Setup Axis Camera, to configure the Axis camera. Refer to the Configuring the Axis Camera section of Chapter 3, Configuring the Camera and the CompactRIO Device, for more information about configuring the camera.

FRC Software LabVIEW Components
The FRC software includes LabVIEW, the LabVIEW Real-Time Module, the NI Vision Development Module, NI-RIO, as well as FRC-specific VIs. Use this software to interface directly with the various I/O modules on the CompactRIO device and manipulate the behavior of the robot you build. You can use the FRC software to develop a program that runs on the host computer or that you can deploy and run on the CompactRIO device.

FIRST Robotics Competition VIs
The FIRST Robotics Competition VIs are divided into two palettes, FIRST Vision and WPI Robotics Library. Use the FIRST Vision VIs to process images you acquire with the Axis camera. Use the WPI Robotics Library VIs to interface with the CompactRIO device and perform tasks such as sending and receiving data from sensors and driving motors. The WPI Robotics Library VIs are analogous to the WPI Robotics Library, a library of C/C++ functions developed by Worcester Polytechnic Institute (WPI) for robotics applications. Refer to Chapters 9 through 42 for more information about the WPI Robotics Library VIs.

FRC Configuration Tools
The FRC software also includes configuration tools you can use to configure the Axis camera and the CompactRIO device.

Setup Axis Camera Tool
Use the Setup Axis Camera Tool, available by selecting Tools»Setup Axis Camera, to configure the Axis camera with the correct username and password. Refer to the Configuring the Axis Camera section of Chapter 3, Configuring the Camera and the CompactRIO Device, for more information about configuring the Axis camera.

LabVIEW Robotics Programming Guide for FRC

2-6

ni.com

Chapter 2

Robot Architecture

CompactRIO Imaging Tool
Use the CompactRIO Imaging Tool, available by selecting Tools» CompactRIO Imaging Tool in LabVIEW, to configure the CompactRIO device with a start-up image. You can use this tool to switch between the LabVIEW and Wind River Workbench programming environments when developing the program you run on the CompactRIO device. You also can restore an image on the CompactRIO device or update the CompactRIO device with a new name or IP address. Refer to the Configuring the CompactRIO Device section of Chapter 3, Configuring the Camera and the CompactRIO Device, for more information about configuring the CompactRIO device.

© National Instruments Corporation

2-7

LabVIEW Robotics Programming Guide for FRC

Configuring the Camera and the CompactRIO Device

3

The CompactRIO device in the FIRST Robotics Competition (FRC) kit contains an initial image that allows you to steer a robot with a joystick. You can use this image to verify that the motors, motor controllers, and joystick work as expected. After you verify this behavior, you must configure the Axis camera and the CompactRIO device for use in the FRC competition.

Configuring the Axis Camera
When you configure the Axis camera, you set the username and password of the camera to FRC so the Camera VIs can communicate with the camera. You need to configure the camera only once. You do not need to reconfigure the Axis camera during the FRC competition. To configure the Axis camera, you must set the static IP address of the computer, connect the computer to the camera, and then run the Setup Axis Camera Tool.

Setting the Static IP Address of the Computer
Complete the following steps to set the static IP address of the computer. 1. 2. 3. 4. 5. 6. Select Start»Control Panel»Network Connections»Local Area Connection to display the Local Area Connection Status dialog box. Click the Properties button to display the Local Area Connection Properties dialog box. On the General page, select Internet Protocol (TCP/IP) from the This connection uses the following items list. Click the Properties button to display the Internet Protocol (TCP/IP) Properties dialog box. Select the Use the following IP address option. In the IP address text box, enter 192.168.0.06.

© National Instruments Corporation

3-1

LabVIEW Robotics Programming Guide for FRC

Chapter 3

Configuring the Camera and the CompactRIO Device

7.

The Subnet mask text box defaults to 255.255.255.0. Use this default value.

8. 9.

Click the OK button twice to close the Internet Protocol (TCP/IP) Properties and Local Area Connection Properties dialog boxes. Click the Close button to close the Local Area Connection Status dialog box.

After you set the static IP address of the computer, use an Ethernet crossover cable to connect the computer to the camera. Then configure the camera with the Setup Axis Camera Tool.

LabVIEW Robotics Programming Guide for FRC

3-2

ni.com

Chapter 3

Configuring the Camera and the CompactRIO Device

Running the Setup Axis Camera Tool
Complete the following steps to configure the camera with the Setup Axis Camera Tool. 1. Select Start»All Programs»National Instruments»LabVIEW 8.5» Setup Axis Camera to display the Setup Axis Camera dialog box. You also can display this dialog box by selecting Tools»Setup Axis Camera in LabVIEW. Wait for the dialog box to finish configuration. The Setup Axis Camera dialog box sets the username and password of the camera to FRC so the Camera VIs can communicate with the camera. If the configuration is unsuccessful, you might need to verify the camera connection and the IP settings. Click the Close button to close the Setup Axis Camera dialog box.

2.

3.

After you configure the camera, use an Ethernet crossover cable to connect the camera to Ethernet port 2 of the CompactRIO device. The program you run on the CompactRIO device then can communicate with the camera. You also can configure the username and password of the Axis camera manually. Refer to the FRC Control System Manual, accessible on the FRC Community Web site at www.usfirst.org/community/frc under Documents and Updates, for more information about configuring the camera manually.

Configuring the CompactRIO Device
To configure the CompactRIO device, you must set the static IP address of the computer, connect the computer to the CompactRIO device, and then run the CompactRIO Imaging Tool.

Setting the Static IP Address of the Computer
Complete the following steps to set the static IP address of the computer. 1. 2. 3. 4. Select Start»Control Panel»Network Connections»Local Area Connection to display the Local Area Connection Status dialog box. Click the Properties button to display the Local Area Connection Properties dialog box. On the General page, select Internet Protocol (TCP/IP) from the This connection uses the following items list. Click the Properties button to display the Internet Protocol (TCP/IP) Properties dialog box.

© National Instruments Corporation

3-3

LabVIEW Robotics Programming Guide for FRC

Chapter 3

Configuring the Camera and the CompactRIO Device

5. 6.

Select the Use the following IP address option. In the IP address text box, enter 10.xx.yy.6, where yy corresponds to the last two digits of the team number and xx corresponds to the first or first two digits of the team number. Table 3-1 lists examples of the static addresses corresponding to different team numbers.
Table 3-1. Static IP Addresses Corresponding to Team Numbers

Team Number 64 512 1024 7.

Static IP Address 10.0.64.6 10.5.12.6 10.10.24.6

The Subnet mask text box defaults to 255.0.0.0. Use this default value.

LabVIEW Robotics Programming Guide for FRC

3-4

ni.com

Chapter 3

Configuring the Camera and the CompactRIO Device

8. 9.

Click the OK button twice to close the Internet Protocol (TCP/IP) Properties and Local Area Connection Properties dialog boxes. Click the Close button to close the Local Area Connection Status dialog box.

After you set the static IP address of the computer, use an Ethernet crossover cable to connect the computer to Ethernet port 1 of the CompactRIO device. Then configure the CompactRIO device with the CompactRIO Imaging Tool.

Considerations Before Running the CompactRIO Imaging Tool
Before configuring the CompactRIO device with the CompactRIO Imaging Tool, you must ensure that the hardware and software are configured properly. Do not use the CompactRIO Imaging Tool on the CompactRIO device over a wireless connection. If the connection is lost, the data that the CompactRIO Imaging Tool writes to the CompactRIO device is corrupted. Do not use Measurement and Automation Explorer (MAX) to install additional software on the CompactRIO device. MAX overwrites the FRC VIs on the CompactRIO device, which makes the CompactRIO device unusable for the FRC competition. If you use MAX to install additional software on the CompactRIO device, you must use the CompactRIO Imaging Tool to restore the device to a usable state. Before running the CompactRIO Imaging Tool, ensure the SAFE MODE switch on the CompactRIO device is turned off. For routine use, do not use the CompactRIO Imaging Tool when the CompactRIO device is in SAFE MODE.
Note

Severe corruptions of the software or settings on the CompactRIO device result in the device no longer functioning. If the CompactRIO device is corrupted or if the IP Address is set incorrectly, the device boots only in SAFE MODE. When this occurs, switch the device into SAFE MODE. The CompactRIO Imaging Tool offers to reformat the disk. After the disk has been reformatted, switch the CompactRIO device out of SAFE MODE, reboot, and run the CompactRIO Imaging Tool normally.

© National Instruments Corporation

3-5

LabVIEW Robotics Programming Guide for FRC

Chapter 3

Configuring the Camera and the CompactRIO Device

Running the CompactRIO Imaging Tool
Complete the following steps to configure the CompactRIO device with the CompactRIO Imaging Tool. 1. Select Start»All Programs»National Instruments»LabVIEW 8.5» FRC cRIO Imaging Tool to launch the CompactRIO Imaging Tool dialog box. You also can display this dialog box by selecting Tools»CompactRIO Imaging Tool in LabVIEW. Select the CompactRIO device you want to configure from the Select CompactRIO Device table. This table lists all CompactRIO devices connected to the host computer. In the Choose Development Environment section, specify whether you want to run and debug LabVIEW or the C/C++ programs that you run on the CompactRIO device. Place a checkmark in the Format Controller checkbox. Use the Format Controller section to restore an image on the CompactRIO device or update the CompactRIO device with a new name or team ID. From the Select Image list, select the most recent FRC_2009_xx.zip file to download the FRC_2009_xx image to the CompactRIO device. The FRC_2009_xx image consists of both a LabVIEW and a C/C++ program. Enter the name you want to use to identify the CompactRIO device in the Device name text box. Enter your team number in the Team ID field. The CompactRIO Imaging Tool sets the IP address of the CompactRIO device to 10.xx.yy.2, where yy corresponds to the last two digits of the team number and xx corresponds to the first or first two digits of the team number. Click the Apply button to apply the changes you made and download the FRC_2009_xx image to the CompactRIO device. Do not turn off power to the CompactRIO device or interfere with the network connection while the CompactRIO Imaging Tool downloads the image to the CompactRIO device. Turn the CompactRIO device off and then turn it back on to load the new image.

2.

3.

4.

5.

6. 7.

8.

9.

If you modify the program that you run on the CompactRIO device and want to revert the changes, you can use the CompactRIO Imaging Tool to restore the FRC_2009_xx image on the CompactRIO device.

LabVIEW Robotics Programming Guide for FRC

3-6

ni.com

Chapter 3

Configuring the Camera and the CompactRIO Device

If you modify the program you run on the CompactRIO device and want to switch to the program in the other development environment, select the new development environment from the Choose Development Environment section and click the Apply button. Switching development environments does not reformat or download a new image to the CompactRIO device.

Using the Real-Time System Manager to Manage CompactRIO Device Resources
You can use the Real-Time System Manager to determine the processor load on the CompactRIO device. You may want to do this if the CompactRIO device is operating slowly. The Real-Time System Manager displays details about VIs running on a real-time (RT) target and provides a dynamic display of the memory and CPU resources for the target. You also can stop VIs and start idle VIs on the RT target using the Real-Time System Manager. From the Project Explorer window, select Tools» Real-Time Module»System Manager to launch the Real-Time System Manager.
Note

When you run the Real-Time System Manager, it takes up a significant amount of the memory on the CompactRIO device. You also can determine the processor load of the CompactRIO device by using the command memShow in the Terminal tab in Wind River Workbench or in Microsoft Hyperterminal. Refer to the Getting Started with the LabVIEW Real-Time Module document, available by navigating to the National Instruments\LabVIEW 8.5\manuals directory and opening RT_Getting_Started.pdf, for more information about the Real-Time System Manager. Refer to the Configuring the CompactRIO Device section of this chapter for more information about configuring the CompactRIO device.

© National Instruments Corporation

3-7

LabVIEW Robotics Programming Guide for FRC

3. LabVIEW displays the new FRC robot project in the Project Explorer window. that you can use as a template when building a robotics application for FRC. enter the location on the host machine to which you want to save the project files and VIs. In the cRIO IP address text box.xx. Click the Finish button to close the Create New FRC Robot Project dialog box and create the new FRC robot project. Use the FRC dashboard project template to develop the program with which you want to view data on the host computer. enter the name you want to use to identify the new FRC robot project. 2. where yy corresponds to the last two digits of the team number and xx corresponds to the remaining first or first two digits of the team number. Use the FRC robot project template to develop the program you want to deploy to and run on the CompactRIO device. organized in LabVIEW projects. Click the FRC cRIO Robot Project link in the Getting Started window to display the Create New FRC Robot Project dialog box. enter the IP address of the CompactRIO device to which you want to deploy the project. 6.2. 4. 5. initializes the user watchdog and the Axis camera. In the Project folder path. The FRC framework consists of two project templates. Specify whether you want to create the FRC robot project using the Basic Framework or the Advanced Framework.yy. In the Project name text box. Complete the following steps to create an FRC robot project: 1. You can use the CompactRIO Imaging Tool to set the IP address of the CompactRIO device. and specifies how to handle each competition mode and status of the robot. FRC Robot Project The FRC robot project starts communication between the CompactRIO device and the driver station.Using the FRC Framework 4 The FIRST Robotics Competition (FRC) framework is a set of VIs. © National Instruments Corporation 4-1 LabVIEW Robotics Programming Guide for FRC . The IP address of the CompactRIO device must be in the form 10.

Files under My Computer are those you want to use and run on the host computer. The Robot Main VI is the master VI for the robot and is the top-level VI for the robotics program you run on the CompactRIO device. LabVIEW Robotics Programming Guide for FRC 4-2 ni. the FRC robot project contains two targets: My Computer and RT CompactRIO Target. Each FRC robot project also has a Robot Main VI.com . FRC Robot Projects Notice that in each case. Files under RT CompactRIO Target are those you want to deploy to and run on the CompactRIO device.Chapter 4 Using the FRC Framework Figure 4-1 shows a basic FRC robot project template (left) and an advanced FRC robot project template. Figure 4-1.

and performs Autonomous or TeleOp tasks depending on the competition mode. double-click the Basic Robot Main. The RT CompactRIO Target also contains one top-level type definition. Basic Robot Global VI. Basic FRC Robot Project The RT CompactRIO Target contains four top-level VIs: Basic Robot Main VI.Chapter 4 Using the FRC Framework Basic FRC Robot Project If you choose to create a basic FRC robot project from the Create New FRC Robot Project dialog box. In the Project Explorer window. Autonomous Independent VI. The block diagram contains three While Loops. LabVIEW creates an FRC robot project that looks similar to the following figure: Figure 4-2. the Dashboard Datatype control. Select Window»Show Block Diagram or press the <Ctrl-E> keys to view the block diagram. © National Instruments Corporation 4-3 LabVIEW Robotics Programming Guide for FRC . starts acquiring image data with the Axis camera. Basic Robot Main VI The Basic Robot Main VI establishes communication with the driver station. initializes the user watchdog to an enabled state.vi item to open the Basic Robot Main VI. and Build DashBoard Data VI.

The Basic Get Mode VI determines the competition state. you might want to disable the user watchdog so the robot can continue moving even if the program reaches a breakpoint. The Start Communication VI starts the communication loop between the CompactRIO device and the driver station and initializes the host computer. This While Loop contains the Basic Get Mode VI and a Case structure. Use the Autonomous Independent VI to specify the robot behavior for the Autonomous portion of the competition. This VI runs continuously and regularly checks for information from the host computer. LabVIEW Robotics Programming Guide for FRC 4-4 ni. and driver station data caches. and driver station data caches. By default. you can use this VI to arcade drive a two-wheeled robot using one joystick and Jaguar motor controllers. and driver station. The Watchdog Open VI initializes the user watchdog to an enabled state. the Stop Communication VI stops the communication loop between the CompactRIO device and the driver station. the TeleOp Execute case of the Case structure executes. Use the WPI Robotics Library VIs and other LabVIEW VIs to modify the TeleOp Execute case of the Case structure to specify the behavior of the robot you build. This VI also initializes the system watchdog on the CompactRIO device. Notice that the Start Communication VI and the Watchdog Open VI run before the first While Loop. However. The Stop Communication VI also releases the host computer. Refer to the Build DashBoard Data VI section of this chapter for more information about the Build DashBoard Data VI. joystick. The first While Loop also contains the Build DashBoard Data VI. Refer to the Autonomous Independent VI section of this chapter for more information about the Autonomous Independent VI. which ensures that the robot does not continue moving if the program stops executing. The first While Loop also determines the behavior of the robot according to the competition mode and state. the TeleOp Execute case of the Case structure contains the ArcadeDrive VI. which you can use to send I/O data from the CompactRIO device to the host computer.com . For debugging purposes. With the default configuration. During the TeleOp portion of the FRC competition.Chapter 4 Using the FRC Framework Communications While Loop The first While Loop in the Basic Robot Main VI establishes communication between the CompactRIO device and the driver station. be sure the robot is on blocks before running any program with the user watchdog disabled. joystick. joystick. When the first While Loop of the Basic Robot Main VI stops.

The second Case structure determines whether to process the images. the Basic Robot Main VI neither acquires nor processes any images from the Axis camera. The first Case structure determines whether to start or stop acquiring image data from the Axis camera. If you do not want to perform image acquisition continuously. the Camera Open. the Basic Robot Main VI acquires image data from the Axis camera and processes each image. © National Instruments Corporation 4-5 LabVIEW Robotics Programming Guide for FRC . By default. Therefore. you then can move the motors of the robot in an appropriate direction. you might include PID VIs to perform time-based control operations. you can use the FIRST Vision VIs to determine the color of an image you acquire. Set Image Size. this While Loop contains only a Wait (ms) function that waits 100 ms between each iteration of the loop. for example. the Camera Stop and Close VIs stop acquiring image data and close the reference to the camera. you can specify to change the value of the Enable Vision control depending on the competition mode. the Basic Robot Main VI configures an image size of 320 × 240 pixels and a frame rate of 10 frames per second. For example. and Set Frame Rate VIs configure initial settings for the image acquisition. the True case of each Case structure executes. Periodic Tasks While Loop You can use the third While Loop of the Basic Robot Main VI to perform periodic tasks. respectively. For example.Chapter 4 Using the FRC Framework Image Processing While Loop The second While Loop of the Basic Robot Main VI processes image data that you acquire from an Axis camera. The IMAQ Create VI specifies a name of Primary Image for any image you retrieve from the acquired image data. Depending on the color. If the Enable Vision control is set to TRUE. If the Enable Vision control is set to FALSE. When the second While Loop stops. You can use the FIRST Vision VIs to process the image data. This While Loop consists of two Case structures. You might use image processing to help determine the behavior of a robot. Before the second While Loop runs. By default.

notice that the RobotDriveDevRef output of the Open2Motor VI is wired to a global variable. 4. 3. Press the <Ctrl-V> keys to paste the GyroDevRef control on the front panel of the Basic Robot Global VI. 5. By default. Drag the VI icon of the Basic Robot Global VI to the block diagram of the VI in which you placed the Gyro Open VI. If at any time you need to specify a reference to these same motors. and the information for these motors is written to the RobotDriveDevRef control in the Basic Robot Global VI. The Open2Motor VI opens a reference to two motors. the Basic Robot Global VI contains a RobotDriveDevRef control and a WatchdogDevRef control on the front panel. Notice that LabVIEW places a global variable on the block diagram. 7. On the block diagram of the Basic Robot Main VI. In the Project Explorer window of the basic FRC robot project.vi item to open the Basic Robot Global VI. global VIs contain a front panel but no block diagram. 1. In particular. LabVIEW Robotics Programming Guide for FRC 4-6 ni. In this case. 6. the global variable is associated with the RobotDriveDevRef control. Select the GyroDevRef output on the front panel of the Gyro Open VI and press the <Ctrl-C> keys to copy the gyroscope device reference. 2. Complete the following steps to use the Basic Robot Global VI to pass data about a gyroscope.Chapter 4 Using the FRC Framework Basic Robot Global VI Use the Basic Robot Global VI to access and pass data among several VIs. double-click the Basic Robot Global. the global variable is associated with the first front panel object with an owned label you added to the global VI. you can use this global VI to store device reference information for the various motors and sensors of your robot. Passing Device Reference Data With The Basic Robot Global VI You can add device references for other motors or sensors to the Basic Robot Global VI in order to pass data for those objects among several VIs. Because global VIs only pass data and perform no computations. Place a Gyro Open VI on the block diagram. Double-click the Gyro Open VI to open the VI. you can use the Basic Robot Global VI to provide this data. By default.com . Save the Basic Robot Global VI.

Chapter 4 Using the FRC Framework 8. the block diagram of the Autonomous Independent VI contains a For Loop within a Case structure. Build DashBoard Data VI The Build DashBoard Data VI sends I/O data from the modules on the CompactRIO device through the driver station to the host computer. The Build DashBoard Data VI also updates data values in the Dashboard Datatype type definition. Click the RobotDriveDevRef global variable and select GyroDevRef from the shortcut menu to associate the global variable with the data from the GyroDevRef control. Recall that the Basic Robot Main VI references the Autonomous Independent VI and calls it if the competition mode is Autonomous. 10. By default. The Case structure specifies whether to run the default autonomous code for the robot. and the solenoid module to the host computer. which you then can reuse in other VIs. the Gyro Open VI opens a reference to a gyroscope. You can delete the default autonomous code and use the WPI Robotics Library VIs or other LabVIEW VIs to specify the program you want to run during the Autonomous portion of the FRC competition. You do not need to program the Autonomous Independent VI to stop after a certain time because the Basic Robot Main VI terminates this VI when the competition mode changes to TeleOp. When you configure the other parameters of the Gyro Open VI and run the VI. the first digital module. The True case contains a For Loop that moves the robot back and forth slightly four times. and LabVIEW writes the gyroscope device reference data to the GyroDevRef control of the Basic Robot Global VI. 9. The False case of the Case structure does nothing. By default. Wire the GyroDevRef output of the Gyro Open VI to the GyroDevRef global variable. the Dashboard Enables input specifies to send raw data for the first analog module. © National Instruments Corporation 4-7 LabVIEW Robotics Programming Guide for FRC . Autonomous Independent VI The Autonomous Independent VI is the program you want to run during the Autonomous portion of the FRC competition. You can use the Dashboard Enables input of this VI to specify what data you want to send.

if you want more control over the robot in each competition state and derived state. Advanced FRC Robot Project LabVIEW Robotics Programming Guide for FRC 4-8 ni. You can add or remove the controls that this type definition contains depending on the data that you want to reuse. LabVIEW creates an FRC robot project that looks similar to the following figure: Figure 4-3. However. you can use the advanced FRC robot project. Advanced FRC Robot Project The basic FRC robot project has a flat structure that lets you program either Autonomous or TeleOp behavior. and solenoid module of the CompactRIO device.com . If you choose to create an advanced FRC robot project from the Create New FRC Robot Project dialog box. two digital modules.Chapter 4 Using the FRC Framework Dashboard Datatype Type Definition The Dashboard Datatype type definition specifies data corresponding to the two analog modules.

This target also contains a TypeDefs folder and a Team Code folder. In the Project Explorer window. As with the basic FRC robot project. you only need to modify the code within each of the subVIs in the Team Code folder of the FRC robot project. the Robot Main VI calls the Finish VI. and performs Autonomous or TeleOp tasks depending on the competition mode. the Robot Main VI in this project is the top-level VI. The Robot Main VI runs until the Abort Execution button on the VI toolbar is pressed or until the Finish button on the front panel is pressed. the Robot Main VI calls the Teleop VI. If the Abort Execution button is pressed. double-click the Robot Main. acquires and processes images. which you can use to send I/O data from the CompactRIO device to the host computer. it uses the Start Communication VI to establish communication with the driver station. After the Robot Main VI calls the Begin subVI. These folders contain type definitions and subVIs that the Robot Main VI calls. the Robot Main VI calls the Autonomous Iterative VI. When the competition state is TeleOp Enabled. the Robot Main VI calls the Disabled VI. or perform any other cleanup tasks. you do not need to modify the Robot Main VI in the advanced FRC robot project. Robot Main VI The Robot Main VI establishes communication with the driver station. The other subVIs in the Robot Main VI perform tasks such as initializing data. where you modify the Basic Robot Main VI directly. Refer to the Build DashBoard Data VI section of this chapter for more information about the Build DashBoard Data VI. performing time-based operations. the Robot Main VI aborts immediately and does not perform any cleanup tasks. If the Finish button is pressed. The While Loop determines the behavior of the robot according to the competition mode and state. which you can configure to close device references. © National Instruments Corporation 4-9 LabVIEW Robotics Programming Guide for FRC . When the competition state is Autonomous Enabled.vi item to open the Robot Main VI. If the robot is in Disabled status. The While Loop also contains the Build DashBoard Data VI. The block diagram contains a single While Loop and a number of subVIs. Unlike in the basic FRC robot project. Instead. and processing images. save collected data to file. the Robot Main VI.Chapter 4 Using the FRC Framework The RT CompactRIO Target contains one top-level VI. Select Window»Show Block Diagram or press the <Ctrl-E> keys to view the block diagram.

Specify whether you want to use the Autonomous Independent VI or the Autonomous Iterative VI on the block diagram of the Begin VI.Chapter 4 Using the FRC Framework Team Code VIs The Team Code folder of the FRC robot project contains subVIs that the Robot Main VI calls to perform the initialization. the Begin VI configures settings for the Autonomous program you want to run. execution. LabVIEW Robotics Programming Guide for FRC 4-10 ni. the block diagram of the Autonomous Independent VI contains a For Loop within a Case structure. you do not need to make any changes from the default values. You do not need to program the Autonomous Independent VI to stop after a certain time because the Robot Main VI terminates this VI when the competition mode changes to TeleOp. If you use the Autonomous Iterative VI. This VI runs for the duration of the Autonomous portion of the competition. VisionData. If you use the Autonomous Independent VI. The False case of the Case structure does nothing. configures options for the FRC dashboard project on the host computer. load settings from file. The Case structure specifies whether to run the default autonomous code for the robot. The True case contains a For Loop that moves the robot back and forth slightly four times. You can open references to motors and sensors you want to use. Autonomous Independent VI The Autonomous Independent VI is one of two VIs you can choose to run during the Autonomous portion of the FRC competition.com . By default. opens a reference to the Axis camera. By default. and perform other initialization tasks. You can use the WPI Robotics Library VIs and other LabVIEW VIs to configure other initialization tasks. and PeriodicTaskData type definitions. Begin VI The Begin VI initializes data for use throughout the Robot Main VI. you must select Iterative from the Autonomous Style control and change the VI Refnum control from a reference to the Autonomous Independent VI to a reference to the Autonomous Iterative VI. and cleanup tasks for the Autonomous and TeleOp portions of the FRC competition. and defines the RobotData. You can delete the default autonomous code and use the WPI Robotics Library VIs or other LabVIEW VIs to specify the program you want to run during the Autonomous portion of the FRC competition.

the inner Case structure executes according to the derived state of the robot. during the Autonomous portion of the FRC competition. Disabled VI The Disabled VI runs whenever the robot is in Disabled status. wired to the left border of the Case structure. the Autonomous Iterative VI does nothing by default. Alternatively. to determine the action to perform. The Execute case of the Case structure includes any actions. Alternatively. as specified on the block diagram of the Begin VI. The Stop case of the inner Case structure performs cleanup tasks. You can use the Init case of the inner Case structure to initialize any motors or sensors for the Autonomous portion of the competition. You can use this VI to calibrate sensors or the Axis camera before the FRC competition or between the Autonomous and TeleOp portions of the competition.Chapter 4 Using the FRC Framework The Autonomous Independent VI is recommended over the Autonomous Iterative VI. such as closing device references that are needed only during the Autonomous portion of the competition. You can use the Autonomous Elapsed Seconds information. The outer Case structure specifies whether to use the Autonomous Independent VI or the Autonomous Iterative VI. If you choose to use the Autonomous Iterative VI during the Autonomous portion of the FRC competition. you can initialize this data in the Begin VI so that the data is available when the robot is in Enabled status as well. The block diagram of the Autonomous Iterative VI consists of two Case structures. You can use the Init case of the Case structure to perform initialization tasks that apply only when the robot is in Disabled status. This VI iterates and performs some action each time a packet arrives from the driver station. you can initialize this data in the Begin VI so that the data is available during the TeleOp portion of the competition as well. The Stop case of the Case structure performs © National Instruments Corporation 4-11 LabVIEW Robotics Programming Guide for FRC . such as calibrating sensors. Autonomous Iterative VI The Autonomous Iterative VI is one of two VIs you can choose to run during the Autonomous portion of the FRC competition. You can use the Stop case to restore settings to the values they held after the Begin VI ran. that you want the robot to perform when the motors are disabled. The block diagram of the Disabled VI contains a Case structure that executes depending on the derived state of the robot. If you choose to use the Autonomous Independent VI. The Execute case of the inner Case structure performs the action you want to take place each time a packet arrives from the driver station.

update the robot motors. By default. the Init case initializes the robot to read the value of joystick 1.Chapter 4 Using the FRC Framework cleanup tasks. LabVIEW Robotics Programming Guide for FRC 4-12 ni. You can use the Init case of the Case structure to initialize any motors or sensors for the TeleOp portion of the competition. For example. Robot Global Data VI Use the Robot Global Data VI to access and pass data among several VIs. You can use the Stop case to restore settings to the values they held after the Begin VI ran. The block diagram of the Teleop VI contains a Case structure that executes depending on the derived state of the robot. Because global VIs only pass data and perform no computations. global VIs contain a front panel but no block diagram. In particular. The Execute case of the Case structure performs the action you want to take place each time a TeleOp packet arrives from the driver station. or update setpoints for the periodic operations specified in the Periodic Tasks VI.com . Use the Periodic Tasks VI to program the actual behavior of the robot during the TeleOp portion of the competition. Refer to the RobotData Type Definition section of this chapter for information about the RobotData type definition. you can initialize this data in the Begin VI so that the data is available during the Autonomous portion of the competition as well. Alternatively. Teleop VI The Teleop VI iterates and performs some action each time a packet specifying the TeleOp mode arrives from the driver station. such as closing device references that are needed only when the robot is in Disabled status. By default. such as closing device references that are needed only during the TeleOp portion of the competition. the Robot Global Data VI contains an Enable Vision control and a RobotData type definition on the front panel. you might want to read values from a joystick. The Teleop VI uses the RobotData type definition to specify device references of the correct data types for use with the WPI Robotics Library VIs. The Stop case of the Case structure performs cleanup tasks. You can use the Stop case to restore settings to the values they held after the Begin VI ran. you can use this global VI to store device reference information for the various motors and sensors of your robot. This VI only handles the event of the competition mode being set to TeleOp.

you can configure the Enable Vision control in the Robot Global Data VI to change value depending on the competition mode. Notice the Enable Vision global variable wired to the first Case structure. Vision Processing VI The Vision Processing VI acquires images from the Axis camera and performs image processing. The second Case structure determines whether to process the images. The block diagram of the Vision Processing VI consists of a While Loop. If you do not want to perform image acquisition continuously. you can use the FIRST Vision VIs to determine the color of an image you acquire. the Enable Vision global variable is wired to the Case structure that determines whether to start or stop image acquisition. The first Case structure determines whether to start or stop acquiring image data from the Axis camera. This VI runs continuously while the Robot Main VI is running. This global variable is an instance of the Robot Global Data VI. If the Enable Vision global variable is FALSE. for example.Chapter 4 Using the FRC Framework On the block diagram of the Vision Processing VI. you might include PID VIs to perform time-based control operations. and processes each image. Depending on the color. the Vision Processing VI neither acquires nor processes any images from the Axis camera. This VI runs continuously while the Robot Main VI is running. you then can move the motors of the robot in an appropriate direction. You can use the FIRST Vision VIs to process the image data. You might use image processing to help determine the behavior of a robot. For example. Therefore. retrieves specific images from this data. the Vision Processing VI acquires image data from the Axis camera. The value of the Enable Vision control in the Robot Global Data VI determines which case of the Case structure in the Vision Processing VI to execute. the True case of each Case structure executes. If the Enable Vision global variable is TRUE. For example. which itself contains two Case structures. The value of the Enable Vision control is set in the Robot Global Data VI and then passed to the Case structure. Periodic Tasks VI The Periodic Tasks VI performs periodic tasks. © National Instruments Corporation 4-13 LabVIEW Robotics Programming Guide for FRC .

You can wire elements of this cluster to the appropriate parameters of the WPI Robotics Library VIs. Build DashBoard Data VI The Build DashBoard Data VI sends I/O data from the modules on the CompactRIO device through the driver station to the host computer. You can change the value of the milliseconds to wait input to specify the frequency of each periodic task. The second subdiagram of the Flat Sequence structure stops the Finish VI and. The Build DashBoard Data VI also updates data values in the Dashboard Datatype type definition. For example. which you then can reuse in other VIs. Use a global variable such as the Robot Global Data VI to share data among loops. Finish VI The Finish VI performs cleanup tasks before the Robot Main VI stops.Chapter 4 Using the FRC Framework By default. You can use the Dashboard Enables input of this VI to specify what data you want to send. Periodic loops often operate with setpoints from other loops. Each While Loop contains a Wait (ms) function that specifies the length of time to wait between each iteration of the loop. RobotData Type Definition The RobotData type definition specifies data types and values for the device references you use with the WPI Robotics Library VIs. in turn. The block diagram of the Finish VI contains a Flat Sequence structure. the Dashboard Enables input specifies to send raw data for the first analog module. This VI runs when you press the Finish button on the front panel of the Robot Main VI. the block diagram of the Periodic Tasks VI consists of two While Loops. you can wire the JoystickDevRef output of the Joystick Open VI to this type definition. the first digital module. Type Definitions The TypeDefs folder of the FRC robot project contains type definitions for specifying data types and values for device references that you use with the WPI Robotics Library VIs. and the solenoid module to the host computer. you can perform cleanup tasks such as closing device references and saving collected data to file. In the first subdiagram of this structure. The type definition LabVIEW Robotics Programming Guide for FRC 4-14 ni. By default. the Robot Main VI.com .

9. the Gyro Open VI opens a reference to a gyroscope. 11. 2. Press the <Ctrl-V> keys to paste the GyroDevRef control inside the RobotData In cluster. 6. 3.Chapter 4 Using the FRC Framework maintains the values you specified in the Open VI. the Joystick Get VI uses the persisted values of the type definition to determine the joystick for which to return button and axis information. By default. double-click the Begin. Wire the GyroDevRef output of the Gyro Open VI to the GyroDevRef input of the Bundle By Name function. JoystickDevRef. 12. Click within the blank area at the bottom of the RobotData In cluster. 7. Save the RobotData type definition. and LabVIEW writes the gyroscope device reference data to the GyroDevRef control in the RobotData type definition. 4. You also might need to extend the bottom border of the RobotData In cluster in order to see the entire GyroDevRef control. Select Window»Show Block Diagram or press the <Ctrl-E> keys to view the block diagram. the RobotData type definition contains WatchdogDevRef. © National Instruments Corporation 4-15 LabVIEW Robotics Programming Guide for FRC . In the Project Explorer window of the FRC robot project. within the Team Code folder under the RT CompactRIO Target. 8. 5. When you configure the other parameters of the Gyro Open VI and run the VI.vi item to open the Begin VI. On the block diagram of the Begin VI. 10. You might need to move the GyroDevRef control after pasting it so that it does not overlap with other controls in the cluster. On the block diagram of the Begin VI. 1. Double-click the Gyro Open VI to open the VI. You also can open this type definition from the FRC robot project. expand the Bundle By Name function wired to the Robot Data indicator so that it displays an additional element. from the shortcut menu to open the RobotData type definition. If you then wire this type definition to the JoystickDevRef input of the Joystick Get VI. Complete the following steps to add a gyroscope device reference to this type definition. Select the GyroDevRef output on the front panel of the Gyro Open VI and press the <Ctrl-C> keys to copy the gyroscope device reference. and RobotDriveDevRef device references. Click the new element of the Bundle By Name function and select GyroDevRef»All Elements from the shortcut menu. right-click the Robot Data indicator and select Open Type Def. Place a Gyro Open VI on the block diagram near the Robot Data indicator. 13.

Chapter 4 Using the FRC Framework VisionData Type Definition The VisionData type definition specifies data types and values for the device references you use with the WPI Robotics Library VIs in the Vision Processing VI. Dashboard Datatype Type Definition The Dashboard Datatype type definition specifies data corresponding to the two analog modules. you must deploy the program to the CompactRIO device. and solenoid module of the CompactRIO device. the PeriodicTaskData type definition contains WatchdogDevRef. and RobotDriveDevRef device references. LabVIEW Robotics Programming Guide for FRC 4-16 ni. PeriodicTaskData Type Definition The PeriodicTaskData type definition specifies data types and values for the device references you use with the WPI Robotics Library VIs in the Periodic Tasks VI.com . JoystickDevRef. from the Project Explorer window. You can wire elements of this cluster to the appropriate parameters of the WPI Robotics Library VIs. By default. You can wire elements of this cluster to the appropriate parameters of the WPI Robotics Library VIs. You can add additional device references to the type definition in the same way you add device references to the RobotData type definition. two digital modules. or as a stand-alone. By default. the VisionData type definition contains a CameraDevRef device reference. You can add additional device references to the type definition in the same way you add device references to the RobotData type definition. built application. Deploying the FRC Robot Project After you develop the FRC robot project you want to run. You can add or remove the controls that this type definition contains depending on the data that you want to reuse. You can deploy the program in three ways: using the Run button.

Close any subVIs of the Robot Main VI that are open on the host computer to improve performance. © National Instruments Corporation 4-17 LabVIEW Robotics Programming Guide for FRC . the VI might run slowly. you cannot perform live front panel debugging. the CompactRIO device stops and restarts the program you deployed.Chapter 4 Using the FRC Framework Deploying The Program Using The Run Button Click the Run button of the Robot Main VI to deploy the VI to the CompactRIO device. the program runs only on the CompactRIO device to which it was deployed. libraries. Building And Deploying A Stand-Alone Application Build the FRC robot project into a stand-alone application that you then can deploy to the CompactRIO device. Deploy stand-alone applications to the CompactRIO device for use in the FRC competition. Do not close the Robot Main VI. You can specify the application to run at startup so the application runs as soon as the CompactRIO is powered on. When you deploy a program with the Run button. Deploying The Program From The Project Explorer Window In the Project Explorer window. Note If a program is running on the CompactRIO device and you redeploy that program with the Run button. but you can manipulate the front panel objects of the program from the host computer. and shared variables are downloaded to memory on the CompactRIO device. all items required by the VI. When you deploy a program from the Project Explorer window. LabVIEW deploys the VI. The program runs on the CompactRIO device. Note If you click the Run button of the Robot Main VI to deploy the VI to the CompactRIO device. LabVIEW redeploys any VIs that changed or are no longer in memory on the CompactRIO device. right-click the Robot Main VI and select Deploy from the shortcut menu to deploy the VI and any support files for the VI to the target. Therefore. you maintain a connection between the host computer and the CompactRIO device. VIs. and the target settings to memory on the CompactRIO device. You therefore can deploy a program with the Run button to perform live front panel debugging.

9. 4. In the Project Explorer window. Specify the location on the CompactRIO device to which you want to save the stand-alone application in the Target destination directory field. 5. Specify a name for the application in the Target filename text box.Chapter 4 Using the FRC Framework Complete the following steps to build the FRC robot project into a stand-alone FRC application and run it on the CompactRIO device at startup. 1. LabVIEW prompts you to reboot the RT target. 11. right-click the build specification and select Build from the shortcut menu to build the application. double-click the FRC Basic Robot Deployment build specification or the FRC Robot Boot-up Deployment build specification under the Build Specifications folder to display the Real-Time Application Properties dialog box. Click the OK button to close the Real-Time Application Properties dialog box. Verify that the Basic Robot Main VI or the Robot Main VI is in the Startup VIs list. 3. Note If you no longer want the application to run on the CompactRIO device at startup. Specify the location on the host computer to which you want to save the stand-alone application in the Local destination directory field. LabVIEW Robotics Programming Guide for FRC 4-18 ni. 7. right-click the build specification and select Unset as startup from the shortcut menu. On the Information page. Right-click the build specification and select Run as startup from the shortcut menu to set the application as the startup application and deploy the application to the CompactRIO device.com . Select Source Files from the Category list. 10. 8. 6. 2. In the Project Explorer window. Reboot the CompactRIO device to run the application. specify a name for the build specification in the Build specification name text box.

4. enter the location on the host machine to which you want to save the project files and VIs. 2. Note You cannot access the front panels of VIs in memory on a CompactRIO device if a built application is running. if you only disconnect from the CompactRIO device. Complete the following steps to create an FRC dashboard project. 3. LabVIEW displays the new FRC dashboard project in the Project Explorer window. the VIs are removed from memory on the CompactRIO device. First deploy the VI to the CompactRIO device using the Run button. Right-click the RT CompactRIO Target item in the Project Explorer window and select Connect from the shortcut menu to connect to the CompactRIO device. as described in the Deploying The Program Using The Run Button section of this chapter. Click the Finish button to close the Create New FRC Dashboard Project dialog box and create the new FRC dashboard project. © National Instruments Corporation 4-19 LabVIEW Robotics Programming Guide for FRC . but the VI continues running on the CompactRIO device.Chapter 4 Using the FRC Framework Connecting to the CompactRIO Device You can connect to the CompactRIO device and access the front panels of VIs in memory on the device. If you then close the front panel and reconnect to the CompactRIO device. Click the FRC Dashboard Project link in the Getting Started window to display the Create New FRC Dashboard Project dialog box. FRC Dashboard Project Use the FRC dashboard project on the host computer to view data that the CompactRIO device returns. you re-access the front panels in memory on the device. In the Project folder path. If you stop the VI or close the front panel. In the Project name text box. enter the name you want to use to identify the new FRC dashboard project. You first must stop the running built application or cancel the Connect operation. However. This project can display images and I/O values that the CompactRIO device sends to the host computer. Right-click the RT CompactRIO Target item in the Project Explorer window and select Disconnect from the shortcut menu to disconnect from the CompactRIO device. 1. The front panel of the running VI reappears and displays the current state of the VI. the front panel on the host computer appears to stop.

FRC Dashboard Project Whereas the FRC robot project contains two targets.com . You run the VIs in the FRC dashboard project only on a host computer. the FRC dashboard project contains only the My Computer target. such as on a host computer connected to the driver station. LabVIEW Robotics Programming Guide for FRC 4-20 ni. You might not need to modify any of the subVIs in this folder. The My Computer target contains a Dashboard Main top-level VI and a Helper VIs folder. You do not deploy these VIs to the CompactRIO device. not during the FRC competition. Note You can send image data to the host computer only during development.Chapter 4 Using the FRC Framework The FRC dashboard project looks similar to the following figure: Figure 4-4. You can use this VI on the host computer to view image data that the camera connected to the CompactRIO device acquires. The Dashboard Main VI is the master VI in the FRC dashboard project. The Helper VIs folder contains subVIs that the Dashboard Main VI calls.

Error Messages—Displays error messages the CompactRIO device sends to the driver station.jpg in the project directory. such as error information. In the Project Explorer window. elapsed time in that mode. Image display might slow performance. Communications—Displays input and output values from the driver station. The elapsed time starts when the Dashboard Main VI runs and resets when the competition mode changes. Slot 4/Slot 6—Displays digital input or digital output values from the NI 9403 modules in slots 4 and 6 of the CompactRIO device. The block diagram contains two While Loops. Select Window»Show Block Diagram or press the <Ctrl-E> keys to view the block diagram of the Dashboard Main VI. • • • • • • • • • © National Instruments Corporation 4-21 LabVIEW Robotics Programming Guide for FRC . Team Logo—Displays the image saved as Team Logo. robot status.Chapter 4 Using the FRC Framework You also can use the Dashboard Main VI to read information about the robot.vi item to open the Dashboard Main VI. You can modify this image to display a logo unique to your FRC team. This module often is used to control a solenoid. Match Information—Displays the competition mode (Autonomous or TeleOp).png or Team Logo. Slot 8—Displays digital output values from the NI 9472 module in slot 8 of the CompactRIO device. and battery level. Use the Set User Data VI in the FRC robot project to specify the data you want to send from the CompactRIO device to the Dashboard Main VI. User Data—Displays user-defined data if you place a checkmark in the Log checkbox. and robot status (Enabled or Disabled). By default. Slot 1/Slot 2—Displays analog input values from the NI 9201 modules in slots 1 and 2 of the CompactRIO device. the front panel displays the following information: • Image—Displays the latest image that the camera on the CompactRIO device acquired. The Video Enable Boolean control in this section turns image display on or off. Battery Level—Displays the battery level of the robot. double-click the Dashboard Main.

You can use the WPI Robotics Library VIs and other LabVIEW VIs to modify the types of data the Dashboard Main VI displays.com . the Dashboard Main VI receives data about the robot from the driver station.Chapter 4 Using the FRC Framework In the first While Loop. continuously replaces this image with the most recent image data from the camera on the CompactRIO device. By default. the Dashboard Main VI connects to the driver station through a UDP connection and acquires status information and I/O data about the robot. and displays the image in the Image indicator on the front panel. By default. In the second While Loop. the Dashboard Main VI retrieves specific images on the host computer from the image data that the CompactRIO device sends. LabVIEW Robotics Programming Guide for FRC 4-22 ni. the Dashboard Main VI creates a JPEG image called Host Camera Image.

Click the FRC cRIO Robot Project link in the Getting Started window to display the Create New FRC Robot Project dialog box. 1. Refer to the Running the CompactRIO Imaging Tool section of Chapter 3. The IP address of the CompactRIO device must be in the form 10. where yy corresponds to the last two digits of the team number and xx corresponds to the remaining first or first two digits of the team number. for more information about configuring the CompactRIO device. enter the IP address of the CompactRIO device to which you want to deploy the project. 2. 5. and deploy a FIRST Robotics Competition (FRC) robot project to the CompactRIO device.2. Configuring the Camera and the CompactRIO Device. Click the Finish button to close the Create New FRC Robot Project dialog box and create the new FRC robot project. In the cRIO IP address text box. You can use the CompactRIO Imaging Tool to set the IP address of the CompactRIO device. 6. Creating an FRC Robot Project Complete the following steps to create an FRC robot project that uses the basic framework.Tutorial: Creating an FRC Robot Project 5 This chapter describes how to create. modify.xx. you develop a program to perform tank driving with two joysticks and Jaguar motor controllers. © National Instruments Corporation 5-1 LabVIEW Robotics Programming Guide for FRC . In this tutorial. 4. 3. In the Project folder path. Select the Basic Framework option to specify that you want to program in the basic framework. In the Project name text box.yy. enter the location on the host machine to which you want to save the project files and VIs. enter the name you want to use to identify the new FRC robot project.

If the robot has a joystick connected to port 1 of the driver station and Jaguar motor controllers controlling the two wheels.Chapter 5 Tutorial: Creating an FRC Robot Project LabVIEW displays the new FRC robot project in the Project Explorer window. 1. Using the FRC Framework.vi item and select Run from the shortcut menu. you can use the Basic Robot Main VI to arcade drive a two-wheeled robot using one joystick and Jaguar motor controllers. select View»Functions Palette. Place an Open VI from the Joystick palette on the block diagram below the existing Joystick Open VI. you can move the joysticks and observe how the robot responds. LabVIEW Robotics Programming Guide for FRC 5-2 ni. Select Window»Show Block Diagram or press the <Ctrl-E> keys to view the block diagram.com . Running the FRC Robot Project You can deploy the FRC robot project to the CompactRIO device before making any modifications. Click the increment or decrement arrows of the Case structure in the Communications While Loop to select the TeleOp Execute case. Right-click the JoystickDevice input of the Open VI you placed and select Create»Constant from the shortcut menu. Double-click the Basic Robot Main. From the JoystickDevice enum constant. Refer to Chapter 4. If the Functions palette is not visible on the block diagram. 7. for more information about the Basic Robot Main VI. 2. 4. In the Project Explorer window. The Basic Robot Main VI then runs on the CompactRIO device.vi item in the Project Explorer window to open the Basic Robot Main VI. right-click the Basic Robot Main. 5. 3. LabVIEW deploys the Basic Robot Main VI and any support files for the VI to the CompactRIO device. Complete the following steps to modify the Basic Robot Main VI to perform tank driving with two joysticks and Jaguar motor controllers. 6. select USB 2 to use the joystick connected to port 2 of the driver station. Modifying the Basic Robot Main VI By default.

Chapter 5 Tutorial: Creating an FRC Robot Project 8. Figure 5-1. The affected portion of the block diagram should appear similar to the following figure. Be sure to wire around the Case Structure. 11. Wire the input tunnel of the While Loop corresponding to the JoystickDevRef output of the second Joystick Open VI to the right border of the While Loop to create an output tunnel. Basic Robot Main VI with Additional Joystick Open VI 9. Wire the JoystickDevRef output of the second Joystick Open VI to the left border of the Communications While Loop to create an input tunnel. Set the Axis enum constant of the first Joystick GetAxis VI to Axis 2. Place a Close VI from the Joystick palette on the block diagram above the existing Joystick Close VI. Wire the output tunnel you created to the JoystickDevRef input of the second Joystick Close VI. 12. 10. © National Instruments Corporation 5-3 LabVIEW Robotics Programming Guide for FRC . Delete the wire connecting the first Joystick Open VI to the JoystickDevRef input of the second Joystick GetAxis VI. 13. You may need to move the existing VIs to make space for the new Joystick Close VI. Wire the JoystickDevRef output of the second Joystick Open VI to the JoystickDevRef input of the second Joystick GetAxis VI. 14.

this VI cannot communicate with the joysticks or the motor controllers from the host computer.com .vi from the shortcut menu to perform tank driving using the TankDrive VI. The affected portions of the block diagram should appear similar to the following figure. Modifying the Basic Robot Main VI for Tank Driving The Basic Robot Main VI now allows you to perform tank driving. You must deploy the FRC robot project that contains the Basic Robot Main VI to the CompactRIO device.Chapter 5 Tutorial: Creating an FRC Robot Project 15. However. Figure 5-2. You then can run the Basic Robot Main VI on the CompactRIO device and communicate with the joysticks and motor controllers connected to the device. LabVIEW Robotics Programming Guide for FRC 5-4 ni. Right-click the ArcadeDrive VI and select Replace»RobotDrive Palette»TankDrive.

LabVIEW deploys the VI. 1. Use Build Specifications in the Project Explorer window to create build specifications for source distributions. such as stand-alone applications. all items required by the VI. LabVIEW redeploys any VIs that changed or are no longer in memory on the CompactRIO device. directories to create. You can specify the application to run at startup so the application runs as soon as the CompactRIO is powered on. 3. © National Instruments Corporation 5-5 LabVIEW Robotics Programming Guide for FRC . By maintaining a connection with the host computer. Click the Abort button of the Basic Robot Main VI. and settings for VIs. Click the Run button of the Basic Robot Main VI to deploy the VI to the CompactRIO device. the CompactRIO device stops and restarts the Robot Main VI. You must deploy stand-alone applications to the CompactRIO device for use in the FRC competition. such as files to include. A build specification contains all the settings for the build. In the Project Explorer window. Using the FRC Framework. but you can manipulate the front panel objects of the program from the host computer. you can monitor indicators and observe how changes to the front panel of VIs affect the behavior of the robot. 2. Move the joysticks and observe how the robot responds. for more information about deploying an FRC Robot Project. 4. Creating a Stand-Alone FRC Application You can build the FRC robot project into a stand-alone application that you then can deploy to the CompactRIO device. Complete the following steps to run the FRC robot project and perform live front panel debugging. Notice that the VI stops. double-click the Basic Robot Main. When you deploy a program with the Run button.vi item to open the Basic Robot Main VI.Chapter 5 Tutorial: Creating an FRC Robot Project Running the FRC Robot Project You can run the FRC robot project on the CompactRIO device and maintain a connection with the host computer to perform live front panel programming and debugging. Note If you redeploy the Robot Main VI with the Run button. and the target settings to memory on the CompactRIO device. Refer to the Deploying the FRC Robot Project section of Chapter 4. the program runs on the CompactRIO device.

and target destination for a stand-alone real-time application. 4. double-click the FRC Basic Robot Deployment build specification under Build Specifications to display the Real-Time Application Properties dialog box. right-click the FRC Basic Robot Deployment build specification under Build Specifications and select Build from the shortcut menu to build the application. LabVIEW prompts you to reboot the real-time target. LabVIEW Robotics Programming Guide for FRC 5-6 ni. In the Project Explorer window. right-click the build specification and select Unset as startup from the shortcut menu. Move the two joysticks and observe how the motors of the robot respond.com . 2. 3. On the Information page. notice that the Build specification name is FRC Basic Robot Deployment. Right-click the build specification and select Run as startup from the shortcut menu to set the application as the startup application and deploy the application to the CompactRIO device. Use the Real-Time Application Properties dialog box to define and modify the settings for a build specification. local destination. Use the Information page of the Real-Time Application Properties dialog box to specify a name. You also can compose a description of the build specification. In the Project Explorer window. On the Source files page. notice that the Basic Robot Main VI is configured by default to run when the application launches. When you verify the build specification settings.Chapter 5 Tutorial: Creating an FRC Robot Project The default FRC robot project includes the FRC Basic Robot Deployment build specification. You might need to change this path to an appropriate location on the host computer to which you want to save the application. Note If you no longer want the application to run on the CompactRIO device at startup. executable filename. Reboot the CompactRIO device to run the application. Use the Source Files page of the Real-Time Application Properties dialog box to specify which VIs automatically run when the application launches and which VIs always are deployed to the CompactRIO device. complete the following steps to build the FRC robot project into a stand-alone FRC application and run it on the CompactRIO device at startup. 1. Notice also the Local destination directory path.

This VI also displays user-defined data. you learn how to display gyroscope information from the robot in the User Data section of the Dashboard Main VI. and the driver station. acquires information from a gyroscope. and then modify the Dashboard Main VI to display this data. Refer to the FRC Dashboard Project section of Chapter 4. such as error information. for more information about the Dashboard Main VI. You can modify the Gyro Example VI to send the gyroscope information to the Dashboard Main VI. The Dashboard Main VI in the FRC dashboard project displays information about the robot. the Dashboard Main VI does not display gyroscope data. You can use the Dashboard Main VI during robot testing to receive live feedback from the robot. © National Instruments Corporation 6-1 LabVIEW Robotics Programming Guide for FRC . Using the FRC Framework. You must acquire this data from a gyroscope.Tutorial: Creating an FRC Dashboard Project 6 This chapter describes how to send data to the Dashboard Main VI and how to modify the FIRST Robotics Competition (FRC) dashboard project. Displaying Gyroscope Data in the Dashboard Main VI By default. and battery level. Sending Gyroscope Data to the Dashboard Main VI The Gyro Example VI. robot status. In this tutorial. The User Data section of the Dashboard Main VI displays user-defined messages and information. the robot. send the data to the Dashboard Main VI. The Dashboard Main VI displays the current input and output values from the CompactRIO device. accessible by clicking the Gyro Example link in the Getting Started window.

14. 2. Wire the x-y*floor(x/y) output of the Quotient & Remainder function to the number input of the Number To Exponential String function.vi item in the Project Explorer window to open the Gyro Example VI. 8. The x-y*floor(x/y) output corresponds to the gyroscope angle. This VI specifies the user data that the Dashboard Main VI receives. Do not save any changes. Note You might need to resize the While Loop and clear some space below the Quotient & Remainder function on the block diagram of the Gyro Example VI before completing the following steps. 11. 3. Open the Modified Gyro Example project you saved to display the Modified Gyro Example FRC robot project in the Project Explorer window. 10. 12. Select Copy and click the Continue button to create a copy of the .lvproj file on disk. Place a String To Byte Array function to the right of the Number To Exponential String function. LabVIEW Robotics Programming Guide for FRC 6-2 ni. Select Window»Show Block Diagram or press the <Ctrl-E> keys to display the block diagram. 9. Save the project as Modified Gyro Example. Click the Gyro Example link in the Getting Started window to display the Gyro Example FRC robot project in the Project Explorer window.lvproj in an easily accessible location. Select File»Save As to display the Save As dialog box. Place a Set User Data VI to the right of the String To Byte Array function. 13. 4. Close the Project Explorer window for the Gyro Example FRC robot project.Chapter 6 Tutorial: Creating an FRC Dashboard Project Complete the following steps to modify the Gyro Example VI to send data to the Dashboard Main VI. Place a Number To Exponential String function below the Quotient & Remainder function. 6. 5. This VI displays the current angle of the gyroscope you specify. Double-click the Gyro Example.com . 7. Wire the E-format string output of the Number To Exponential String function to the string input of the String To Byte Array function. 1. Wire the unsigned byte array output of the String To Byte Array function to the User Data (984 bytes) input of the Set User Data VI.

Sending Gyroscope Data to the Dashboard Main VI 15. Enter FRC Dashboard Project User Data Example in the Project name text box of the Create New FRC Dashboard Project dialog box. 1. 3. Double-click the Dashboard Main.vi item in the Project Explorer window to open the Dashboard Main VI. 2.vi in an easily accessible location. floating-point data type.Chapter 6 Tutorial: Creating an FRC Dashboard Project The affected portion of the block diagram should appear similar to the following figure. The Set User Data VI then sends this data to the Dashboard Main VI. Click the Finish button in the Create New FRC Dashboard Project dialog box to create a new FRC dashboard project. Select File»Save As and save the VI as User Data Gyro Example. Figure 6-1. Complete the following steps to display the gyroscope data in the Dashboard Main VI. which the Set User Data VI can accept. The modified VI converts this data to an array of bytes. Click the FRC Dashboard Project link in the Getting Started window to display the Create New FRC Dashboard Project dialog box. Select View»Getting Started Window to display the Getting Started window. 5. 4. Adding an Indicator to the Dashboard Main VI The Gyro Example VI now sends the gyroscope data to the Dashboard Main VI. The default Gyro Example VI returns the gyroscope angle as a double-precision. © National Instruments Corporation 6-3 LabVIEW Robotics Programming Guide for FRC . This section describes how to set up the Dashboard Main VI to receive and display the user data.

Figure 6-2.Chapter 6 Tutorial: Creating an FRC Dashboard Project 6. The Gyroscope Angle indicator now displays the heading of the gyroscope within a range of 360 degrees. 9. enter Gyroscope Angle in the Label Text text box to change the name of the indicator. 7. The affected portion of the front panel should appear similar to the following figure. On the Scale page. enter 360 as the Maximum value in the Scale Range section. On the Appearance page. Right-click the Gauge indicator and select Properties from the shortcut menu to display the Knob Properties dialog box. 8. When you drag a marker. Place a Gauge indicator on the front panel below the User Data section of the front panel. Right-click the Gyroscope Angle indicator and select Visible Items» Digital Display from the shortcut menu to add a digital display to the Gyroscope Angle indicator. 12. 11. Hover over the 360 marker on the Gyroscope Angle indicator and use the Operating tool to drag the marker to the 0 value. Displaying Gyroscope Data with a Gauge Indicator LabVIEW Robotics Programming Guide for FRC 6-4 ni. 10. Click the OK button to apply the new value. the cursor changes to a circular arrow to indicate the tool is over a marker.com .

18. Figure 6-3. 19. The User Data Dashboard Main VI now receives the gyroscope data from the User Data Gyro Example VI and displays the data in the Gyroscope Angle indicator on the front panel. The affected portion of the block diagram should appear similar to the following figure. Double-click the Gyroscope Angle indicator to display the location of the Gyroscope Angle indicator on the block diagram. © National Instruments Corporation 6-5 LabVIEW Robotics Programming Guide for FRC . Place the Gyroscope Angle indicator in the second While Loop of the block diagram to the right of the Battery level indicator. 14. 15.vi in an easily accessible location. 20. The Receive DS Packet VI receives the gyroscope data that the Gyro Example VI sends.Chapter 6 Tutorial: Creating an FRC Dashboard Project 13. Wire the User Data output of the Unbundle function to the string input of the Fract/Exp String To Number function. 16. Displaying Gyroscope Data in the Dashboard Main VI. Place an Unbundle function between the Battery level indicator and the Gyroscope Angle indicator. Wire the number output of the Fract/Exp String To Number function to the Gyroscope Angle indicator. 17. Select File»Save As and save the VI as User Data Dashboard Main. Place a Fract/Exp String To Number function between the Unbundle function and the Gyroscope Angle indicator. Wire the Strings output of the Receive DS Packet VI to the cluster input of the Unbundle function. Note You might need to resize the While Loop and clear some space to the right of the Battery level indicator on the block diagram of the Dashboard Main VI before completing the following steps.

1. This VI now reflects the changes in the angle of the gyroscope. Switch to the User Data Gyro Example VI. for more information about configuring the IP address of the host computer. Configuring the Camera and the CompactRIO Device. Refer to the Configuring the CompactRIO Device section of Chapter 3. Refer to the FRC Dashboard Project section of Chapter 4. Verify that you configured the IP address of the CompactRIO device correctly. Switch to the User Data Dashboard Main VI. 2. for more information about the FRC dashboard project. 5. 7. Click the Run button to deploy the User Data Gyro Example VI to the CompactRIO device. for more information about configuring the IP address of the CompactRIO device. Click the Run button to run the User Data Dashboard Main VI on the host computer. Configuring the Camera and the CompactRIO Device. The User Data Gyro Example VI runs on the CompactRIO device and sends gyroscope data to the Dashboard Main VI. Refer to the Setting the Static IP Address of the Computer section of Chapter 3. 6.Chapter 6 Tutorial: Creating an FRC Dashboard Project Running the Dashboard Main VI Complete the following steps to run the User Data Gyro Example and User Data Dashboard Main VIs. Using the FRC Framework. Verify that you configured the IP address of the host computer correctly. 3. LabVIEW Robotics Programming Guide for FRC 6-6 ni.com . This tutorial demonstrated how to send gyroscope data to the Dashboard Main VI. Use the techniques in this tutorial to display any user data in the Dashboard Main VI. Stop and close all VIs and projects. 4.

In that tutorial.Chapter 6 Tutorial: Creating an FRC Dashboard Project Displaying Multiple Data Values in the Dashboard Main VI In the Adding an Indicator to the Dashboard Main VI section of this chapter. you learn how to display multiple values in the Dashboard Main VI using a custom control. from the Control Type pull-down menu on the toolbar. Select File»New to display the New window. you learned how to display gyroscope data in the Dashboard Main VI. A custom control extends the available set of front panel objects for use in another VI. Select Other Files»Custom Control from the Create New list and click the OK button to create a custom control. 2. Select Strict Type Def. cosmetic changes you make to a strict type definition affect all instances of the strict type definition. Add a numeric control and a string control to the cluster. The custom control should appear similar to the following figure. In this section. 1. Creating a Custom Control You can use a custom control to convert multiple data values that the Gyro Example VI sends to the Dashboard Main VI into a data type the Dashboard Main VI can accept. 4.ctl in an easily accessible location. Figure 6-4. you displayed only one value in the Dashboard Main VI. Specifying the control type as Strict Type Def. Place a cluster shell on the front panel. Save this control as myTypeDef. Also. 5. Strict Type Definition with Two Data Values 6. creates a custom control that reflects any data type changes you make to the custom control in all instances of every VI that uses the control. 3. Complete the following steps to create a custom control. © National Instruments Corporation 6-7 LabVIEW Robotics Programming Guide for FRC .

Double-click the Gyro Example. 12. This VI displays the current angle of the gyroscope you specify. Select Window»Show Block Diagram or press the <Ctrl-E> keys to display the block diagram. Place a Bundle By Name function below the Angle indicator on the block diagram of the Gyro Example VI. Do not save any changes. Place the myTypeDef control below the Quotient & Remainder function. Open the Multiple Data Gyro Example project you saved to display the Multiple Data Gyro Example FRC robot project in the Project Explorer window. Click the Gyro Example link in the Getting Started window to display the Gyro Example FRC robot project in the Project Explorer window. 2. Select Select a VI on the Functions palette. 13. 8. 9.Chapter 6 Tutorial: Creating an FRC Dashboard Project Sending Multiple Data Values to the Dashboard Main VI The Gyro Example VI.vi item in the Project Explorer window to open the Gyro Example VI. Resize the Bundle By Name function to display two elements. accessible by clicking the Gyro Example link in the Getting Started window. acquires information from a gyroscope. Select File»Save As to display the Save As dialog box.lvproj in an easily accessible location. Note You might need to resize the While Loop and clear some space below the Quotient & Remainder function on the block diagram of the Multiple Data Gyro Example VI before completing the following steps.com . Select View»Getting Started Window to display the Getting Started window. 6. 7. 10. 5. 11. Save the project as Multiple Data Gyro Example. Close the Project Explorer window for the Gyro Example FRC robot project. 4. You can modify the Gyro Example VI to send this information to the Dashboard Main VI. Complete the following steps to modify the Gyro Example VI to send multiple data values to the Dashboard Main VI. 3. LabVIEW Robotics Programming Guide for FRC 6-8 ni.lvproj file on disk. 1. Navigate to the myTypeDef control you created and click the OK button. Select Copy and click the Continue button to create a copy of the .

Place a string constant to the left of the Bundle By Name function and enter Example. 17. Place a Flatten To String function to the right of the Bundle By Name function. Wire the data string output of the Flatten To String function to the string input of the String To Byte Array function. 14. 22. Place a String To Byte Array function to the right of the Flatten To String function. Click the second Numeric element of the Bundle By Name function and select String from the shortcut menu. Wire the string constant to the String input of the Bundle By Name function. Bundling Elements for the myTypeDef Strict Type Definition 16. 15. Wire the x-y*floor(x/y) output of the Quotient & Remainder function to the Numeric element of the Bundle By Name function. 18. 19. Wire the myTypeDef control to the input cluster input of the Bundle By Name function. © National Instruments Corporation 6-9 LabVIEW Robotics Programming Guide for FRC . You now can send both the gyroscope angle and this string to the Dashboard Main VI. The affected portion of the block diagram should appear similar to the following figure. Wire the output cluster output of the Bundle By Name function to the anything input of the Flatten To String function. 20.Chapter 6 Tutorial: Creating an FRC Dashboard Project Note You also can place the myTypeDef control on the block diagram by dragging the control icon from the upper right corner of the Control Editor window to the block diagram of the Multiple Data Gyro Example VI. 21. Figure 6-5.

Sending Multiple Data Values to the Dashboard Main VI 25. Select File»Save As and save the VI as Multiple Data Gyro Example.Chapter 6 Tutorial: Creating an FRC Dashboard Project 23.vi in an easily accessible location. The default Gyro Example VI returns the gyroscope angle as a double-precision. 2. The affected portion of the block diagram should appear similar to the following figure. Wire the unsigned byte array output of the String To Byte Array function to the User Data (984 bytes) input of the Set User Data VI. Click the FRC Dashboard Project link in the Getting Started window to display the Create New FRC Dashboard Project dialog box. Place a Set User Data VI to the right of the String To Byte Array function. 24. Select View»Getting Started Window to display the Getting Started window. which the Set User Data VI can accept.com . Adding Indicators to the Dashboard Main VI The Multiple Data Gyro Example VI now sends the gyroscope data to the Dashboard Main VI. Complete the following steps to display multiple data values from the Multiple Data Gyro Example VI in the Dashboard Main VI. The Set User Data VI then sends these multiple data values to the Dashboard Main VI. floating-point data type and does not return any string data. LabVIEW Robotics Programming Guide for FRC 6-10 ni. This VI specifies the user data that the Dashboard Main VI receives. 1. The modified VI converts the gyroscope angle and string data to an array of bytes. This section describes how to set up the Dashboard Main VI to receive and display the user data. Figure 6-6.

6. The Gyroscope Angle indicator now displays the heading of the gyroscope within a range of 360 degrees. Enter FRC Dashboard Project Multiple Data Example in the Project name text box of the Create New FRC Dashboard Project dialog box. Place the Gyroscope Angle and String indicators in the second While Loop of the block diagram to the right of the Battery level indicator. 11.vi item in the Project Explorer window to open the Dashboard Main VI. enter 360 as the Maximum value in the Scale Range section. 15. 9. Note You might need to expand the second While Loop and clear some space to the right of the Battery level indicator on the block diagram of the Dashboard Main VI before completing the following steps. enter Gyroscope Angle in the Label Text text box to change the name of the indicator. 7. 8. the cursor changes to a circular arrow to indicate the tool is over a marker. Right-click the Gauge indicator and select Properties from the shortcut menu to display the Knob Properties dialog box. Right-click the Gyroscope Angle indicator and select Visible Items»Digital Display from the shortcut menu to add a digital display to the Gauge indicator. 5. On the Appearance page. 4. When you drag a marker. 10. 16. 12. Hover over the 360 marker on the Gyroscope Angle indicator and use the Operating tool to drag the marker to the 0 value. Click the OK button to apply the new value. 17. Place an Unbundle function between the Battery level indicator and the Gyroscope Angle and String indicators. Click the Finish button in the Create New FRC Dashboard Project dialog box to create a new FRC dashboard project. Place a String indicator above the Gyroscope Angle indicator. On the Scale page. Wire the Strings output of the Receive DS Packet VI to the cluster input of the Unbundle function.Chapter 6 Tutorial: Creating an FRC Dashboard Project 3. © National Instruments Corporation 6-11 LabVIEW Robotics Programming Guide for FRC . Place a Gauge indicator on the front panel below the User Data section of the front panel. 13. Select Window»Show Block Diagram or press the <Ctrl-E> keys to display the block diagram. Double-click the Dashboard Main. 14.

27. Click the second Numeric element of the Unbundle By Name function and select String from the shortcut menu. Place the myTypeDef above the Unbundle function. Wire the User Data output of the Unbundle function to the binary string input of the Unflatten From String function. 21.Chapter 6 Tutorial: Creating an FRC Dashboard Project 18.com . Wire the myTypeDef constant to the type input of the Unflatten From String function. 19. The affected portion of the block diagram should appear similar to the following figure. Select File»Save As and save the VI as Multiple Data Dashboard Main. Navigate to the myTypeDef control you created and click the OK button. Wire the value output of the Unflatten From String function to the input cluster input of the Unbundle By Name function. 26. 24. Displaying Multiple Data Values in the Dashboard Main VI 28. 20. 22. Resize the Unbundle By Name function to display two elements. 25. Wire the String element of the Unbundle By Name function to the String indicator.vi in an easily accessible location. Select Select a VI on the Functions palette. The Multiple Data Dashboard Main VI now receives the gyroscope angle and string data from the Multiple Data Gyro Example VI and displays the data in the User Data section of the front panel. LabVIEW Robotics Programming Guide for FRC 6-12 ni. Wire the Numeric element of the Unbundle By Name function to the Gyroscope Angle indicator. Place an Unflatten From String function between the Unbundle function and the Gyroscope Angle and String indicators. Figure 6-7. 23. Place an Unbundle By Name function between the Unflatten From String function and the Gyroscope Angle and String indicators.

Click the Run button to deploy the Multiple Data Gyro Example VI to the CompactRIO device. Switch to the Multiple Data Dashboard Main VI. Switch to the Multiple Data Gyro Example VI. 2. This tutorial demonstrated how to send multiple data values to the Dashboard Main VI. This VI now reflects the changes in the angle of the gyroscope and shows the Example string value. Stop and close all VIs and projects. 6. Refer to the Configuring the CompactRIO Device section of Chapter 3. for more information about the FRC dashboard project. 4. Verify that you configured the IP address of the CompactRIO device correctly. Use the techniques in this tutorial to display any user data in the Dashboard Main VI. Verify that you configured the IP address of the host computer correctly. 1. Using the FRC Framework. 3. for more information about configuring the IP address of the host computer. 5. © National Instruments Corporation 6-13 LabVIEW Robotics Programming Guide for FRC . The Multiple Data Gyro Example VI runs on the CompactRIO device and sends both the angle and string data to the Dashboard Main VI. Refer to the FRC Dashboard Project section of Chapter 4. for more information about configuring the IP address of the CompactRIO device.Chapter 6 Tutorial: Creating an FRC Dashboard Project Running the Dashboard Main VI Complete the following steps to run the Multiple Data Gyro Example and Multiple Data Dashboard Main VIs. Configuring the Camera and the CompactRIO Device. 7. Configuring the Camera and the CompactRIO Device. Refer to the Setting the Static IP Address of the Computer section of Chapter 3. Click the Run button to run the Multiple Data Dashboard Main VI on the host computer.

Troubleshooting the FRC Robot 7 In previous chapters. at times. © National Instruments Corporation 7-1 LabVIEW Robotics Programming Guide for FRC . and the WPI Robotics Library VIs. However. Table 7-1 describes common issues you might encounter when working with the robot and solutions to address those issues. the robot might not work as you expect. you learned how to program a robot using the CompactRIO device. the FIRST Robotics Competition framework.

use the Start Communication VI to set up communications between the driver station and the CompactRIO. Ensure that the user watchdog is enabled and that you configured the Watchdog VIs to feed the user watchdog. The user watchdog is enabled by default. Otherwise. the system watchdog shuts down the motors. for more information about the DriverStation VIs. You can use the SetEnabled VI to specify whether the user watchdog is enabled. The motors on the FRC robot do not run when I attempt to run them.Chapter 7 Troubleshooting the FRC Robot Table 7-1. If you do not feed the user watchdog during the period you specify. Refer to Chapter 42. and solenoid outputs of the CompactRIO device. LabVIEW Robotics Programming Guide for FRC 7-2 ni. Configuring the Camera and the CompactRIO Device. Refer to the Running the CompactRIO Imaging Tool section of Chapter 3. if a computer has both a wireless Internet connection and a wired connection.com . Common Programming Issues Issue The CompactRIO Imaging Tool does not run on some computers with two Internet connections. for more information about the WPI Robotics Library Watchdog VIs. For example. you must specify a timeout period and ensure that the program you write feeds the watchdog regularly. the watchdog disables the PWM. relay. DriverStation VIs. Ensure that the program that you run on the CompactRIO includes this VI. Additionally. Solution Disable one of the Internet connections and run the CompactRIO Imaging Tool again. Refer to Chapter 23. If you enable the user watchdog. disable the wireless connection and run the CompactRIO Imaging Tool again. for more information about configuring the CompactRIO device. Watchdog VIs.

available by selecting Help»LabVIEW Help. the program does not run. You might need to disable the firewall for the CompactRIO Imaging Tool to run with no errors. for more information about configuring the Camera.Chapter 7 Troubleshooting the FRC Robot Table 7-1. Common Programming Issues (Continued) Issue When I try to deploy a program to the CompactRIO device. During the imaging process.yy. Ensure that the network firewall allows the computer to access the CompactRIO device with both an 0. Check the network firewall and ensure that the firewall allows the computer to access the CompactRIO device. © National Instruments Corporation 7-3 LabVIEW Robotics Programming Guide for FRC .0. If you specify a development environment different from the one in which you want to work.xx. Refer to the Running the CompactRIO Imaging Tool section of Chapter 3. Refer to Chapter 3. the CompactRIO Imaging Tool dialog box does not list any CompactRIO devices connected to the host computer. the CompactRIO Imaging Tool sets the IP address of the CompactRIO device to 0.0. Solution Launch the CompactRIO Imaging Tool dialog box and examine the Choose Development Environment section. When I try to run the CompactRIO Imaging Tool.0. Ensure that you select the development environment in which you want to work. for more information about the CompactRIO Imaging Tool.0. the program from the other development environment might run instead and prevent you from accessing the CompactRIO device. Configuring the Camera and the CompactRIO Device. then redeploy the program.0. Configuring the Camera and the CompactRIO Device.02 IP address. for more information about the FIRST Vision VIs. I cannot access the Axis camera using the FIRST Vision VIs. You might need to disable the firewall for the CompactRIO Imaging Tool to run with no errors. When I run the CompactRIO Imaging Tool. the tool stops while downloading an image to the CompactRIO device.0 IP address and an 10. Refer to the LabVIEW Help. Ensure the Axis camera is connected to the CompactRIO device using the orange Ethernet crossover cable in the FRC kit. Sometimes the FRC robot begins operation although I did not run a program.

Refer to Chapters 9 through 42 for reference information about the WPI Robotics Library VIs. If all encoder indexes are reserved already. Figure 8-1. and so on. Using Reference Clusters with the Encoder VIs First. Each palette of VIs is listed in alphabetical order.Using the WPI Robotics Library VIs 8 Use the WPI Robotics Library VIs to interface with the CompactRIO device and perform tasks such as reading and writing data to sensors and driving motors. wire the © National Instruments Corporation 8-1 LabVIEW Robotics Programming Guide for FRC . start the same encoder. use the Open VI on the Encoder palette to open a reference to an encoder. wire the EncoderDevRef output reference cluster of the Start VI to the EncoderDevRef input reference of the Stop VI to specify the same encoder as the one you want to stop. Opening a reference for an encoder reserves an available encoder index for that encoder. For example. RelayDevRef. stop the encoder. Use these reference clusters to pass information about a specific sensor or module between VIs. Reference Clusters Many of the WPI Robotics Library VIs contain input and output reference clusters. The Open VI returns an EncoderDevRef output reference cluster that identifies the encoder for which you opened the reference. you cannot open a reference for the encoder until you close an existing encoder reference. Finally. such as CompressorDevRef. the following figure illustrates how to open a reference to an encoder. Wire the EncoderDevRef output reference cluster to the EncoderDevRef input reference cluster of the Start VI to specify this encoder as the one you want to start. and then close the corresponding reference. Similarly.

for more information about the LabVIEW error cluster. which contains error information and is similar to the LabVIEW error cluster. available by navigating to the National Instruments\LabVIEW 8. contains a DevStatus cluster as well four encoder-specific controls: EncoderIndex. By using the reference cluster. Caution Do not manually specify any information in a reference cluster. the EncoderDevRef reference cluster. shown as follows. Always use a corresponding Open VI for the sensor or module to create the reference cluster that you then can wire to other VIs.5\manuals directory and opening FRC_Getting_Started. Some reference clusters also contain additional controls or indicators unique to the sensor or module to which they apply. Refer to the Getting Started with LabVIEW for the FIRST Robotics Competition manual. For example.com .pdf. All input and output reference clusters contain at least a DevStatus cluster. CounterIndex.Chapter 8 Using the WPI Robotics Library VIs EncoderDevRef output reference cluster of the Stop VI to the EncoderDevRef input reference cluster of the Close VI to close the corresponding reference. LabVIEW Robotics Programming Guide for FRC 8-2 ni. DistancePerCount. you do not have to specify the same information about the encoder for each VI. and Decoding Type. Wiring the EncoderDevRef reference cluster between VIs establishes a reference to the same encoder for each VI.

you can determine that an error originated with the Start VI. The Start VI returns an error in the DevStatus cluster of the EncoderDevRef output reference cluster and passes this information to the EncoderDevRef input reference cluster of the Stop VI. Using Reference Clusters with the Encoder VIs. EncoderIndex establishes a reference to a particular encoder. Error Handling When you use reference clusters to connect VIs. error out returns the cumulative error information for all VIs preceding and including the Close VI. Because the Stop VI receives an error. In Figure 8-1. © National Instruments Corporation 8-3 LabVIEW Robotics Programming Guide for FRC . suppose an error occurs when the Start VI runs. again through the EncoderDevRef reference cluster. the DevStatus cluster of the EncoderDevRef output reference cluster is empty. if the Open VI runs normally. You can use this error information to troubleshoot the application. EncoderDevRef Input Reference Cluster EncoderIndex specifies the index of the reserved encoder. and you can troubleshoot that error accordingly. it does not execute and passes the error information to the Close VI. However. From this error information. and the DevStatus cluster of the EncoderDevRef input reference cluster of the Start VI also is empty. you also pass error information between those VIs. Therefore.Chapter 8 Using the WPI Robotics Library VIs Figure 8-2. The Open VI therefore does not pass any errors to the Start VI. If you wire an indicator to the error out output of the Close VI.

LabVIEW Robotics Programming Guide for FRC 8-4 ni.com . You can use these clusters to merge error information from different parts of an application.Chapter 8 Using the WPI Robotics Library VIs Many of the WPI Robotics Library VIs also contain error in and error out clusters. Each WPI Robotics Library VI merges the error information it receives from the input reference cluster and the error in cluster and returns this merged information in both the output reference cluster and the error out cluster.

Use the Accelerometer VIs to determine the acceleration of a robot as measured by an accelerometer. You also can use the accelerometer as a tilt sensor to measure the acceleration of gravity. AccelerometerDevRef specifies a reference to the accelerometer you want to use.Accelerometer VIs 9 Refer to the LabVIEW Help. Close. code is an error code. DevStatus describes the error status before this VI or function runs. © National Instruments Corporation 9-1 LabVIEW Robotics Programming Guide for FRC . This accelerometer provides acceleration data in the x-axis and y-axis relative to the circuit board. code is the error or warning code. If status is TRUE. or vibration. If status is FALSE. for the latest information about the Accelerometer VIs. The default is no error. available by selecting Help»Search the LabVIEW Help. Use this VI to close each accelerometer reference that you open with the Open VI. The default is 0.vi Closes the reference to the accelerometer you specify. The accelerometer that the FIRST Robotics Competition (FRC) kit provides is a two-axis accelerometer. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Open VI to create an AccelerometerDevRef reference cluster that you then can wire to the other Accelerometer VIs. or gravity. code is 0 or a warning code. and static acceleration. Accelerometers measure both dynamic acceleration. The default is FALSE.

source specifies the origin of the error or warning and is. The default value is 1. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Analog Module can specify a value of Slot 1 or Slot 2. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. Gain (VoltsPerG) sets the amount of volts per gravity of acceleration. The default is 0. If Analog Channel is Invalid. code is 0 or a warning code. Otherwise. the node passes the error in (no error) value to error out. the name of the node that produced the error or warning. If an error occurred before this node runs. Analog Channel can specify a value between AI 1 and AI 8. it runs normally and sets its own error status in error out. Scaling sets the sensitivity of the accelerometer that you specify. error in (no error) describes error conditions that occur before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.com . If error in indicates that an error occurred before this VI or function ran. error out contains the same error information. the name of the node that produced the error or warning. If status is TRUE. The default is FALSE. The default is an empty string. error out contains error information. this VI returns an error. code is the error or warning code. code is an error code. Center Voltage sets the offset portion of the scaling to gravities. Analog Channel specifies the channel of the Analog Module you want to use. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is no error. Right-click the error out front panel indicator and select LabVIEW Robotics Programming Guide for FRC 9-2 ni.5. it describes the error status that this VI or function produces. If status is FALSE. in most cases. This node runs normally only if no error occurred before this node runs. The default value is 2.Chapter 9 Accelerometer VIs source specifies the origin of the error or warning and is. If an error occurs while this node runs. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. The default is an empty string.

code is an error code. in most cases. code is 0 or a warning code. this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If status is FALSE. Analog Module can specify a value of Slot 1 or Slot 2. code is 0 or a warning code. code is an error code. source specifies the origin of the error or warning and is. The default is an empty string. GetAcceleration. the name of the node that produced the error or warning. The default is FALSE. code is the error or warning code. The default is 0. Analog Channel can specify a value between AI 1 and AI 8. source specifies the origin of the error or warning and is. If Analog Channel is Invalid.Chapter 9 Accelerometer VIs Explain Error from the shortcut menu for more information about the error.vi Returns the current acceleration of the sensor that you specify. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. DevStatus describes the error status before this VI or function runs. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. AccelerometerDevRef specifies a reference to the accelerometer you want to use. © National Instruments Corporation 9-3 LabVIEW Robotics Programming Guide for FRC . code is the error or warning code. the name of the node that produced the error or warning. If status is FALSE. in most cases. Analog Channel specifies the channel of the Analog Module you want to use.

the name of the node that produced the error or warning.Chapter 9 Accelerometer VIs Scaling sets the sensitivity of the accelerometer that you specify. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out. AccelerometerDevRef returns a reference to the accelerometer. If an error occurs while this node runs. code is an error code. Gain (VoltsPerG) sets the amount of volts per gravity of acceleration. LabVIEW Robotics Programming Guide for FRC 9-4 ni. it runs normally and sets its own error status in error out.5. code is 0 or a warning code. code is the error or warning code. Center Voltage sets the offset portion of the scaling to gravities. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. The default value is 1. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is FALSE.com . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. in most cases. code is 0 or a warning code. in most cases. The default is an empty string. If status is TRUE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is FALSE. code is an error code. DevStatus describes the error status that this VI or function produces. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurred before this node runs. The default is FALSE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. The default is 0. The default value is 2. source specifies the origin of the error or warning and is. This node runs normally only if no error occurred before this node runs.

error out contains error information. code is the error or warning code. Analog Module can return a value of Slot 1 or Slot 2. Center Voltage returns the offset portion of the scaling to gravities. in most cases. the name of the node that produced the error or warning. code is an error code. Analog Channel can return a value between AI 1 and AI 8. Analog Channel returns the channel of the Analog Module you want to use.Chapter 9 Accelerometer VIs Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Scaling returns the sensitivity of the accelerometer. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Otherwise. it describes the error status that this VI or function produces. and this VI returns an error. If Analog Channel returns a value of Invalid. the VI did not find the analog channel you specified. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran. If status is FALSE. Gain (VoltsPerG) returns the amount of volts per gravity of acceleration. If status is TRUE. Acceleration returns the acceleration in floating point units of gravities. © National Instruments Corporation 9-5 LabVIEW Robotics Programming Guide for FRC .

code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 9-6 ni. it runs normally and sets its own error status in error out. Analog Module (Slot 1) specifies the slot number on the CompactRIO device of the analog module you want to use. Center Voltage sets the offset portion of the scaling to gravities. Gain (VoltsPerG) sets the amount of volts per gravity of acceleration.5. If status is FALSE.com . This node runs normally only if no error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is Slot 1. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. You must open a reference before using any other VIs on this palette. If an error occurs while this node runs. error in (no error) describes error conditions that occur before this node runs. code is an error code. Select a value between AI 1 and AI 8. this VI returns an error. The default is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default value is 1. The default value is 2. the node passes the error in (no error) value to error out. If Analog Channel is Invalid.vi Opens a reference to the accelerometer you specify. Scaling sets the sensitivity of the accelerometer that you specify. Analog Channel specifies the channel of the Analog Module you want to use. If an error occurred before this node runs. The default is AI 1.Chapter 9 Accelerometer VIs Open. If status is TRUE. Select Slot 1 or Slot 2. The default is 0. The default is no error. code is 0 or a warning code.

Otherwise. and this VI returns an error. it describes the error status that this VI or function produces. Center Voltage returns the offset portion of the scaling to gravities. If Analog Channel returns a value of Invalid. AccelerometerDevRef returns a reference to the accelerometer. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Gain (VoltsPerG) returns the amount of volts per gravity of acceleration. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. in most cases. the VI did not find the analog channel you specified. Scaling returns the sensitivity of the accelerometer. Analog Module can return a value of Slot 1 or Slot 2. error out contains error information. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Analog Channel returns the channel of the Analog Module you want to use. Analog Channel can return a value between AI 1 and AI 8. DevStatus describes the error status that this VI or function produces. © National Instruments Corporation 9-7 LabVIEW Robotics Programming Guide for FRC .Chapter 9 Accelerometer VIs source specifies the origin of the error or warning and is. code is the error or warning code. error out contains the same error information. the name of the node that produced the error or warning. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. code is 0 or a warning code. If status is FALSE. in most cases. If error in indicates that an error occurred before this VI or function ran.

DevStatus describes the error status before this VI or function runs.Chapter 9 Accelerometer VIs code is the error or warning code.com . If status is TRUE. the name of the node that produced the error or warning. Analog Channel can specify a value between AI 1 and AI 8. Gain (VoltsPerG) sets the amount of volts per gravity of acceleration. in most cases. If status is TRUE. code is an error code. Scaling sets the sensitivity of the accelerometer that you specify. The default is an empty string. If status is FALSE. SetCenterVoltage. The default is FALSE. code is the error or warning code. The default value is 1. LabVIEW Robotics Programming Guide for FRC 9-8 ni.vi Sets the offset portion of the scaling to gravities of acceleration. the name of the node that produced the error or warning. The default is no error. code is 0 or a warning code. in most cases. AccelerometerDevRef specifies a reference to the accelerometer you want to use. If status is FALSE. source specifies the origin of the error or warning and is. code is 0 or a warning code. Analog Channel specifies the channel of the Analog Module you want to use. If Analog Channel is Invalid. The default is 0. source specifies the origin of the error or warning and is. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. code is an error code. Analog Module can specify a value of Slot 1 or Slot 2. this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning. code is an error code. © National Instruments Corporation 9-9 LabVIEW Robotics Programming Guide for FRC . If an error occurred before this node runs. source specifies the origin of the error or warning and is. Center Voltage sets the offset portion of the scaling to gravities. the name of the node that produced the error or warning. in most cases. If status is FALSE. error in (no error) describes error conditions that occur before this node runs. This node runs normally only if no error occurred before this node runs. code is 0 or a warning code. If status is FALSE. source specifies the origin of the error or warning and is. If an error occurs while this node runs. The default is no error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE. The default is an empty string. the node passes the error in (no error) value to error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.5. If status is TRUE. code is an error code. AccelerometerDevRef returns a reference to the accelerometer. The default value is 2. DevStatus describes the error status that this VI or function produces. The default is 0. code is 0 or a warning code. it runs normally and sets its own error status in error out.Chapter 9 Accelerometer VIs Center Voltage sets the offset portion of the scaling to gravities. code is the error or warning code. If status is TRUE. This parameter overwrites the value in the Center Voltage subparameter of the AccelerometerDevRef input. code is the error or warning code. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

Otherwise. This VI specifies one of the parameters used by the GetAngle VI to calculate and report the heading of the robot. the VI did not find the analog channel you specified. Center Voltage returns the offset portion of the scaling to gravities. Scaling returns the sensitivity of the accelerometer. Analog Module can return a value of Slot 1 or Slot 2. in most cases. it describes the error status that this VI or function produces.vi Specifies the voltage used per degree of rotation per second. If status is FALSE. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Analog Channel returns the channel of the Analog Module you want to use. Analog Channel can return a value between AI 1 and AI 8. error out contains error information. Gain (VoltsPerG) returns the amount of volts per gravity of acceleration. code is 0 or a warning code. code is an error code. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 9-10 ni. and this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains the same error information. SetGain. If Analog Channel returns a value of Invalid. If error in indicates that an error occurred before this VI or function ran.Chapter 9 Accelerometer VIs Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. the name of the node that produced the error or warning.com . If status is TRUE.

The default value is 1. the name of the node that produced the error or warning. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurs while this node runs. The default is no error. If an error occurred before this node runs. The default is an empty string. The default is 0. Analog Channel can specify a value between AI 1 and AI 8. The default value is 2. in most cases. code is the error or warning code. this VI returns an error. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. This parameter is used by the VI to calculate and report the heading of the robot. Use exception control to treat what is normally an error as no error or to treat a warning as an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. source specifies the origin of the error or warning and is. If Analog Channel is Invalid. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. error in (no error) describes error conditions that occur before this node runs. it runs normally and sets its own error status in error out. Gain (VoltsPerDegree/Second) specifies the voltage per degree of rotation per second.Chapter 9 Accelerometer VIs AccelerometerDevRef specifies a reference to the accelerometer you want to use. The default is no error. Analog Channel specifies the channel of the Analog Module you want to use.5. © National Instruments Corporation 9-11 LabVIEW Robotics Programming Guide for FRC . Gain (VoltsPerG) sets the amount of volts per gravity of acceleration. The default is FALSE. Center Voltage sets the offset portion of the scaling to gravities. code is an error code. Scaling sets the sensitivity of the accelerometer that you specify. DevStatus describes the error status before this VI or function runs. code is 0 or a warning code. This node runs normally only if no error occurred before this node runs. Analog Module can specify a value of Slot 1 or Slot 2. the node passes the error in (no error) value to error out.

the VI did not find the analog channel you specified. The default is 0. The default is FALSE. The default is an empty string. code is 0 or a warning code. the name of the node that produced the error or warning. code is an error code. in most cases. code is the error or warning code. Analog Module can return a value of Slot 1 or Slot 2. If status is TRUE. Center Voltage returns the offset portion of the scaling to gravities. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. code is the error or warning code. AccelerometerDevRef returns a reference to the accelerometer.Chapter 9 Accelerometer VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Analog Channel can return a value between AI 1 and AI 8. code is 0 or a warning code. and this VI returns an error. If Analog Channel returns a value of Invalid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. Scaling returns the sensitivity of the accelerometer. If status is TRUE. code is an error code. LabVIEW Robotics Programming Guide for FRC 9-12 ni. the name of the node that produced the error or warning. Gain (VoltsPerG) returns the amount of volts per gravity of acceleration. DevStatus describes the error status that this VI or function produces. in most cases. If status is FALSE. source specifies the origin of the error or warning and is. Analog Channel returns the channel of the Analog Module you want to use.com . If status is FALSE.

Chapter 9 Accelerometer VIs error out contains error information. If status is TRUE. If status is FALSE. Otherwise. error out contains the same error information. source specifies the origin of the error or warning and is. code is the error or warning code. in most cases. code is an error code. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 9-13 LabVIEW Robotics Programming Guide for FRC . If error in indicates that an error occurred before this VI or function ran. code is 0 or a warning code. it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

vi Returns the center value and initial value of the accumulator on the FPGA on the CompactRIO device. One common use of accumulators is to perform averaging on signals. such as gyros and accelerometers. DevStatus describes the error status before this VI or function runs. The default is no error. The FPGA subtracts the center value from the value of each element before adding the value of the element to the cumulative value of the accumulator. for the latest information about the Accumulator VIs.Accumulator VIs 10 Refer to the LabVIEW Help. Use the VI to open this reference. You can access these accumulators only through the analog module in slot 1 of the CompactRIO device. You can access values from the accumulator faster than you can access values in main memory. Use the Accumulator VIs to configure and access accumulators on the CompactRIO device. available by selecting Help»Search the LabVIEW Help. An accumulator is a register on the FPGA that you can use to store cumulative results. AIDeviceRef specifies a reference to the analog channel you want to use. © National Instruments Corporation 10-1 LabVIEW Robotics Programming Guide for FRC . Use the center value and initial value to account for offset in devices. The FPGA of the CompactRIO device contains two accumulators. Use the AnalogChannel Open VI to create an AIDeviceRef reference cluster that you then can wire to the Accumulator VIs. GetConfiguration. when integrating signals from these devices.

the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. source specifies the origin of the error or warning and is. The default is an empty string. The default is FALSE. The default is no error. in most cases. source specifies the origin of the error or warning and is. code is an error code. The default is 0. Analog Channel can specify a value between AI 1 and AI 8. If an error occurred before this node runs. Analog Module can specify a value of Slot 1 or Slot 2. it runs normally and sets its own error status in error out. Analog Channel specifies the channel of the Analog Module you want to use. Use exception control to treat what is normally an error as no error or to treat a warning as an error. this VI returns an error. the name of the node that produced the error or warning. code is 0 or a warning code. If status is FALSE. If an error occurs while this node runs. code is the error or warning code. The default is 0.Chapter 10 Accumulator VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If Analog Channel is Invalid. If status is TRUE. The default is an empty string. If status is FALSE. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. LabVIEW Robotics Programming Guide for FRC 10-2 ni. error in (no error) describes error conditions that occur before this node runs. The default is FALSE.com . code is 0 or a warning code. the name of the node that produced the error or warning. If status is TRUE. code is the error or warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.

code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The value of the center value depends on the output of channel 1 on the module. If Analog Channel returns a value of Invalid.Chapter 10 Accumulator VIs AIDeviceRef returns a reference to the analog channel. code is the error or warning code. Analog Channel can return a value between AI 1 and AI 8. code is an error code. in most cases. Otherwise. If error in indicates that an error occurred before this VI or function ran. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. code is the error or warning code. If status is FALSE. The default value is 0. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. it describes the error status that this VI or function produces. error out contains error information. If status is FALSE. and this VI returns an error. © National Instruments Corporation 10-3 LabVIEW Robotics Programming Guide for FRC . the VI did not find the analog channel you specified. Initial Value returns the initial value of the accumulator. Center returns the center value of the accumulator. code is an error code. If status is TRUE. Analog Module can return a value of Slot 1 or Slot 2. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Analog Channel returns the channel of the Analog Module you want to use. source specifies the origin of the error or warning and is. code is 0 or a warning code. Therefore the center value is different depending on whether you sample or oversample the signal on channel 1. If status is TRUE. error out contains the same error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

If status is TRUE. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. The default is FALSE. this VI returns an error. The default is 0. GetOutput. The default is an empty string. source specifies the origin of the error or warning and is.Chapter 10 Accumulator VIs source specifies the origin of the error or warning and is.com . code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.vi Returns the current value of the accumulator on the FPGA on the CompactRIO device. code is the error or warning code. Analog Module can specify a value of Slot 1 or Slot 2. Analog Channel can specify a value between AI 1 and AI 8. The GetOutput VI also returns the number of elements accumulated. code is 0 or a warning code. LabVIEW Robotics Programming Guide for FRC 10-4 ni. Use the VI to open this reference. The default is no error. in most cases. If Analog Channel is Invalid. the name of the node that produced the error or warning. AIDeviceRef specifies a reference to the analog channel you want to use. Analog Channel specifies the channel of the Analog Module you want to use. If status is FALSE. You can use this VI to perform averaging. in most cases. DevStatus describes the error status before this VI or function runs. the name of the node that produced the error or warning.

The default is an empty string. If status is TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. This node runs normally only if no error occurred before this node runs. DevStatus describes the error status that this VI or function produces. AIDeviceRef returns a reference to the analog channel. If status is FALSE.Chapter 10 Accumulator VIs error in (no error) describes error conditions that occur before this node runs. code is 0 or a warning code. If status is FALSE. in most cases. the VI did not find the analog channel you specified. the name of the node that produced the error or warning. If an error occurs while this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If Analog Channel returns a value of Invalid. code is the error or warning code. the node passes the error in (no error) value to error out. Analog Channel can return a value between AI 1 and AI 8. source specifies the origin of the error or warning and is. code is 0 or a warning code. Analog Channel returns the channel of the Analog Module you want to use. Analog Module can return a value of Slot 1 or Slot 2. The default is 0. © National Instruments Corporation 10-5 LabVIEW Robotics Programming Guide for FRC . If an error occurred before this node runs. in most cases. code is an error code. The default is FALSE. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. and this VI returns an error. If status is TRUE. The default is no error. source specifies the origin of the error or warning and is. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Count returns the number of elements in the accumulator. Init. code is an error code. If status is FALSE.vi Initializes the accumulator on the FPGA on the CompactRIO device. Initializing the accumulator sets the center value of the accumulator to zero and sets the cumulative accumulator value to zero. error out contains error information. error out contains the same error information. AIDeviceRef specifies a reference to the analog channel you want to use. code is 0 or a warning code. source specifies the origin of the error or warning and is. DevStatus describes the error status before this VI or function runs. code is an error code. LabVIEW Robotics Programming Guide for FRC 10-6 ni. If status is TRUE.com . Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 10 Accumulator VIs Value returns the current value of the accumulator. If status is TRUE. code is 0 or a warning code. the name of the node that produced the error or warning. code is the error or warning code. it describes the error status that this VI or function produces. If status is FALSE. code is the error or warning code. The default is FALSE. The default is 0. Use the VI to open this reference. in most cases. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If error in indicates that an error occurred before this VI or function ran. The default is no error.

If status is FALSE. If an error occurred before this node runs. If status is TRUE. The default is an empty string. AIDeviceRef returns a reference to the analog channel. the name of the node that produced the error or warning. code is an error code. error in (no error) describes error conditions that occur before this node runs. code is 0 or a warning code. the name of the node that produced the error or warning. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out. Analog Module can specify a value of Slot 1 or Slot 2. in most cases. in most cases. source specifies the origin of the error or warning and is. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE. Analog Channel specifies the channel of the Analog Module you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Analog Channel can specify a value between AI 1 and AI 8. If Analog Channel is Invalid. The default is 0. The default is no error. it runs normally and sets its own error status in error out. DevStatus describes the error status that this VI or function produces. This node runs normally only if no error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 10 Accumulator VIs source specifies the origin of the error or warning and is. © National Instruments Corporation 10-7 LabVIEW Robotics Programming Guide for FRC . code is an error code. If status is TRUE. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. code is the error or warning code. code is the error or warning code. this VI returns an error. The default is an empty string. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If an error occurs while this node runs.

in most cases. it describes the error status that this VI or function produces. the name of the node that produced the error or warning. Analog Channel returns the channel of the Analog Module you want to use.vi Resets the accumulator on the FPGA on the CompactRIO device to the initial value you set with the SetConfiguration VI. and this VI returns an error. error out contains the same error information. source specifies the origin of the error or warning and is. DevStatus describes the error status before this VI or function runs. Otherwise. the VI did not find the analog channel you specified.Chapter 10 Accumulator VIs source specifies the origin of the error or warning and is. Use the VI to open this reference. in most cases. If error in indicates that an error occurred before this VI or function ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Reset. The default is no error. Analog Module can return a value of Slot 1 or Slot 2. If Analog Channel returns a value of Invalid. Analog Channel can return a value between AI 1 and AI 8. code is 0 or a warning code. the initial value is 0. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 10-8 ni. the name of the node that produced the error or warning. AIDeviceRef specifies a reference to the analog channel you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. code is an error code. If status is FALSE.com . By default. error out contains error information.

the name of the node that produced the error or warning. this VI returns an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is an empty string. source specifies the origin of the error or warning and is. The default is 0. in most cases. The default is no error. Analog Channel can specify a value between AI 1 and AI 8. This node runs normally only if no error occurred before this node runs. code is the error or warning code. in most cases. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. If an error occurred before this node runs. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If Analog Channel is Invalid. code is an error code. © National Instruments Corporation 10-9 LabVIEW Robotics Programming Guide for FRC . If an error occurs while this node runs. If status is TRUE. code is 0 or a warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is FALSE. error in (no error) describes error conditions that occur before this node runs. code is an error code. If status is TRUE. If status is FALSE. The default is an empty string. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. code is 0 or a warning code. the node passes the error in (no error) value to error out. Analog Channel specifies the channel of the Analog Module you want to use. it runs normally and sets its own error status in error out. Analog Module can specify a value of Slot 1 or Slot 2. The default is FALSE. If status is FALSE.Chapter 10 Accumulator VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0.

the name of the node that produced the error or warning. code is an error code. Analog Module can return a value of Slot 1 or Slot 2. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 10-10 ni. If error in indicates that an error occurred before this VI or function ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is 0 or a warning code. the VI did not find the analog channel you specified. Analog Channel returns the channel of the Analog Module you want to use. If status is FALSE. code is the error or warning code.com . code is the error or warning code. in most cases. and this VI returns an error. code is 0 or a warning code. If status is TRUE. Otherwise. code is an error code. DevStatus describes the error status that this VI or function produces. in most cases. source specifies the origin of the error or warning and is. Analog Channel can return a value between AI 1 and AI 8. If Analog Channel returns a value of Invalid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains error information. If status is TRUE. If status is FALSE. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces. error out contains the same error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 10 Accumulator VIs AIDeviceRef returns a reference to the analog channel.

in most cases. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. AIDeviceRef specifies a reference to the analog channel you want to use. code is 0 or a warning code. Analog Module can specify a value of Slot 1 or Slot 2.Chapter 10 Accumulator VIs SetConfiguration. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. Use the VI to open this reference. The default is no error. such as gyros and accelerometers.vi Sets the center value and initial value of the accumulator on the FPGA on the CompactRIO device. The default is 0. Analog Channel specifies the channel of the Analog Module you want to use. code is an error code. The default is an empty string. If status is FALSE. Analog Channel can specify a value between AI 1 and AI 8. when integrating signals from these devices. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. Therefore the center value is different depending on whether you sample or oversample the signal on channel 1. The value of the center depends on the output of channel 1 on the module. this VI returns an error. DevStatus describes the error status before this VI or function runs. © National Instruments Corporation 10-11 LabVIEW Robotics Programming Guide for FRC . The FPGA subtracts the center value from the value of each element before adding the value of the element to the cumulative value of the accumulator. If status is TRUE. Center specifies the center value of the accumulator. The default is FALSE. Set the center value and initial value to account for offset in devices. If Analog Channel is Invalid.

in most cases. code is an error code. AIDeviceRef returns a reference to the analog channel.Chapter 10 Accumulator VIs Initial Value specifies the initial value of the accumulator. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. error in (no error) describes error conditions that occur before this node runs. The default value is 0. it runs normally and sets its own error status in error out. If status is FALSE. If an error occurs while this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 10-12 ni. The default is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. source specifies the origin of the error or warning and is. the node passes the error in (no error) value to error out. The default is no error. the name of the node that produced the error or warning. in most cases. code is 0 or a warning code.com . code is 0 or a warning code. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. If an error occurred before this node runs. The default is 0. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. If status is FALSE. code is an error code. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Analog Module can return a value of Slot 1 or Slot 2. code is the error or warning code. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. This node runs normally only if no error occurred before this node runs.

If status is FALSE. code is 0 or a warning code. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces. the name of the node that produced the error or warning.Chapter 10 Accumulator VIs Analog Channel returns the channel of the Analog Module you want to use. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If Analog Channel returns a value of Invalid. code is an error code. the VI did not find the analog channel you specified. © National Instruments Corporation 10-13 LabVIEW Robotics Programming Guide for FRC . in most cases. code is the error or warning code. and this VI returns an error. error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. error out contains the same error information. Analog Channel can return a value between AI 1 and AI 8. Otherwise.

for the latest information about the Actuator VIs. motors. available by selecting Help»Search the LabVIEW Help.Actuators VIs 11 Refer to the LabVIEW Help. and solenoids. © National Instruments Corporation 11-1 LabVIEW Robotics Programming Guide for FRC . Use the Actuators VIs to control the behavior of actuators such as limit switches.

vi Closes the reference to the analog channel you specify. Use the AnalogChannel VIs to acquire an analog signal from a channel on a module on the CompactRIO device. The default is no error. code is the error or warning code. available by selecting Help»Search the LabVIEW Help.AnalogChannel VIs 12 Refer to the LabVIEW Help. AIDeviceRef specifies a reference to the analog channel you want to use. DevStatus describes the error status before this VI or function runs. You also can acquire the scaled voltage signal and the average scaled voltage signal. Use the VI to open this reference. © National Instruments Corporation 12-1 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. for the latest information about the AnalogChannel VIs. The default is 0. Use this VI to close each analog channel reference that you open with the Open VI. You can configure how the channel samples the signal by specifying the number of bits and the number of oversample bits. Close. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. If status is FALSE. code is 0 or a warning code. code is an error code. Use the Open VI to create an AIDeviceRef reference cluster that you then can wire to the other AnalogChannel VIs.

Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.Chapter 12 AnalogChannel VIs source specifies the origin of the error or warning and is. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. If status is TRUE. If Analog Channel is Invalid. The default is 0. the node passes the error in (no error) value to error out. The default is an empty string. The default is no error. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If an error occurred before this node runs.com . Analog Channel specifies the channel of the Analog Module you want to use. in most cases. This node runs normally only if no error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. this VI returns an error. error out contains error information. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. Analog Module can specify a value of Slot 1 or Slot 2. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. it runs normally and sets its own error status in error out. in most cases. the name of the node that produced the error or warning. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. error out contains the same error information. Analog Channel can specify a value between AI 1 and AI 8. code is an error code. it describes the error status that this VI or function produces. code is 0 or a warning code. the name of the node that produced the error or warning. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurs while this node runs. Otherwise. The default is FALSE. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 12-2 ni.

The converter scales the raw value to the voltage value using the least significant bit weight constant and the offset constant of the hardware. Use the GetVoltage VI to get voltage values directly from the A/D converter.vi Returns the average voltage value from the oversample and average engine for the channel. The default is an empty string. code is the error or warning code. the name of the node that produced the error or warning. If status is TRUE. source specifies the origin of the error or warning and is. If status is FALSE. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. source specifies the origin of the error or warning and is. GetAverageVoltage. The default is 0. DevStatus describes the error status before this VI or function runs. Use the VI to open this reference. If status is FALSE. © National Instruments Corporation 12-3 LabVIEW Robotics Programming Guide for FRC . code is an error code. The default is FALSE. The default is no error. code is 0 or a warning code. Oversampling increases the resolution of the voltage value but decreases the update rate. Averaging returns a stable voltage value but also decreases the update rate. in most cases. You can use the GetLSBWeight VI and GetOffset VI to determine the least significant bit weight and offset constant for the module. code is 0 or a warning code. AIDeviceRef specifies a reference to the analog channel you want to use. Analog Module can specify a value of Slot 1 or Slot 2. in most cases. If status is TRUE.Chapter 12 AnalogChannel VIs code is the error or warning code. the name of the node that produced the error or warning. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

The default is an empty string. The default is 0. The default is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. The default is no error. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. error in (no error) describes error conditions that occur before this node runs. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. If Analog Channel is Invalid.Chapter 12 AnalogChannel VIs Analog Channel specifies the channel of the Analog Module you want to use. This node runs normally only if no error occurred before this node runs. If status is TRUE. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status that this VI or function produces. code is 0 or a warning code. code is an error code. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. AIDeviceRef returns a reference to the analog channel. in most cases. this VI returns an error. If an error occurred before this node runs. it runs normally and sets its own error status in error out. LabVIEW Robotics Programming Guide for FRC 12-4 ni. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning.com . code is 0 or a warning code. Analog Channel can specify a value between AI 1 and AI 8. the node passes the error in (no error) value to error out. code is an error code. Analog Module can return a value of Slot 1 or Slot 2. code is the error or warning code. If an error occurs while this node runs.

it describes the error status that this VI or function produces. the name of the node that produced the error or warning. and this VI returns an error. You can use the GetLSBWeight VI and GetOffset VI to determine the least significant bit weight and offset constant for the module. GetVoltage. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. error out contains the same error information.Chapter 12 AnalogChannel VIs Analog Channel returns the channel of the Analog Module you want to use. code is the error or warning code. error out contains error information.vi Returns the voltage value directly from the A/D converter on the channel. Use the GetAverageVoltage VI to get voltage values from oversampled or averaged signals. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. code is 0 or a warning code. If Analog Channel returns a value of Invalid. The converter scales the raw value to the voltage value using the least significant bit weight constant and the offset constant of the hardware. Otherwise. code is an error code. Analog Channel can return a value between AI 1 and AI 8. source specifies the origin of the error or warning and is. Voltage returns the voltage from the A/D converter. AIDeviceRef specifies a reference to the analog channel you want to use. in most cases. If status is FALSE. If status is TRUE. © National Instruments Corporation 12-5 LabVIEW Robotics Programming Guide for FRC . the VI did not find the analog channel you specified. Use the VI to open this reference.

Analog Module can specify a value of Slot 1 or Slot 2. The default is FALSE. If an error occurred before this node runs. The default is no error. code is 0 or a warning code. If status is FALSE. If status is FALSE. in most cases. this VI returns an error. source specifies the origin of the error or warning and is. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code.com . in most cases. If Analog Channel is Invalid. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning. Analog Channel specifies the channel of the Analog Module you want to use. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 12-6 ni. error in (no error) describes error conditions that occur before this node runs. The default is no error. The default is FALSE. The default is 0. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. code is an error code. If status is TRUE. If an error occurs while this node runs. The default is an empty string.Chapter 12 AnalogChannel VIs DevStatus describes the error status before this VI or function runs. This node runs normally only if no error occurred before this node runs. The default is an empty string. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is the error or warning code. the node passes the error in (no error) value to error out. Analog Channel can specify a value between AI 1 and AI 8. The default is 0. it runs normally and sets its own error status in error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE.

DevStatus describes the error status that this VI or function produces. error out contains the same error information. error out contains error information. code is 0 or a warning code. code is the error or warning code. the name of the node that produced the error or warning. If status is TRUE. code is an error code. code is an error code. source specifies the origin of the error or warning and is. code is the error or warning code.Chapter 12 AnalogChannel VIs AIDeviceRef returns a reference to the analog channel. source specifies the origin of the error or warning and is. Value returns the voltage value of the signal. it describes the error status that this VI or function produces. © National Instruments Corporation 12-7 LabVIEW Robotics Programming Guide for FRC . Analog Channel returns the channel of the Analog Module you want to use. Analog Module can return a value of Slot 1 or Slot 2. Analog Channel can return a value between AI 1 and AI 8. and this VI returns an error. If status is FALSE. If status is FALSE. the VI did not find the analog channel you specified. Otherwise. code is 0 or a warning code. in most cases. in most cases. If error in indicates that an error occurred before this VI or function ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If Analog Channel returns a value of Invalid. If status is TRUE. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use.

Analog Channel can specify a value between AI 1 and AI 8. If an error occurs while this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurred before this node runs. this VI returns an error. The default is Slot 1. The default is 0. Analog Channel specifies the channel of the Analog Module you want to use. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 12-8 ni.Chapter 12 AnalogChannel VIs Open. This node runs normally only if no error occurred before this node runs. code is the error or warning code. The default is an empty string. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If Analog Channel is Invalid. error in (no error) describes error conditions that occur before this node runs. The default is no error. You must open a reference before using any other AnalogChannel VIs.com . it runs normally and sets its own error status in error out. Analog Module (Slot 1) specifies the slot number on the CompactRIO device of the analog module you want to use.vi Opens a reference to the analog channel you specify. source specifies the origin of the error or warning and is. the node passes the error in (no error) value to error out. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is TRUE. code is 0 or a warning code. If status is FALSE. in most cases. The default is FALSE. Select Slot 1 or Slot 2.

© National Instruments Corporation 12-9 LabVIEW Robotics Programming Guide for FRC . source specifies the origin of the error or warning and is. If status is FALSE.Chapter 12 AnalogChannel VIs AIDeviceRef returns a reference to the analog channel. Analog Module can return a value of Slot 1 or Slot 2. Analog Channel can return a value between AI 1 and AI 8. code is an error code. Analog Channel returns the channel of the Analog Module you want to use. source specifies the origin of the error or warning and is. If Analog Channel returns a value of Invalid. error out contains error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. If status is TRUE. If error in indicates that an error occurred before this VI or function ran. the name of the node that produced the error or warning. Otherwise. code is the error or warning code. and this VI returns an error. the VI did not find the analog channel you specified. error out contains the same error information. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status that this VI or function produces. in most cases. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. code is the error or warning code. If status is FALSE. in most cases. code is an error code. code is 0 or a warning code.

available by selecting Help»Search the LabVIEW Help. GetAverageValue. Use the AnalogChannel Advanced VIs to perform more advanced operations on analog signals. for the latest information about the AnalogChannel Advanced VIs. code is 0 or a warning code. DevStatus describes the error status before this VI or function runs. If status is FALSE. The default is 0. © National Instruments Corporation 13-1 LabVIEW Robotics Programming Guide for FRC . The ADC codes are the binary values that the analog to digital converter returns.vi Returns the average value of the unscaled analog-to-digital converter (ADC) codes directly from the FPGA.AnalogChannel Advanced VIs 13 Refer to the LabVIEW Help. You can configure the sampling rate and set the averaging and oversampling bits. Use the VI to open this reference. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. code is the error or warning code. The GetAverageVoltage VI references this VI to scale the obtained value into volts. The default is FALSE. AIDeviceRef specifies a reference to the analog channel you want to use. The default is no error. code is an error code. Use the AnalogChannel Open VI to create an AIDeviceRef reference cluster that you then can wire to the AnalogChannel Advanced VIs. You also can get factory calibration data from the EEPROM on the module on the CompactRIO device.

The default is an empty string. code is 0 or a warning code. it runs normally and sets its own error status in error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. AIDeviceRef returns a reference to the analog channel. If an error occurs while this node runs. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. this VI returns an error. code is an error code. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. code is the error or warning code.com . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. Analog Channel can specify a value between AI 1 and AI 8. If an error occurred before this node runs. in most cases. If Analog Channel is Invalid. in most cases. Analog Channel specifies the channel of the Analog Module you want to use. If status is FALSE. code is the error or warning code. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 13-2 ni. the name of the node that produced the error or warning. code is 0 or a warning code. DevStatus describes the error status that this VI or function produces. If status is TRUE. error in (no error) describes error conditions that occur before this node runs. The default is FALSE. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Analog Module can specify a value of Slot 1 or Slot 2. The default is 0.Chapter 13 AnalogChannel Advanced VIs source specifies the origin of the error or warning and is. The default is no error. If status is FALSE.

Use the SetAveraging VI to set the number of bits to average and oversample. code is the error or warning code. If status is TRUE. Analog Channel can return a value between AI 1 and AI 8. Value returns the average value of the unscaled ADC codes directly from the FPGA. the name of the node that produced the error or warning. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. source specifies the origin of the error or warning and is. If status is FALSE. Analog Module can return a value of Slot 1 or Slot 2. it describes the error status that this VI or function produces. error out contains the same error information. the VI did not find the analog channel you specified. code is 0 or a warning code. Otherwise. code is an error code. If error in indicates that an error occurred before this VI or function ran. error out contains error information. in most cases. If Analog Channel returns a value of Invalid.vi Returns the number of bits the A/D converter uses to average the signal and the number of bits the converter uses to oversample the signal. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. GetAveraging. © National Instruments Corporation 13-3 LabVIEW Robotics Programming Guide for FRC . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Analog Channel returns the channel of the Analog Module you want to use. in most cases.Chapter 13 AnalogChannel Advanced VIs source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. and this VI returns an error.

code is the error or warning code.com . Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is TRUE. code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If Analog Channel is Invalid. Use the VI to open this reference.Chapter 13 AnalogChannel Advanced VIs AIDeviceRef specifies a reference to the analog channel you want to use. The default is 0. code is an error code. code is an error code. Analog Module can specify a value of Slot 1 or Slot 2. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. If an error occurs while this node runs. The default is no error. the name of the node that produced the error or warning. The default is FALSE. If status is FALSE. in most cases. this VI returns an error. Analog Channel can specify a value between AI 1 and AI 8. source specifies the origin of the error or warning and is. If status is FALSE. The default is no error. The default is 0. If status is TRUE. error in (no error) describes error conditions that occur before this node runs. it runs normally and sets its own error status in error out. LabVIEW Robotics Programming Guide for FRC 13-4 ni. code is 0 or a warning code. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. DevStatus describes the error status before this VI or function runs. the node passes the error in (no error) value to error out. The default is an empty string. The default is FALSE. Analog Channel specifies the channel of the Analog Module you want to use. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code.

code is an error code. DevStatus describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Analog Channel returns the channel of the Analog Module you want to use. AverageBits returns the computed average of a number of bits from the A/D converter. the name of the node that produced the error or warning. © National Instruments Corporation 13-5 LabVIEW Robotics Programming Guide for FRC . The number of oversample values is 2^n. If status is TRUE. If Analog Channel returns a value of Invalid. in most cases. source specifies the origin of the error or warning and is. Analog Channel can return a value between AI 1 and AI 8. Otherwise. the VI did not find the analog channel you specified.Chapter 13 AnalogChannel Advanced VIs source specifies the origin of the error or warning and is. where n is OversampleBits. Analog Module can return a value of Slot 1 or Slot 2. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. AIDeviceRef returns a reference to the analog channel. and this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. error out contains error information. code is the error or warning code. the name of the node that produced the error or warning. it describes the error status that this VI or function produces. code is 0 or a warning code. The default is an empty string. If status is FALSE. error out contains the same error information. OversampleBits returns the number of bits the A/D converter uses for oversampling the signal.

If status is FALSE.vi Returns the least significant bit (LSB) weight constant that the A/D converter uses to scale the signal. code is an error code. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 13 AnalogChannel Advanced VIs code is the error or warning code. code is the error or warning code. code is 0 or a warning code. source specifies the origin of the error or warning and is. Analog Channel specifies the channel of the Analog Module you want to use. Analog Channel can specify a value between AI 1 and AI 8. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. in most cases. the name of the node that produced the error or warning. The default is FALSE. the name of the node that produced the error or warning. Use the VI to open this reference. in most cases. AIDeviceRef specifies a reference to the analog channel you want to use. The default is no error. code is 0 or a warning code. code is an error code. The default is an empty string. If status is TRUE. If Analog Channel is Invalid. If status is FALSE.com . Analog Module can specify a value of Slot 1 or Slot 2. If status is TRUE. source specifies the origin of the error or warning and is. GetLSBWeight. DevStatus describes the error status before this VI or function runs. this VI returns an error. LabVIEW Robotics Programming Guide for FRC 13-6 ni.

If Analog Channel returns a value of Invalid. Analog Module can return a value of Slot 1 or Slot 2. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. DevStatus describes the error status that this VI or function produces. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Analog Channel can return a value between AI 1 and AI 8. AIDeviceRef returns a reference to the analog channel. in most cases. and this VI returns an error. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. Analog Channel returns the channel of the Analog Module you want to use. This node runs normally only if no error occurred before this node runs.Chapter 13 AnalogChannel Advanced VIs error in (no error) describes error conditions that occur before this node runs. code is 0 or a warning code. the name of the node that produced the error or warning. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. code is the error or warning code. The default is 0. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. The default is an empty string. If an error occurs while this node runs. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is an error code. code is 0 or a warning code. © National Instruments Corporation 13-7 LabVIEW Robotics Programming Guide for FRC . code is an error code. If an error occurred before this node runs. If status is TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. code is the error or warning code. it runs normally and sets its own error status in error out. If status is FALSE. in most cases. the VI did not find the analog channel you specified. source specifies the origin of the error or warning and is.

code is an error code. The default is 0. the name of the node that produced the error or warning. error out contains the same error information. LabVIEW Robotics Programming Guide for FRC 13-8 ni. code is the error or warning code. code is 0 or a warning code. GetOffset.com .vi Returns the factory offset value that the A/D converter uses to scale the signal. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. it describes the error status that this VI or function produces. source specifies the origin of the error or warning and is. DevStatus describes the error status before this VI or function runs. in most cases.Chapter 13 AnalogChannel Advanced VIs LSBWeight returns the least significant bit weight constant. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. AIDeviceRef specifies a reference to the analog channel you want to use. The default is no error. code is 0 or a warning code. If error in indicates that an error occurred before this VI or function ran. The least significant bit weight constant is part of the calibration data for the specific module on the CompactRIO device. error out contains error information. If status is FALSE. If status is TRUE. code is the error or warning code. Use the VI to open this reference. code is an error code. If status is FALSE. The factory stores the least significant bit weight constant in the EEPROM of the module.

If an error occurred before this node runs. source specifies the origin of the error or warning and is. This node runs normally only if no error occurred before this node runs. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. the name of the node that produced the error or warning.Chapter 13 AnalogChannel Advanced VIs source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. AIDeviceRef returns a reference to the analog channel. DevStatus describes the error status that this VI or function produces. code is an error code. it runs normally and sets its own error status in error out. If Analog Channel is Invalid. error in (no error) describes error conditions that occur before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is 0 or a warning code. If status is FALSE. © National Instruments Corporation 13-9 LabVIEW Robotics Programming Guide for FRC . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. Analog Channel can specify a value between AI 1 and AI 8. The default is an empty string. Analog Module can specify a value of Slot 1 or Slot 2. code is 0 or a warning code. If status is TRUE. code is the error or warning code. the name of the node that produced the error or warning. Analog Channel specifies the channel of the Analog Module you want to use. the node passes the error in (no error) value to error out. If an error occurs while this node runs. code is an error code. code is the error or warning code. The default is an empty string. The default is no error. If status is TRUE. this VI returns an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. The default is 0. The default is FALSE.

in most cases.com . Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Analog Channel returns the channel of the Analog Module you want to use. error out contains error information. in most cases. source specifies the origin of the error or warning and is. the VI did not find the analog channel you specified. the name of the node that produced the error or warning. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Analog Module can return a value of Slot 1 or Slot 2. it describes the error status that this VI or function produces. Analog Channel can return a value between AI 1 and AI 8. the name of the node that produced the error or warning. If error in indicates that an error occurred before this VI or function ran. Offset returns the amount that the A/D converter offsets the raw value of the signal to determine the voltage value. The factory stores the offset constant in the EEPROM of the module. If status is TRUE.Chapter 13 AnalogChannel Advanced VIs source specifies the origin of the error or warning and is. code is 0 or a warning code. LabVIEW Robotics Programming Guide for FRC 13-10 ni. code is an error code. If status is FALSE. Otherwise. If Analog Channel returns a value of Invalid. and this VI returns an error. error out contains the same error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The offset constant is part of the calibration data for the specific module on the CompactRIO device. code is the error or warning code.

Chapter 13

AnalogChannel Advanced VIs

GetSampleRate.vi
Returns the sample rate of the analog module you specify. The effective sample rate for a channel on the module is the sample rate of the module divided by the number of active channels on the module. Use the SetSampleRate VI to set the sample rate of a channel on the module.

Analog Module (Slot 1) specifies the slot number on the CompactRIO device of the analog module you want to use. Select Slot 1 or Slot 2. The default is Slot 1. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Analog Module can return a value of Slot 1 or Slot 2. samplesPerSecond returns the sample rate of the module. The sample rate of a channel in the module is the module sample rate divided by the number of active channels.

© National Instruments Corporation

13-11

LabVIEW Robotics Programming Guide for FRC

Chapter 13

AnalogChannel Advanced VIs

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

GetValue.vi
Returns the value of the unscaled analog-to-digital converter (ADC) codes directly from the FPGA. The ADC codes are the binary values that the analog to digital converter returns. The GetVoltage VI references this VI to scale the obtained value into volts.

AIDeviceRef specifies a reference to the analog channel you want to use. Use the VI to open this reference. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string.

LabVIEW Robotics Programming Guide for FRC

13-12

ni.com

Chapter 13

AnalogChannel Advanced VIs

Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. Analog Module can specify a value of Slot 1 or Slot 2. Analog Channel specifies the channel of the Analog Module you want to use. Analog Channel can specify a value between AI 1 and AI 8. If Analog Channel is Invalid, this VI returns an error. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. AIDeviceRef returns a reference to the analog channel. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

© National Instruments Corporation

13-13

LabVIEW Robotics Programming Guide for FRC

Chapter 13

AnalogChannel Advanced VIs

Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Analog Module can return a value of Slot 1 or Slot 2. Analog Channel returns the channel of the Analog Module you want to use. Analog Channel can return a value between AI 1 and AI 8. If Analog Channel returns a value of Invalid, the VI did not find the analog channel you specified, and this VI returns an error. Value returns the value of the unscaled ADC codes directly from the FPGA. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

SetAveraging.vi
Specifies the number of bits you want to use to average and oversample the signal. Averaging can improve measurement accuracy for noisy and rapidly changing signals. Oversampling is a technique that sums extra samples but does not divide the sum by the number of samples. For example, if you oversample a signal by 16 times, the resulting values are 16 times larger than the average output. Use oversampling to improve the resolution of signal measurements at the expense of the sampling rate. The FPGA on the CompactRIO device automatically does the oversampling.

LabVIEW Robotics Programming Guide for FRC

13-14

ni.com

Chapter 13

AnalogChannel Advanced VIs

AIDeviceRef specifies a reference to the analog channel you want to use. Use the VI to open this reference. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. Analog Module can specify a value of Slot 1 or Slot 2. Analog Channel specifies the channel of the Analog Module you want to use. Analog Channel can specify a value between AI 1 and AI 8. If Analog Channel is Invalid, this VI returns an error. AverageBits specifies the number of bits to use when computing the average of a signal. OversampleBits specifies the number of bits to use for oversampling the signal. The number of oversample values is 2^n, where n is OversampleBits. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE.

© National Instruments Corporation

13-15

LabVIEW Robotics Programming Guide for FRC

Chapter 13

AnalogChannel Advanced VIs

code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. AIDeviceRef returns a reference to the analog channel. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Analog Module can return a value of Slot 1 or Slot 2. Analog Channel returns the channel of the Analog Module you want to use. Analog Channel can return a value between AI 1 and AI 8. If Analog Channel returns a value of Invalid, the VI did not find the analog channel you specified, and this VI returns an error. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code.

LabVIEW Robotics Programming Guide for FRC

13-16

ni.com

Chapter 13

AnalogChannel Advanced VIs

source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

SetSampleRate.vi
Sets the sample rate for a channel on the module you specify. The sample rate is the same for each channel on the module. You can use sampling theory to determine an optimal sampling rate for a signal.

Analog Module (Slot 1) specifies the slot number on the CompactRIO device of the analog module you want to use. Select Slot 1 or Slot 2. The default is Slot 1. samplesPerSecond specifies the sample rate for the module. scanList specifies the channel or channels of the analog module you want to make active for sampling. If the array is empty, the module samples all channels. Otherwise, the array must include elements for each channel to make active for sampling. You can make channels 1 through 8 active. If scanList is Invalid, this VI returns an error. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE.

© National Instruments Corporation

13-17

LabVIEW Robotics Programming Guide for FRC

Chapter 13

AnalogChannel Advanced VIs

code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Analog Module can return a value of Slot 1 or Slot 2. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

LabVIEW Robotics Programming Guide for FRC

13-18

ni.com

AnalogTrigger VIs

14

Refer to the LabVIEW Help, available by selecting Help»Search the LabVIEW Help, for the latest information about the AnalogTrigger VIs. Use the AnalogTrigger VIs to create digital signals from analog signals. You can use analog triggers as sources for the Counter VIs and Encoder VIs. The analog trigger circuit on the target produces three types of output: TriggerState, InWindow, and Pulse. Use the AnalogTrigger Get Output VI to get the TriggerState and InWindow output from the trigger. The FPGA on the CompactRIO device contains eight analog triggers. The analog triggers are not tied to a specific module or channel on the CompactRIO device. You can reserve and release analog triggers as needed. Use the Open VI to create an AnalogTriggerDevRef reference cluster that you then can wire to the other AnalogTrigger VIs.

Close.vi
Closes the reference to the analog trigger you specify. Use this VI to close each analog trigger reference that you open with the Open VI.

AnalogTriggerDevRef specifies a reference to the analog trigger you want to use. Use the VI to open this reference. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE.

© National Instruments Corporation

14-1

LabVIEW Robotics Programming Guide for FRC

Chapter 14

AnalogTrigger VIs

code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. AnalogTriggerIndex specifies the index of the reserved analog trigger. AnalogTriggerIndex can specify a value between Trig 0 and Trig 7. If AnalogTriggerIndex is Invalid, this VI returns an error. Close Dependencies, when TRUE, closes any analog channel inputs associated with the analog trigger when you close the reference to the analog trigger. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

LabVIEW Robotics Programming Guide for FRC

14-2

ni.com

If status is TRUE. code is an error code. source specifies the origin of the error or warning and is. AnalogTriggerIndex can specify a value between Trig 0 and Trig 7. this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. code is 0 or a warning code. DevStatus describes the error status before this VI or function runs. If status is FALSE. If AnalogTriggerIndex is Invalid. Use the VI to open this reference. The default is 0. The default is an empty string. in most cases. source specifies the origin of the error or warning and is. The default is FALSE.Chapter 14 AnalogTrigger VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. If status is TRUE. code is an error code. GetOutput. The default is no error.vi Returns the different types of digital output from the trigger. the name of the node that produced the error or warning. AnalogTriggerIndex specifies the index of the reserved analog trigger. AnalogTriggerDevRef specifies a reference to the analog trigger you want to use. in most cases. If status is FALSE. © National Instruments Corporation 14-3 LabVIEW Robotics Programming Guide for FRC . code is 0 or a warning code. code is the error or warning code.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. and this VI returns an error. that the signal is between the upper and lower limits of the range you set in the VI. The default is 0. AnalogTriggerIndex returns the index of the reserved analog trigger. the name of the node that produced the error or warning. If status is FALSE.Chapter 14 AnalogTrigger VIs error in (no error) describes error conditions that occur before this node runs. If status is TRUE. AnalogTriggerDevRef returns a reference to the analog trigger. The default is an empty string. the VI did not find the analog trigger you specified. code is 0 or a warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. in most cases.com . source specifies the origin of the error or warning and is. If status is TRUE. the node passes the error in (no error) value to error out. DevStatus describes the error status that this VI or function produces. AnalogTriggerIndex can return a value between Trig 0 and Trig 7. code is an error code. in most cases. the name of the node that produced the error or warning. code is 0 or a warning code. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. LabVIEW Robotics Programming Guide for FRC 14-4 ni. If an error occurred before this node runs. In Window indicates. This node runs normally only if no error occurred before this node runs. The default is no error. source specifies the origin of the error or warning and is. code is the error or warning code. If an error occurs while this node runs. If AnalogTriggerIndex returns a value of Invalid. code is an error code. when TRUE. The default is FALSE. it runs normally and sets its own error status in error out.

that the signal exceeds the upper limit you set in the VI. If status is TRUE. it describes the error status that this VI or function produces. © National Instruments Corporation 14-5 LabVIEW Robotics Programming Guide for FRC . If error in indicates that an error occurred before this VI or function ran. error out contains error information. Open. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the signal is below the lower limit you set in the VI. Averaged specifies. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. When the signal is between the upper and lower limits. AnalogTriggerSource specifies the source of the analog trigger you want to use. When Trigger State is FALSE. The default is no error. when TRUE. that the analog source of the trigger contains averaged values. in most cases. Trigger State maintains the most recent value. Otherwise. the name of the node that produced the error or warning. If status is FALSE.Chapter 14 AnalogTrigger VIs Trigger State indicates. error out contains the same error information. source specifies the origin of the error or warning and is. code is 0 or a warning code. code is the error or warning code. DevStatus describes the error status before this VI or function runs. You must open a reference before using any other AnalogTrigger VIs. when TRUE. code is an error code.vi Opens and configures a reference to the analog trigger.

it runs normally and sets its own error status in error out. Analog Channel specifies the channel of the Analog Module you want to use. code is the error or warning code. in most cases. code is an error code. source specifies the origin of the error or warning and is. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is no error. code is an error code. The default is 0. LowerLimit (v) specifies the lower limit of the voltage signal that determines the generation of the trigger. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. Analog Channel can specify a value between AI 1 and AI 8. The default is 0. The default is FALSE. code is 0 or a warning code. If Analog Channel is Invalid. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. This node runs normally only if no error occurred before this node runs.Chapter 14 AnalogTrigger VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. If an error occurs while this node runs. this VI returns an error. LabVIEW Robotics Programming Guide for FRC 14-6 ni. If status is FALSE. If status is TRUE. the node passes the error in (no error) value to error out. The default is an empty string.com . If status is FALSE. code is 0 or a warning code. Analog Module can specify a value of Slot 1 or Slot 2. If an error occurred before this node runs. The default is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. UpperLimit (v) specifies the upper limit of the voltage signal that determines the generation of the trigger. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning.

code is the error or warning code. error out contains error information. the VI did not find the analog trigger you specified. error out contains the same error information. code is the error or warning code. the name of the node that produced the error or warning. and this VI returns an error. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The Average Rejection Filter eliminates less reliable rising and falling pulses from the analog trigger you specify. Otherwise. in most cases. code is an error code. The default is an empty string. DevStatus describes the error status that this VI or function produces. code is 0 or a warning code. If AnalogTriggerIndex returns a value of Invalid. enables the Average Rejection Filter for the analog trigger you are opening. when TRUE. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. in most cases. If status is FALSE. in most cases. the name of the node that produced the error or warning. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE. code is 0 or a warning code. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. code is an error code. AnalogTriggerIndex can return a value between Trig 0 and Trig 7. If status is TRUE. AnalogTriggerDevRef returns a reference to the analog trigger. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 14-7 LabVIEW Robotics Programming Guide for FRC . it describes the error status that this VI or function produces. AnalogTriggerIndex returns the index of the reserved analog trigger. Filter.Chapter 14 AnalogTrigger VIs source specifies the origin of the error or warning and is.

and stops sending image data to the host computer. this VI only decrements the count of the camera reference by one. Use the Get Image from Controller VI to retrieve a specific image on the host computer from the image data that the CompactRIO device sends. Close. The CompactRIO device continuously sends image data to the host computer as long as a reference to the camera on the CompactRIO device is open. available by selecting Help»Search the LabVIEW Help. © National Instruments Corporation 15-1 LabVIEW Robotics Programming Guide for FRC . You use most of the Camera VIs in the FRC robot project that you run on the CompactRIO device. stop acquiring image data with the Stop VI. Use the Open VI to create a CameraDevRef reference cluster that you then can wire to the other Camera VIs. the Get Image From Controller VI must run on the host computer. For example. You then can use the FIRST Vision VIs in the FRC robot project on the CompactRIO device to analyze and manipulate the images.Camera VIs 15 Refer to the LabVIEW Help. Ensure you have a Close VI to decrement the count of the camera reference for each Open VI you use. Each time you run the Open VI. and then close the reference to the camera with the Close VI. start acquiring image data with the Start VI. for the latest information about the Camera VIs. stops acquiring image data. If the count of the camera reference is greater than one. Use the Camera VIs to acquire images with the Axis camera.vi Closes the reference to the camera. you open a reference to the camera with the Open VI. you increment the count of the camera reference by one. retrieve a specific image with the Get Image VI. However.

com . The default is FALSE. This node runs normally only if no error occurred before this node runs. error in (no error) describes error conditions that occur before this node runs.168. The default is no error. If status is FALSE. the node passes the error in (no error) value to error out.0. code is 0 or a warning code. the name of the node that produced the error or warning. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases.Chapter 15 Camera VIs CameraDevRef specifies a reference to the camera you want to use. Use the VI to open this reference. code is 0 or a warning code. The default is an empty string. Camera Address specifies the IP address of the camera you want to use. source specifies the origin of the error or warning and is. The default is 192. If an error occurred before this node runs. in most cases. The default is 0. The default is no error. If status is TRUE. code is the error or warning code.90. If status is TRUE. which is the IP address to which the Axis camera is set by default. LabVIEW Robotics Programming Guide for FRC 15-2 ni. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use exception control to treat what is normally an error as no error or to treat a warning as an error. source specifies the origin of the error or warning and is. The default is an empty string. it runs normally and sets its own error status in error out. The default is 0. If an error occurs while this node runs. CameraStatus describes the error status before this VI or function runs. the name of the node that produced the error or warning. code is an error code.

it describes the error status that this VI or function produces. code is the error or warning code. Camera Address specifies the IP address of the camera you want to use. for more information about the FRC robot and dashboard projects. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. this VI retrieves the most current snapshot of the image data from the camera. code is 0 or a warning code. Use the VI to open this reference. Use the Get Image From Controller VI in the FRC dashboard project on the host computer to retrieve an image on the host computer. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Refer to Chapter 4. This VI runs in the FRC robot project on the CompactRIO device and retrieves an image on the CompactRIO device.vi Retrieves a specific image from the image data that the camera you specify acquired. If status is FALSE. Using the FRC Framework. If error in indicates that an error occurred before this VI or function ran.168. © National Instruments Corporation 15-3 LabVIEW Robotics Programming Guide for FRC .Chapter 15 Camera VIs error out contains error information. Use the Start VI to start acquiring image data from the camera before you use the Get Image VI to retrieve an image. The default is 192. Get Image. the name of the node that produced the error or warning. When you run this VI. which is the IP address to which the Axis camera is set by default. If status is TRUE.90. Otherwise. CameraDevRef specifies a reference to the camera you want to use. error out contains the same error information.0. code is an error code. in most cases.

The default is no error. If status is TRUE. code is 0 or a warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning. in most cases. error in (no error) describes error conditions that occur before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE. the node passes the error in (no error) value to error out. The default is 0. If status is TRUE. code is 0 or a warning code. Image specifies a reference into which this VI copies the image it retrieves. The default is an empty string. If an error occurs while this node runs. it runs normally and sets its own error status in error out. in most cases. code is the error or warning code. The default is an empty string. CameraDevRef Out returns the reference to the camera.Chapter 15 Camera VIs CameraStatus describes the error status before this VI or function runs. code is an error code. This node runs normally only if no error occurred before this node runs.com . The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 15-4 ni. Camera Address returns the IP address of the camera. code is an error code. CameraStatus describes the error status that this VI or function produces. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. The default is FALSE. If status is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. source specifies the origin of the error or warning and is. If status is FALSE. source specifies the origin of the error or warning and is. If an error occurred before this node runs. code is the error or warning code.

Otherwise. source specifies the origin of the error or warning and is. error out contains error information. code is 0 or a warning code. code is 0 or a warning code. code is the error or warning code.vi Retrieves a specific image from the image data that the camera connected to the CompactRIO device you specify acquired. © National Instruments Corporation 15-5 LabVIEW Robotics Programming Guide for FRC . Use this VI in the FRC dashboard project on the host computer. Refer to Chapter 4. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. error out contains the same error information. Use an Open VI in the FRC robot project to open a reference to the camera. Get Image From Controller. Then use the Get Image From Controller VI to make the request to retrieve the image data. the name of the node that produced the error or warning. in most cases. in most cases. If status is FALSE. code is an error code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE. code is an error code. source specifies the origin of the error or warning and is. for more information about the FRC dashboard and robot projects. Using the FRC Framework. If error in indicates that an error occurred before this VI or function ran. If status is FALSE.Chapter 15 Camera VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Image Out returns the reference into which this VI copied the image it retrieved. If status is TRUE. The Open VI initiates an asynchronous task that waits for a request from the host computer to retrieve the image data. the name of the node that produced the error or warning.

for information about using the CompactRIO Imaging Tool to configure the IP address of the CompactRIO device. Refer to the Configuring the CompactRIO Device section of Chapter 3. If an error occurred before this node runs. If status is TRUE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is an empty string. in most cases.2. The default is no error. code is an error code.xx. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 15-6 ni.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 15 Camera VIs Image specifies a reference into which this VI copies the image it retrieves. source specifies the origin of the error or warning and is. Image Out returns the reference into which this VI copied the image it retrieved. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.yy. code is 0 or a warning code. This node runs normally only if no error occurred before this node runs. The default is 0. If status is FALSE. The default is FALSE. Controller Address specifies the IP address of the CompactRIO device from which you want to receive image data. error in (no error) describes error conditions that occur before this node runs. The IP address of the CompactRIO device should be 10. where y corresponds to the last two digits of your team number and x corresponds to the first or first two digits of your team number. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. Configuring the Camera and the CompactRIO Device. If an error occurs while this node runs. it runs normally and sets its own error status in error out. the node passes the error in (no error) value to error out.

error out contains the same error information. the node passes the error in (no error) value to error out. If status is FALSE. code is 0 or a warning code. Each time you run the Close VI. After you open a reference to the camera. You also can use the Get Image From Controller VI in the FRC dashboard project to retrieve images on the host computer. code is an error code. If status is TRUE. on the CompactRIO device. source specifies the origin of the error or warning and is. Open. you can use the Start and Stop VIs to start and stop acquiring image data. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Ensure you have a Close VI to decrement the count of the camera reference for each Open VI you use. the name of the node that produced the error or warning. code is the error or warning code. If a reference to the camera is already open. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it runs normally and sets its own error status in error © National Instruments Corporation 15-7 LabVIEW Robotics Programming Guide for FRC . Otherwise. error in (no error) describes error conditions that occur before this node runs. this VI increments the count of the camera reference by one. The default is 192. you decrement the count of the camera reference by one. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs.90.Chapter 15 Camera VIs error out contains error information. respectively. If error in indicates that an error occurred before this VI or function ran. The default is no error.vi Opens a reference to the camera you specify. If an error occurred before this node runs.0. Camera Address specifies the IP address of the camera you want to use. it describes the error status that this VI or function produces. which is the IP address to which the Axis camera is set by default. You must open a reference before using any other VIs on this palette. in most cases.168.

the name of the node that produced the error or warning. code is 0 or a warning code. LabVIEW Robotics Programming Guide for FRC 15-8 ni. it describes the error status that this VI or function produces. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is 0. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. source specifies the origin of the error or warning and is. code is an error code. The default is FALSE.com . CameraDevRef returns a reference to the camera. If status is TRUE. The default is an empty string. If status is FALSE. If status is TRUE. source specifies the origin of the error or warning and is. code is 0 or a warning code. error out contains the same error information. CameraStatus describes the error status that this VI or function produces. in most cases. Camera Address returns the IP address of the camera. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. If error in indicates that an error occurred before this VI or function ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. code is the error or warning code. the name of the node that produced the error or warning.Chapter 15 Camera VIs out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains error information. code is the error or warning code.

If status is TRUE. source specifies the origin of the error or warning and is. CameraDevRef specifies a reference to the camera you want to use. you decrement the number of acquisition requests by one. code is an error code. Refer to Chapter 4. Ensure you have a Stop VI to decrement the count of acquisition requests for each Start VI you use. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. After you start acquiring image data from the camera. © National Instruments Corporation 15-9 LabVIEW Robotics Programming Guide for FRC . for more information about the FRC robot and dashboard projects.168.90. Use the VI to open this reference. Start. The default is no error. which is the IP address to which the Axis camera is set by default. this VI increments the number of acquisition requests by one. code is 0 or a warning code. The default is 192. If status is TRUE. If status is FALSE. Using the FRC Framework. in most cases. If an acquisition is already in progress. The default is 0. the name of the node that produced the error or warning. you can use the Get Image VI in the FRC robot project to retrieve a specific image on the CompactRIO device.Chapter 15 Camera VIs code is the error or warning code. code is 0 or a warning code. Each time you run the Stop VI. Camera Address specifies the IP address of the camera you want to use. If status is FALSE. code is an error code. CameraStatus describes the error status before this VI or function runs. The default is FALSE.vi Starts acquiring image data from the camera you specify.0.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 15 Camera VIs source specifies the origin of the error or warning and is. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. source specifies the origin of the error or warning and is. If an error occurs while this node runs. CameraDevRef Out returns the reference to the camera. The default is FALSE. If status is FALSE. This node runs normally only if no error occurred before this node runs. in most cases. source specifies the origin of the error or warning and is. The default is an empty string. If status is TRUE. code is 0 or a warning code. code is the error or warning code. the name of the node that produced the error or warning. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 15-10 ni. in most cases. in most cases. it runs normally and sets its own error status in error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. the name of the node that produced the error or warning. the node passes the error in (no error) value to error out. The default is 0. The default is no error. If an error occurred before this node runs.com . error in (no error) describes error conditions that occur before this node runs. code is an error code. code is 0 or a warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning. Camera Address returns the IP address of the camera. CameraStatus describes the error status that this VI or function produces. If status is FALSE. code is an error code.

the name of the node that produced the error or warning. code is an error code. it describes the error status that this VI or function produces. this VI only decrements the number of acquisition requests by one. Otherwise.168. which is the IP address to which the Axis camera is set by default. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. © National Instruments Corporation 15-11 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. CameraDevRef specifies a reference to the camera you want to use. in most cases. Stop. CameraStatus describes the error status before this VI or function runs.Chapter 15 Camera VIs error out contains error information.0. If the count of acquisition requests is greater than one. The default is 192. code is the error or warning code. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran. Ensure you have a Stop VI to decrement the count of acquisition requests for each Start VI you use. Each time you run the Start VI. Camera Address specifies the IP address of the camera you want to use. The default is FALSE. you increment the number of acquisition requests by one.90. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. If status is FALSE.vi Stops acquiring image data from the camera you specify. Use the VI to open this reference. source specifies the origin of the error or warning and is.

CameraDevRef Out returns the reference to the camera. LabVIEW Robotics Programming Guide for FRC 15-12 ni. If an error occurs while this node runs. in most cases. in most cases. The default is an empty string. code is the error or warning code. code is 0 or a warning code. source specifies the origin of the error or warning and is. code is 0 or a warning code. the name of the node that produced the error or warning. code is the error or warning code. in most cases. code is an error code. the name of the node that produced the error or warning. code is 0 or a warning code. source specifies the origin of the error or warning and is. The default is no error. Camera Address returns the IP address of the camera. it runs normally and sets its own error status in error out. This node runs normally only if no error occurred before this node runs. The default is an empty string. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. the node passes the error in (no error) value to error out. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. If status is FALSE. The default is 0. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is an error code.Chapter 15 Camera VIs code is the error or warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning. If status is TRUE. error in (no error) describes error conditions that occur before this node runs. CameraStatus describes the error status that this VI or function produces. If status is TRUE. source specifies the origin of the error or warning and is. If an error occurred before this node runs.com . The default is FALSE. If status is FALSE.

If status is FALSE. it describes the error status that this VI or function produces. code is 0 or a warning code. error out contains the same error information. code is an error code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. © National Instruments Corporation 15-13 LabVIEW Robotics Programming Guide for FRC . code is the error or warning code. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. the name of the node that produced the error or warning.Chapter 15 Camera VIs error out contains error information. source specifies the origin of the error or warning and is. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases.

vi Returns the brightness setting of the camera you specify. for the latest information about the Camera Properties VIs.168. available by selecting Help»Search the LabVIEW Help. The default is FALSE. code is an error code. CameraDevRef specifies a reference to the camera you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 16-1 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. code is 0 or a warning code. code is the error or warning code. If status is FALSE.90. Camera Address specifies the IP address of the camera you want to use. CameraStatus describes the error status before this VI or function runs. The default is 0. which is the IP address to which the Axis camera is set by default.Camera Properties VIs 16 Refer to the LabVIEW Help. Use the Camera Properties VIs to set and return settings for the Axis camera.0. Use the VI to open this reference. Get Brightness. Use the Camera Open VI to create a CameraDevRef reference cluster that you then can wire to the Camera Properties VIs. The default is 192. The default is no error.

The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 16-2 ni. If status is FALSE. code is the error or warning code. source specifies the origin of the error or warning and is. The default is 0. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Camera Address returns the IP address of the camera. the node passes the error in (no error) value to error out. in most cases. the name of the node that produced the error or warning. code is an error code.com . code is an error code. it runs normally and sets its own error status in error out. The default is an empty string. where 0 indicates the darkest setting and 100 indicates the brightest setting. code is 0 or a warning code. CameraStatus describes the error status that this VI or function produces. in most cases. error in (no error) describes error conditions that occur before this node runs. If an error occurred before this node runs. code is 0 or a warning code. If status is FALSE. code is the error or warning code. The default is no error. CameraDevRef Out returns the reference to the camera.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. If status is TRUE. This node runs normally only if no error occurred before this node runs. Brightness can return a value between 0 and 100. If an error occurs while this node runs. If status is TRUE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. Brightness returns the brightness setting of the camera. the name of the node that produced the error or warning. The default is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error.

If error in indicates that an error occurred before this VI or function ran. Camera Address specifies the IP address of the camera you want to use. code is 0 or a warning code.vi Returns the color level setting of the camera you specify. The default is 192. code is the error or warning code. Otherwise. code is the error or warning code.Chapter 16 Camera Properties VIs error out contains error information. which is the IP address to which the Axis camera is set by default. Use the VI to open this reference. The default is 0. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.168. CameraStatus describes the error status before this VI or function runs. error out contains the same error information. code is 0 or a warning code. code is an error code. Get Color Level. © National Instruments Corporation 16-3 LabVIEW Robotics Programming Guide for FRC . code is an error code. it describes the error status that this VI or function produces. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases.90. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. the name of the node that produced the error or warning. If status is FALSE. If status is TRUE.0. The default is FALSE. CameraDevRef specifies a reference to the camera you want to use. If status is FALSE. source specifies the origin of the error or warning and is.

code is the error or warning code. code is an error code. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error in (no error) describes error conditions that occur before this node runs. CameraDevRef Out returns the reference to the camera. The default is an empty string. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 16-4 ni. in most cases. in most cases. If status is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. This node runs normally only if no error occurred before this node runs. Color Level returns the color level setting of the camera. code is 0 or a warning code. CameraStatus describes the error status that this VI or function produces. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Color Level can return a value between 0 and 100. The default is no error.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. If an error occurs while this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is an empty string. source specifies the origin of the error or warning and is. code is an error code. The default is 0. If an error occurred before this node runs. the node passes the error in (no error) value to error out. If status is TRUE. If status is TRUE. code is the error or warning code.com . The default is FALSE. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. Camera Address returns the IP address of the camera. code is 0 or a warning code.

If status is TRUE. code is an error code. CameraDevRef specifies a reference to the camera you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Camera Address specifies the IP address of the camera you want to use. code is the error or warning code. The default is no error. it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran. CameraStatus describes the error status before this VI or function runs. code is the error or warning code. in most cases. which is the IP address to which the Axis camera is set by default. the name of the node that produced the error or warning.90. The default is 192. source specifies the origin of the error or warning and is. © National Instruments Corporation 16-5 LabVIEW Robotics Programming Guide for FRC .Chapter 16 Camera Properties VIs error out contains error information. Use the VI to open this reference. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.0. The default is 0. The default is FALSE. Otherwise. If status is TRUE.168. Get Exposure. code is 0 or a warning code. code is 0 or a warning code. If status is FALSE.vi Returns the exposure setting of the camera you specify.

code is 0 or a warning code. CameraDevRef Out returns the reference to the camera. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. If status is FALSE. code is the error or warning code. The default is 0. Camera Address returns the IP address of the camera. code is an error code. If an error occurred before this node runs. in most cases. If an error occurs while this node runs. the name of the node that produced the error or warning. If status is TRUE. code is 0 or a warning code. The default is FALSE. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out.com . Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. The default is an empty string. in most cases. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is no error. The default is an empty string. source specifies the origin of the error or warning and is. Exposure returns the exposure setting of the camera. code is an error code. If status is TRUE. CameraStatus describes the error status that this VI or function produces. This node runs normally only if no error occurred before this node runs. If status is FALSE. error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out. in most cases. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 16-6 ni. Use exception control to treat what is normally an error as no error or to treat a warning as an error.

0. the amount of noise in the image might increase. Otherwise. Get Exposure Priority. the frame rate might decrease. code is 0 or a warning code. it describes the error status that this VI or function produces. The default is no error. If the camera prioritizes image quality. in most cases. which is the IP address to which the Axis camera is set by default. If status is TRUE. source specifies the origin of the error or warning and is.168. If the camera prioritizes the frame rate. The default is 192. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Camera Address specifies the IP address of the camera you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.vi Returns whether the camera you specify prioritizes the frame rate or image quality when setting the exposure. CameraDevRef specifies a reference to the camera you want to use. the name of the node that produced the error or warning. If status is FALSE. resulting in increased motion blur. CameraStatus describes the error status before this VI or function runs.90. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. error out contains the same error information. code is the error or warning code. Use the VI to open this reference.Chapter 16 Camera Properties VIs error out contains error information. If error in indicates that an error occurred before this VI or function ran. © National Instruments Corporation 16-7 LabVIEW Robotics Programming Guide for FRC . The default is FALSE.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . The default is 0. code is an error code. If status is TRUE. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. LabVIEW Robotics Programming Guide for FRC 16-8 ni. The default is an empty string. code is an error code. it runs normally and sets its own error status in error out. If an error occurs while this node runs. error in (no error) describes error conditions that occur before this node runs. If status is TRUE. code is an error code. code is 0 or a warning code. CameraDevRef Out returns the reference to the camera. source specifies the origin of the error or warning and is. The default is 0. If an error occurred before this node runs. CameraStatus describes the error status that this VI or function produces. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning.Chapter 16 Camera Properties VIs code is the error or warning code. code is the error or warning code. the name of the node that produced the error or warning. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is 0 or a warning code. If status is FALSE. If status is FALSE. in most cases. This node runs normally only if no error occurred before this node runs. the node passes the error in (no error) value to error out. code is the error or warning code. The default is no error. code is 0 or a warning code. in most cases. If status is FALSE. If status is TRUE. The default is FALSE. Camera Address returns the IP address of the camera. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. the name of the node that produced the error or warning. The default is an empty string. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran.vi Returns the frequency.Chapter 16 Camera Properties VIs Exposure Priority returns whether the camera prioritizes the frame rate or image quality when setting the exposure. Camera Address specifies the IP address of the camera you want to use. code is an error code. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. which is the IP address to which the Axis camera is set by default. it describes the error status that this VI or function produces. code is 0 or a warning code. error out contains error information. at which the camera you specify captures a new set of image data. The default is 192. code is the error or warning code. Otherwise. The default is FALSE. in frames per second. If status is FALSE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE.0. The default is no error. Get Frame Rate. CameraStatus describes the error status before this VI or function runs. in most cases. Use the VI to open this reference. CameraDevRef specifies a reference to the camera you want to use. error out contains the same error information. © National Instruments Corporation 16-9 LabVIEW Robotics Programming Guide for FRC .168.90. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

source specifies the origin of the error or warning and is. it runs normally and sets its own error status in error out. LabVIEW Robotics Programming Guide for FRC 16-10 ni. code is 0 or a warning code. The default is 0. code is an error code. code is 0 or a warning code. If an error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning.com . in most cases. The default is an empty string. If status is FALSE. Camera Address returns the IP address of the camera. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If status is FALSE. If an error occurs while this node runs. If status is FALSE.Chapter 16 Camera Properties VIs code is the error or warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning. If status is TRUE. This node runs normally only if no error occurred before this node runs. in most cases. If status is TRUE. code is an error code. the node passes the error in (no error) value to error out. code is an error code. source specifies the origin of the error or warning and is. code is 0 or a warning code. code is the error or warning code. CameraDevRef Out returns the reference to the camera. in most cases. source specifies the origin of the error or warning and is. error in (no error) describes error conditions that occur before this node runs. CameraStatus describes the error status that this VI or function produces. The default is an empty string. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is FALSE. The default is no error. the name of the node that produced the error or warning. The default is 0. code is the error or warning code.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. at which the camera captures a new set of image data.Chapter 16 Camera Properties VIs Frame Rate (fps) returns the frequency. Otherwise. source specifies the origin of the error or warning and is. error out contains the same error information. The default is no error. The default is 192. code is an error code. in frames per second.0. © National Instruments Corporation 16-11 LabVIEW Robotics Programming Guide for FRC . code is the error or warning code. Camera Address specifies the IP address of the camera you want to use. The higher the level of image compression. CameraDevRef specifies a reference to the camera you want to use. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Get Image Compression. the smaller the file size but the lower the image quality. code is 0 or a warning code.168.vi Returns the level of compression of the image from the camera. the name of the node that produced the error or warning. in most cases.90. If status is FALSE. If error in indicates that an error occurred before this VI or function ran. The default is FALSE. error out contains error information. Use the VI to open this reference. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. which is the IP address to which the Axis camera is set by default. CameraStatus describes the error status before this VI or function runs. it describes the error status that this VI or function produces.

the name of the node that produced the error or warning. the node passes the error in (no error) value to error out. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. source specifies the origin of the error or warning and is. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is FALSE. error in (no error) describes error conditions that occur before this node runs. code is an error code. code is the error or warning code. If status is TRUE. CameraStatus describes the error status that this VI or function produces. LabVIEW Robotics Programming Guide for FRC 16-12 ni. in most cases. If status is TRUE. If status is FALSE. it runs normally and sets its own error status in error out. The default is an empty string.com . code is an error code. CameraDevRef Out returns the reference to the camera. This node runs normally only if no error occurred before this node runs. The default is 0. The default is no error. Camera Address returns the IP address of the camera. If status is FALSE. code is the error or warning code. code is 0 or a warning code.Chapter 16 Camera Properties VIs code is the error or warning code. the name of the node that produced the error or warning. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. If an error occurred before this node runs. The default is 0. in most cases. If status is TRUE. The default is an empty string. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is 0 or a warning code. source specifies the origin of the error or warning and is. code is an error code. code is 0 or a warning code. source specifies the origin of the error or warning and is.

in most cases. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. Get Image Size.0. code is the error or warning code. code is 0 or a warning code. If status is TRUE. it describes the error status that this VI or function produces.90. CameraStatus describes the error status before this VI or function runs. The default is 192.vi Returns the size of the image the camera you specify acquired. Camera Address specifies the IP address of the camera you want to use. If error in indicates that an error occurred before this VI or function ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains error information. the name of the node that produced the error or warning. Use the VI to open this reference. Otherwise. code is the error or warning code. If status is TRUE. If status is FALSE. If status is FALSE. which is the IP address to which the Axis camera is set by default. code is 0 or a warning code. © National Instruments Corporation 16-13 LabVIEW Robotics Programming Guide for FRC . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. The default is 0. The default is no error. code is an error code. The default is FALSE.168.Chapter 16 Camera Properties VIs Compression returns the level of image compression. error out contains the same error information. CameraDevRef specifies a reference to the camera you want to use.

If status is FALSE.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. error in (no error) describes error conditions that occur before this node runs. source specifies the origin of the error or warning and is. code is an error code. code is 0 or a warning code. of the image. code is the error or warning code. If status is TRUE. the node passes the error in (no error) value to error out. code is an error code. CameraStatus describes the error status that this VI or function produces. The default is 0. source specifies the origin of the error or warning and is. code is 0 or a warning code. in most cases. in most cases. the name of the node that produced the error or warning. If an error occurred before this node runs. in pixels. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 16-14 ni. Image Size returns the size. CameraDevRef Out returns the reference to the camera. The default is an empty string. The default is an empty string.com . Camera Address returns the IP address of the camera. The default is FALSE. the name of the node that produced the error or warning. This node runs normally only if no error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. in most cases. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it runs normally and sets its own error status in error out. If status is FALSE. The default is no error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.

which is the IP address to which the Axis camera is set by default.0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. If status is TRUE. CameraStatus describes the error status before this VI or function runs. If status is FALSE. The default is 192. code is the error or warning code. it describes the error status that this VI or function produces. the name of the node that produced the error or warning. code is an error code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Use the VI to open this reference.Chapter 16 Camera Properties VIs error out contains error information. Otherwise. The default is 0. If error in indicates that an error occurred before this VI or function ran. code is 0 or a warning code. The default is no error. If status is FALSE. code is an error code. code is the error or warning code. code is 0 or a warning code. If status is TRUE. Get Sharpness. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.168. source specifies the origin of the error or warning and is. © National Instruments Corporation 16-15 LabVIEW Robotics Programming Guide for FRC . The default is FALSE. error out contains the same error information. CameraDevRef specifies a reference to the camera you want to use.90.vi Returns the sharpness setting of the camera you specify. Camera Address specifies the IP address of the camera you want to use.

Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE. code is an error code. If status is TRUE.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is.com . the name of the node that produced the error or warning. the name of the node that produced the error or warning. error in (no error) describes error conditions that occur before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is the error or warning code. CameraStatus describes the error status that this VI or function produces. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. CameraDevRef Out returns the reference to the camera. code is 0 or a warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is FALSE. This node runs normally only if no error occurred before this node runs. The default is no error. Camera Address returns the IP address of the camera. it runs normally and sets its own error status in error out. If an error occurs while this node runs. source specifies the origin of the error or warning and is. in most cases. Sharpness can return a value between 0 and 100. The default is 0. code is an error code. LabVIEW Robotics Programming Guide for FRC 16-16 ni. where 0 indicates the least sharp setting and 100 indicates the sharpest setting. Sharpness returns the sharpness setting of the camera. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If an error occurred before this node runs. If status is FALSE. in most cases. the name of the node that produced the error or warning. the node passes the error in (no error) value to error out. in most cases. The default is an empty string.

CameraDevRef specifies a reference to the camera you want to use.90. the name of the node that produced the error or warning. If status is FALSE. which is the IP address to which the Axis camera is set by default. code is 0 or a warning code. code is the error or warning code. Get White Balance. If status is FALSE. code is an error code. code is 0 or a warning code.Chapter 16 Camera Properties VIs error out contains error information. code is an error code. it describes the error status that this VI or function produces. The default is no error. in most cases. Use the VI to open this reference.vi Returns the white balance setting of the camera you specify. Otherwise. If status is TRUE. CameraStatus describes the error status before this VI or function runs. The default is FALSE.0. If status is TRUE. © National Instruments Corporation 16-17 LabVIEW Robotics Programming Guide for FRC . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 192.168. Camera Address specifies the IP address of the camera you want to use. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. The default is 0. code is the error or warning code. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. in most cases. If status is FALSE. the name of the node that produced the error or warning. The default is no error. If status is TRUE. it runs normally and sets its own error status in error out. Camera Address returns the IP address of the camera. The default is 0. code is 0 or a warning code. in most cases. The default is an empty string. White Balance returns the white balance setting of the camera. code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. CameraStatus describes the error status that this VI or function produces. in most cases. If status is TRUE. The default is an empty string. The default is FALSE. the node passes the error in (no error) value to error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. This node runs normally only if no error occurred before this node runs. CameraDevRef Out returns the reference to the camera. If an error occurred before this node runs. code is the error or warning code.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. LabVIEW Robotics Programming Guide for FRC 16-18 ni. code is an error code.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. code is an error code. If status is FALSE. source specifies the origin of the error or warning and is. error in (no error) describes error conditions that occur before this node runs.

code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. in most cases. Otherwise. If status is FALSE.90. © National Instruments Corporation 16-19 LabVIEW Robotics Programming Guide for FRC . code is the error or warning code. code is 0 or a warning code. source specifies the origin of the error or warning and is. code is an error code. CameraDevRef specifies a reference to the camera you want to use. If status is FALSE. CameraStatus describes the error status before this VI or function runs. The default is FALSE. which is the IP address to which the Axis camera is set by default. the name of the node that produced the error or warning. Camera Address specifies the IP address of the camera you want to use.168. The default is no error.vi Specifies the brightness setting of the camera you specify.Chapter 16 Camera Properties VIs error out contains error information. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 192. The default is 0. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces.0. code is 0 or a warning code. Set Brightness. error out contains the same error information. code is an error code. Use the VI to open this reference.

If status is FALSE. The default is no error. code is the error or warning code. Camera Address returns the IP address of the camera. Use exception control to treat what is normally an error as no error or to treat a warning as an error. source specifies the origin of the error or warning and is.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. LabVIEW Robotics Programming Guide for FRC 16-20 ni. If status is TRUE. You can specify a value between 0 and 100. The default is 50. source specifies the origin of the error or warning and is. code is 0 or a warning code.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. This node runs normally only if no error occurred before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. CameraDevRef Out returns the reference to the camera. code is the error or warning code. the name of the node that produced the error or warning. the node passes the error in (no error) value to error out. in most cases. The default is an empty string. If status is FALSE. If status is TRUE. where 0 specifies the darkest setting and 100 specifies the brightest setting. Brightness specifies the brightness setting of the camera. in most cases. in most cases. If an error occurred before this node runs. the name of the node that produced the error or warning. If an error occurs while this node runs. The default is an empty string. it runs normally and sets its own error status in error out. The default is 0. code is 0 or a warning code. CameraStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. The default is FALSE. error in (no error) describes error conditions that occur before this node runs.

90. If error in indicates that an error occurred before this VI or function ran. The default is 0. CameraStatus describes the error status before this VI or function runs. code is an error code. which is the IP address to which the Axis camera is set by default. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. The default is 192.168. Set Color Level. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. code is the error or warning code.Chapter 16 Camera Properties VIs error out contains error information. If status is TRUE. © National Instruments Corporation 16-21 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. Use the VI to open this reference. Camera Address specifies the IP address of the camera you want to use. code is an error code. in most cases. If status is FALSE. code is 0 or a warning code. The default is no error. If status is FALSE. code is the error or warning code. Otherwise.vi Specifies the color level setting of the camera you specify. error out contains the same error information. CameraDevRef specifies a reference to the camera you want to use.0. The default is FALSE. code is 0 or a warning code. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

LabVIEW Robotics Programming Guide for FRC 16-22 ni. The default is no error. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the node passes the error in (no error) value to error out. The default is 0. the name of the node that produced the error or warning. code is 0 or a warning code. You can specify a value between 0 and 100. the name of the node that produced the error or warning. If status is TRUE. in most cases. it runs normally and sets its own error status in error out. source specifies the origin of the error or warning and is. If status is TRUE. Color Level specifies the color level setting of the camera. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is an empty string. code is the error or warning code. source specifies the origin of the error or warning and is. This node runs normally only if no error occurred before this node runs. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurred before this node runs. The default is 50. error in (no error) describes error conditions that occur before this node runs. in most cases. CameraStatus describes the error status that this VI or function produces. The default is FALSE. Camera Address returns the IP address of the camera.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. If status is FALSE. If status is FALSE. code is 0 or a warning code. the name of the node that produced the error or warning. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is an empty string.com . code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If an error occurs while this node runs. CameraDevRef Out returns the reference to the camera. in most cases.

vi Specifies the exposure setting of the camera you specify. the name of the node that produced the error or warning. Camera Address specifies the IP address of the camera you want to use. CameraDevRef specifies a reference to the camera you want to use. Use the VI to open this reference. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. Set Exposure. The default is 0. If status is FALSE. in most cases. error out contains the same error information. CameraStatus describes the error status before this VI or function runs. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. If status is TRUE. code is the error or warning code. © National Instruments Corporation 16-23 LabVIEW Robotics Programming Guide for FRC . The default is FALSE. The default is 192.168. code is 0 or a warning code. code is the error or warning code. The default is no error. If error in indicates that an error occurred before this VI or function ran.90. which is the IP address to which the Axis camera is set by default. code is an error code.0. code is an error code.Chapter 16 Camera Properties VIs error out contains error information. source specifies the origin of the error or warning and is.

CameraStatus describes the error status that this VI or function produces. the node passes the error in (no error) value to error out. in most cases. If status is FALSE. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 16-24 ni. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error in (no error) describes error conditions that occur before this node runs. code is an error code. in most cases. Camera Address returns the IP address of the camera. This node runs normally only if no error occurred before this node runs. The default is an empty string.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. If an error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Exposure specifies the exposure setting of the camera. code is an error code. The default is no error.com . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is 0 or a warning code. the name of the node that produced the error or warning. If status is TRUE. If status is TRUE. code is the error or warning code. The default is FALSE. code is 0 or a warning code. in most cases. the name of the node that produced the error or warning. The default is 0. Use exception control to treat what is normally an error as no error or to treat a warning as an error. source specifies the origin of the error or warning and is. CameraDevRef Out returns the reference to the camera. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. it runs normally and sets its own error status in error out. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. If an error occurs while this node runs. The default is an empty string.

vi Specifies whether the camera you specify prioritizes the frame rate or image quality when setting the exposure. error out contains the same error information. code is 0 or a warning code. resulting in increased motion blur.Chapter 16 Camera Properties VIs error out contains error information. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. Set Exposure Priority. Otherwise. which is the IP address to which the Axis camera is set by default. Use the VI to open this reference. CameraStatus describes the error status before this VI or function runs. If error in indicates that an error occurred before this VI or function ran. © National Instruments Corporation 16-25 LabVIEW Robotics Programming Guide for FRC . it describes the error status that this VI or function produces. the amount of noise in the image might increase. in most cases. code is the error or warning code. The default is no error. If the camera prioritizes the frame rate.90. the frame rate might decrease. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. source specifies the origin of the error or warning and is.0. If the camera prioritizes image quality.168. the name of the node that produced the error or warning. Camera Address specifies the IP address of the camera you want to use. CameraDevRef specifies a reference to the camera you want to use. The default is 192.

This node runs normally only if no error occurred before this node runs. The default is no error. code is the error or warning code. code is 0 or a warning code. If status is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is 0. Exposure Priority specifies whether the camera prioritizes the frame rate or image quality when setting the exposure.Chapter 16 Camera Properties VIs code is the error or warning code. code is 0 or a warning code. The default is 0. code is an error code. If status is FALSE. If status is TRUE. The default is FALSE. source specifies the origin of the error or warning and is. CameraDevRef Out returns the reference to the camera. it runs normally and sets its own error status in error out. code is an error code. If status is FALSE. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error.com . LabVIEW Robotics Programming Guide for FRC 16-26 ni. the name of the node that produced the error or warning. in most cases. error in (no error) describes error conditions that occur before this node runs. Camera Address returns the IP address of the camera. If an error occurred before this node runs. code is an error code. The default is an empty string. code is the error or warning code. CameraStatus describes the error status that this VI or function produces. If status is TRUE. The default is an empty string. the name of the node that produced the error or warning. code is 0 or a warning code. the node passes the error in (no error) value to error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. If an error occurs while this node runs.

© National Instruments Corporation 16-27 LabVIEW Robotics Programming Guide for FRC . The default is 192. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. code is the error or warning code. Set Frame Rate. error out contains the same error information. error out contains error information. CameraStatus describes the error status before this VI or function runs. Camera Address specifies the IP address of the camera you want to use. If error in indicates that an error occurred before this VI or function ran. in frames per second. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the VI to open this reference. code is 0 or a warning code.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. at which you want the camera you specify to capture a new set of image data.90. Otherwise. the name of the node that produced the error or warning.168. If status is FALSE. code is an error code. source specifies the origin of the error or warning and is. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. The default is FALSE. The default is no error. CameraDevRef specifies a reference to the camera you want to use. the name of the node that produced the error or warning.vi Specifies the frequency. in most cases.0. which is the IP address to which the Axis camera is set by default.

If an error occurred before this node runs. code is the error or warning code. Camera Address returns the IP address of the camera. code is an error code. source specifies the origin of the error or warning and is. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in frames per second. The default is no error. If status is FALSE.com . Use exception control to treat what is normally an error as no error or to treat a warning as an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is 0 or a warning code. code is an error code. This node runs normally only if no error occurred before this node runs. the name of the node that produced the error or warning. in most cases. The default is 0. LabVIEW Robotics Programming Guide for FRC 16-28 ni. The default is FALSE. The default is 30. CameraDevRef Out returns the reference to the camera.Chapter 16 Camera Properties VIs code is the error or warning code. source specifies the origin of the error or warning and is. If status is TRUE. the name of the node that produced the error or warning. The default is an empty string. The default is 0. in most cases. If status is TRUE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. code is 0 or a warning code. Frame Rate (fps) specifies the frequency. CameraStatus describes the error status that this VI or function produces. If status is TRUE. The default is an empty string. code is an error code. If an error occurs while this node runs. the node passes the error in (no error) value to error out. at which the camera captures a new set of image data. If status is FALSE. it runs normally and sets its own error status in error out.

The higher the level of image compression. If status is FALSE. Use the VI to open this reference. error out contains error information. the name of the node that produced the error or warning. The default is 192. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. which is the IP address to which the Axis camera is set by default. the smaller the file size but the lower the image quality. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. CameraStatus describes the error status before this VI or function runs. The default is no error. in most cases. in most cases. Set Image Compression. code is 0 or a warning code. CameraDevRef specifies a reference to the camera you want to use. code is the error or warning code. © National Instruments Corporation 16-29 LabVIEW Robotics Programming Guide for FRC .0.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. error out contains the same error information. the name of the node that produced the error or warning. If status is TRUE. Otherwise. it describes the error status that this VI or function produces.90. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is.168. Camera Address specifies the IP address of the camera you want to use.vi Sets the level of compression of the image from the camera. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

CameraStatus describes the error status that this VI or function produces. Camera Address returns the IP address of the camera. code is 0 or a warning code. code is 0 or a warning code. If status is TRUE. If status is TRUE. code is the error or warning code. code is an error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error.com . The default is an empty string. This node runs normally only if no error occurred before this node runs. code is an error code. source specifies the origin of the error or warning and is. The default is 30. If an error occurred before this node runs. the node passes the error in (no error) value to error out. If an error occurs while this node runs. If status is FALSE. If status is TRUE. in most cases. in most cases. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. LabVIEW Robotics Programming Guide for FRC 16-30 ni. The default is 0. The default is FALSE. the name of the node that produced the error or warning.Chapter 16 Camera Properties VIs code is the error or warning code. Compression specifies the level of image compression. CameraDevRef Out returns the reference to the camera. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. code is an error code. error in (no error) describes error conditions that occur before this node runs. code is the error or warning code. it runs normally and sets its own error status in error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. The default is an empty string. the name of the node that produced the error or warning. If status is FALSE. If status is FALSE. source specifies the origin of the error or warning and is.

The default is 192. The default is no error. If status is TRUE. code is an error code. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is.0.90. error out contains error information. in most cases. in most cases. CameraDevRef specifies a reference to the camera you want to use. code is the error or warning code. source specifies the origin of the error or warning and is. © National Instruments Corporation 16-31 LabVIEW Robotics Programming Guide for FRC . which is the IP address to which the Axis camera is set by default. it describes the error status that this VI or function produces.168. the name of the node that produced the error or warning. Set Image Size. the name of the node that produced the error or warning. If status is TRUE. Camera Address specifies the IP address of the camera you want to use. If error in indicates that an error occurred before this VI or function ran. CameraStatus describes the error status before this VI or function runs. error out contains the same error information. code is 0 or a warning code.vi Specifies the size of the image you want the camera you specify to acquire. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. Use the VI to open this reference. If status is FALSE. code is the error or warning code. code is 0 or a warning code. Otherwise.

If status is TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is FALSE. This node runs normally only if no error occurred before this node runs. of the image you want to acquire. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . Camera Address returns the IP address of the camera. code is the error or warning code. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is TRUE. error in (no error) describes error conditions that occur before this node runs. The default is an empty string. The default is FALSE. code is 0 or a warning code. the node passes the error in (no error) value to error out. code is an error code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Image Size specifies the size. in pixels. If status is FALSE. code is the error or warning code. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is no error. If an error occurs while this node runs. The default is an empty string. The default is 0.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. If an error occurred before this node runs. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. LabVIEW Robotics Programming Guide for FRC 16-32 ni. the name of the node that produced the error or warning. in most cases. CameraStatus describes the error status that this VI or function produces. in most cases. CameraDevRef Out returns the reference to the camera.

The default is 0. code is 0 or a warning code. If status is TRUE.168. The default is no error. Set Sharpness. the name of the node that produced the error or warning. code is 0 or a warning code.Chapter 16 Camera Properties VIs error out contains error information. The default is FALSE. code is the error or warning code. code is the error or warning code. If error in indicates that an error occurred before this VI or function ran. If status is TRUE.0. Otherwise.vi Specifies the sharpness setting of the camera you specify. it describes the error status that this VI or function produces. error out contains the same error information. If status is FALSE.90. CameraStatus describes the error status before this VI or function runs. in most cases. If status is FALSE. © National Instruments Corporation 16-33 LabVIEW Robotics Programming Guide for FRC . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Camera Address specifies the IP address of the camera you want to use. The default is 192. Use the VI to open this reference. CameraDevRef specifies a reference to the camera you want to use. code is an error code. which is the IP address to which the Axis camera is set by default. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code.

the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. in most cases. If an error occurred before this node runs. code is an error code. The default is 0. If status is TRUE. CameraStatus describes the error status that this VI or function produces. The default is an empty string. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Sharpness specifies the sharpness setting of the camera. You can specify a value between 0 and 100. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. The default is an empty string. source specifies the origin of the error or warning and is. The default is no error. the name of the node that produced the error or warning. If status is FALSE. where 0 specifies the least sharp setting and 100 specifies the sharpest setting. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out. The default is FALSE. source specifies the origin of the error or warning and is. in most cases. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. This node runs normally only if no error occurred before this node runs. If status is TRUE. If an error occurs while this node runs. LabVIEW Robotics Programming Guide for FRC 16-34 ni. CameraDevRef Out returns the reference to the camera. in most cases. the name of the node that produced the error or warning. code is the error or warning code.com . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is 0 or a warning code. Camera Address returns the IP address of the camera. code is an error code. If status is FALSE. error in (no error) describes error conditions that occur before this node runs. The default is 0.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is.

The default is FALSE.90. The default is 0. code is 0 or a warning code.vi Specifies the white balance setting of the camera you specify. Set White Balance. CameraStatus describes the error status before this VI or function runs. The default is 192. Otherwise. the name of the node that produced the error or warning. which is the IP address to which the Axis camera is set by default. error out contains the same error information.Chapter 16 Camera Properties VIs error out contains error information. code is an error code. © National Instruments Corporation 16-35 LabVIEW Robotics Programming Guide for FRC . code is an error code. in most cases. The default is no error. code is 0 or a warning code. code is the error or warning code.0.168. If status is FALSE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. Use the VI to open this reference. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. it describes the error status that this VI or function produces. CameraDevRef specifies a reference to the camera you want to use. code is the error or warning code. If status is TRUE. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Camera Address specifies the IP address of the camera you want to use. If error in indicates that an error occurred before this VI or function ran.

code is the error or warning code.com . code is the error or warning code. in most cases. the name of the node that produced the error or warning. CameraDevRef Out returns the reference to the camera. The default is an empty string. in most cases. Camera Address returns the IP address of the camera. the node passes the error in (no error) value to error out. code is 0 or a warning code. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If an error occurred before this node runs. The default is FALSE. in most cases. error in (no error) describes error conditions that occur before this node runs. White Balance specifies the white balance setting of the camera. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. the name of the node that produced the error or warning. If status is FALSE. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This node runs normally only if no error occurred before this node runs.Chapter 16 Camera Properties VIs source specifies the origin of the error or warning and is. If an error occurs while this node runs. The default is no error. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. LabVIEW Robotics Programming Guide for FRC 16-36 ni. The default is 0. The default is an empty string. CameraStatus describes the error status that this VI or function produces. If status is FALSE. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. code is an error code.

code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains the same error information. If status is TRUE. the name of the node that produced the error or warning. it describes the error status that this VI or function produces. If error in indicates that an error occurred before this VI or function ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is 0 or a warning code. code is the error or warning code. © National Instruments Corporation 16-37 LabVIEW Robotics Programming Guide for FRC . in most cases. If status is FALSE. Otherwise. source specifies the origin of the error or warning and is.Chapter 16 Camera Properties VIs error out contains error information.

custom circuits. for the latest information about the Communications VIs. Use the Communications VIs to communicate with sensors. and other devices connected to the CompactRIO device. © National Instruments Corporation 17-1 LabVIEW Robotics Programming Guide for FRC . available by selecting Help»Search the LabVIEW Help.Communications VIs 17 Refer to the LabVIEW Help.

© National Instruments Corporation 18-1 LabVIEW Robotics Programming Guide for FRC . If you do not stop a running compressor with the Stop VI. If status is FALSE. for the latest information about the Compressor VIs. DevStatus describes the error status before this VI or function runs. Close. Use this VI to close each compressor reference that you open with the Open VI. code is the error or warning code. closing the reference to the compressor stops the compressor. code is 0 or a warning code. The default is 0.vi Closes the reference to the compressor you specify. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. available by selecting Help»Search the LabVIEW Help. Use the Compressor VIs to start and stop the compressor of the robot.Compressor VIs 18 Refer to the LabVIEW Help. The default is no error. Use the Open VI to create a CompressorDevRef reference cluster that you then can wire to the other Compressor VIs. The Compressor VIs manipulate a pressure switch connected to the high pressure side of the pneumatic circuit of the robot. If status is TRUE. CompressorDevRef specifies a reference to the compressor you want to use. The default is FALSE. code is an error code.

the node passes the error in (no error) value to error out. The default is an empty string. code is 0 or a warning code. This parameter acts as a real-time status control of the state of the compressor relay. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is no error. The default is FALSE. The default is 0. the name of the node that produced the error or warning. If status is FALSE. error in (no error) describes error conditions that occur before this node runs.com . the compressor is idle.Chapter 18 Compressor VIs source specifies the origin of the error or warning and is. If an error occurs while this node runs. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If Enabled is FALSE. This node runs normally only if no error occurred before this node runs. the name of the node that produced the error or warning. TaskVI specifies a reference to the RunCompressor subVI in the VI. source specifies the origin of the error or warning and is. If an error occurred before this node runs. in most cases. LabVIEW Robotics Programming Guide for FRC 18-2 ni. FIFO_relay specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. in most cases. FIFO_enabled specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. This parameter acts as a real-time status control of the compressor. Enabled specifies. that the compressor is running. The default is an empty string. when TRUE. code is an error code. it runs normally and sets its own error status in error out. If status is TRUE.

code is an error code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. GetEnableState. If status is FALSE. it describes the error status that this VI or function produces.Chapter 18 Compressor VIs error out contains error information. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. If status is FALSE. CompressorDevRef specifies a reference to the compressor you want to use. The default is an empty string. in most cases. error out contains the same error information. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. The default is no error. © National Instruments Corporation 18-3 LabVIEW Robotics Programming Guide for FRC .vi Returns the running state of the compressor and the on/off state of the compressor relay. source specifies the origin of the error or warning and is. If status is TRUE. code is 0 or a warning code. the name of the node that produced the error or warning. The default is 0. code is an error code. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. code is the error or warning code. If status is TRUE. DevStatus describes the error status before this VI or function runs. in most cases. code is 0 or a warning code.

error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. FIFO_relay specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. the compressor is idle. DevStatus describes the error status that this VI or function produces. Use exception control to treat what is normally an error as no error or to treat a warning as an error.com .Chapter 18 Compressor VIs FIFO_enabled specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. This node runs normally only if no error occurred before this node runs. code is 0 or a warning code. LabVIEW Robotics Programming Guide for FRC 18-4 ni. The default is an empty string. in most cases. The default is no error. TaskVI specifies a reference to the RunCompressor subVI in the VI. CompressorDevRef returns a reference to the compressor. If status is TRUE. If Enabled is FALSE. This parameter acts as a real-time status control of the compressor. that the compressor is running. The default is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. the node passes the error in (no error) value to error out. when TRUE. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is the error or warning code. If an error occurred before this node runs. The default is 0. This parameter acts as a real-time status control of the state of the compressor relay. Enabled specifies. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. source specifies the origin of the error or warning and is. If status is FALSE. If an error occurs while this node runs.

© National Instruments Corporation 18-5 LabVIEW Robotics Programming Guide for FRC . code is 0 or a warning code. code is an error code. error out contains error information. code is 0 or a warning code. Compressor State returns TRUE if the compressor relay is on and FALSE if the compressor relay is off.Chapter 18 Compressor VIs code is the error or warning code. code is an error code. FIFO_enabled returns a reference to the FIFO. the name of the node that produced the error or warning. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is FALSE. Otherwise. source specifies the origin of the error or warning and is. FIFO_relay returns a reference to the FIFO. the name of the node that produced the error or warning. error out contains the same error information. If status is TRUE. in most cases. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. code is the error or warning code. source specifies the origin of the error or warning and is. TaskVI returns a reference to the RunCompressor subVI in the VI. Enabled returns TRUE if the compressor is running and FALSE if the compressor is idle. Enabled returns TRUE if the compressor is running and FALSE if the compressor is idle. If status is FALSE. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. This parameter acts as a real-time status indicator of the compressor. This parameter acts as a real-time status indicator of the state of the compressor relay.

it runs normally and sets its own error status in error out. The default is Relay 1. you can use the Start and Stop VIs to start and stop the compressor. error in (no error) describes error conditions that occur before this node runs.Chapter 18 Compressor VIs Open. You also can select Default to specify the slot of the default digital module. Relay Channel specifies the channel of the DIO Module to which the relay is connected. Pressure Switch DIO Channel specifies the channel on the Pressure Switch DIO Module to which the pressure switch is connected. If an error occurred before this node runs. This node runs normally only if no error occurred before this node runs.com . If an error occurs while this node runs. Select Slot 4 or Slot 6. If Relay Channel is Invalid. The default is Slot 4. The default is no error. respectively. If Pressure Switch DIO Channel is Invalid. this VI returns an error. Select a value between Relay 1 and Relay 8. Use exception control to treat what is normally an error as no error or to treat a warning as an error. You must open a reference before using any other VIs on this palette. After you open a reference to the compressor. The default digital module is the first digital module. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. LabVIEW Robotics Programming Guide for FRC 18-6 ni. The default is Slot 4. the node passes the error in (no error) value to error out. Relay Module specifies the slot number on the CompactRIO device of the digital module you want to use for the relay. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Select Slot 4 or Slot 6. The default digital module is the first digital module. or the module in slot 4. The default is DIO 1. or the module in slot 4.vi Opens a reference to the compressor you specify. Select a value between DIO 1 and DIO 14. You also can select Default to specify the slot of the default digital module. this VI returns an error. Pressure Switch DIO Module specifies the digital module on the CompactRIO device to which the pressure switch is connected.

error out contains the same error information. TaskVI returns a reference to the RunCompressor subVI in the VI. The default is FALSE. If status is TRUE. source specifies the origin of the error or warning and is. This parameter acts as a real-time status indicator of the state of the compressor relay. in most cases. the name of the node that produced the error or warning. This parameter acts as a real-time status indicator of the compressor. If status is FALSE. © National Instruments Corporation 18-7 LabVIEW Robotics Programming Guide for FRC . CompressorDevRef returns a reference to the compressor. in most cases. code is 0 or a warning code. code is an error code. The default is 0. code is the error or warning code. code is 0 or a warning code. code is an error code. source specifies the origin of the error or warning and is. FIFO_relay returns a reference to the FIFO. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Otherwise. code is the error or warning code. FIFO_enabled returns a reference to the FIFO. it describes the error status that this VI or function produces. The default is an empty string. error out contains error information. Enabled returns TRUE if the compressor is running and FALSE if the compressor is idle.Chapter 18 Compressor VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. If status is FALSE. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

This parameter acts as a real-time status control of the compressor. code is an error code. that the compressor is running. If Enabled is FALSE. code is an error code. LabVIEW Robotics Programming Guide for FRC 18-8 ni. source specifies the origin of the error or warning and is. The default is FALSE. Start. the name of the node that produced the error or warning.vi Starts the compressor thread that you specify. in most cases. code is 0 or a warning code. If status is FALSE. FIFO_enabled specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. The default is no error. If status is FALSE. The default is an empty string. the name of the node that produced the error or warning. the compressor is idle. in most cases.Chapter 18 Compressor VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Enabled specifies. Use the Open VI to open a reference to the compressor before you use this VI. CompressorDevRef specifies a reference to the compressor you want to use. If status is TRUE. If status is TRUE. code is 0 or a warning code. source specifies the origin of the error or warning and is. when TRUE. DevStatus describes the error status before this VI or function runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . code is the error or warning code. The default is 0. code is the error or warning code.

error in (no error) describes error conditions that occur before this node runs. If status is FALSE.Chapter 18 Compressor VIs FIFO_relay specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. code is the error or warning code. code is an error code. If an error occurs while this node runs. the node passes the error in (no error) value to error out. The default is 0. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. This parameter acts as a real-time status control of the state of the compressor relay. © National Instruments Corporation 18-9 LabVIEW Robotics Programming Guide for FRC . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This node runs normally only if no error occurred before this node runs. code is 0 or a warning code. CompressorDevRef returns a reference to the compressor. code is 0 or a warning code. If status is TRUE. source specifies the origin of the error or warning and is. If status is FALSE. in most cases. the name of the node that produced the error or warning. code is an error code. DevStatus describes the error status that this VI or function produces. TaskVI specifies a reference to the RunCompressor subVI in the VI. If an error occurred before this node runs. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is TRUE. source specifies the origin of the error or warning and is. The default is an empty string. The default is no error. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning.

Enabled returns TRUE if the compressor is running and FALSE if the compressor is idle. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. code is the error or warning code. DevStatus describes the error status before this VI or function runs. FIFO_relay returns a reference to the FIFO. If status is FALSE.com . If status is TRUE. This parameter acts as a real-time status indicator of the state of the compressor relay. LabVIEW Robotics Programming Guide for FRC 18-10 ni. error out contains error information. Otherwise. the name of the node that produced the error or warning. TaskVI returns a reference to the RunCompressor subVI in the VI. The default is no error. Stop. it describes the error status that this VI or function produces.vi Stops the compressor that you specify. CompressorDevRef specifies a reference to the compressor you want to use.Chapter 18 Compressor VIs FIFO_enabled returns a reference to the FIFO. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This parameter acts as a real-time status indicator of the compressor. error out contains the same error information. code is 0 or a warning code. in most cases. code is an error code.

TaskVI specifies a reference to the RunCompressor subVI in the VI. when TRUE. code is an error code. © National Instruments Corporation 18-11 LabVIEW Robotics Programming Guide for FRC . source specifies the origin of the error or warning and is. code is the error or warning code. This parameter acts as a real-time status control of the state of the compressor relay. The default is FALSE. error in (no error) describes error conditions that occur before this node runs. code is 0 or a warning code. the node passes the error in (no error) value to error out. This parameter acts as a real-time status control of the compressor.Chapter 18 Compressor VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. The default is an empty string. The default is FALSE. If status is TRUE. the name of the node that produced the error or warning. The default is no error. code is an error code. This node runs normally only if no error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If an error occurred before this node runs. If status is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. FIFO_relay specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. FIFO_enabled specifies a reference to a real-time FIFO and overwrites the oldest data element when the FIFO is full. Enabled specifies. code is 0 or a warning code. the compressor is idle. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is 0. If an error occurs while this node runs. code is the error or warning code. in most cases. If Enabled is FALSE. it runs normally and sets its own error status in error out. The default is 0. that the compressor is running.

Chapter 18 Compressor VIs source specifies the origin of the error or warning and is. If error in indicates that an error occurred before this VI or function ran. code is an error code. This parameter acts as a real-time status indicator of the compressor. If status is FALSE. FIFO_relay returns a reference to the FIFO. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. CompressorDevRef returns a reference to the compressor. LabVIEW Robotics Programming Guide for FRC 18-12 ni. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. If status is TRUE.com . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. code is the error or warning code. FIFO_enabled returns a reference to the FIFO. error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. code is 0 or a warning code. If status is TRUE. error out contains the same error information. The default is an empty string. the name of the node that produced the error or warning. TaskVI returns a reference to the RunCompressor subVI in the VI. in most cases. the name of the node that produced the error or warning. code is the error or warning code. If status is FALSE. This parameter acts as a real-time status indicator of the state of the compressor relay. Otherwise. in most cases. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces. in most cases. Enabled returns TRUE if the compressor is running and FALSE if the compressor is idle.

both digital sources are digital inputs. the Get VI returns a Stopped value of TRUE. You also can use the Counter VIs with gear tooth sensors to determine the speed of a rotating component such as a wheel on a robot. You can use the Counter VIs to count up or count down with the different parts of a signal. If the counter is stopped. Use the Counter VIs to count the number of pulses in a signal. and this example VI closes the counter reference. available by selecting Help»Search the LabVIEW Help. Use the Open VI to create a CounterDevRef reference cluster that you then can wire to the other Counter VIs. the Get VI returns a Stopped value of FALSE. The counter stops counting. You also can calculate the frequency of a signal by measuring the period of time that elapses between edges. This example VI then opens a reference to and starts a counter. If the counter is not stopped. for the latest information about the Counter VIs. and the TRUE case of the Case structure executes.Counter VIs 19 Refer to the LabVIEW Help. The following figure demonstrates how to return the count and direction of a counter. You can configure counters to detect rising or falling edges. and © National Instruments Corporation 19-1 LabVIEW Robotics Programming Guide for FRC . In this example. This example VI uses the ToDigitalSource VI to create the digital up and down sources for the counter.

code is an error code. If you do not stop a running counter with the Stop VI.Chapter 19 Counter VIs the FALSE case of the Case structure executes. when TRUE. If status is FALSE. closes any digital inputs or analog trigger outputs used by the counter when you close the reference to the counter. Use this VI to close each counter reference that you open with the Open VI. CounterDevRef specifies a reference to the counter you want to use. The default is an empty string. closing the reference to the counter stops the counter.vi Closes the reference to the counter you specify. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the VI to open this reference. code is 0 or a warning code. CntIndex can specify a value between Ctr 0 and Ctr 7. LabVIEW Robotics Programming Guide for FRC 19-2 ni. If CntIndex is Invalid. CntIndex specifies the index of the reserved counter. The default is no error. The default is FALSE. Close. code is the error or warning code. DevStatus describes the error status before this VI or function runs. The default is 0. in most cases. Close Dependencies. source specifies the origin of the error or warning and is. this VI returns an error. If status is TRUE. the name of the node that produced the error or warning. the example VI continuously returns the count and direction of the counter until you press the Stop button on the front panel.com . In this case.

The default is an empty string. the name of the node that produced the error or warning. code is the error or warning code. If an error occurred before this node runs. If status is FALSE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. The default is FALSE. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran. it runs normally and sets its own error status in error out. code is 0 or a warning code. code is the error or warning code. in most cases. the node passes the error in (no error) value to error out. code is an error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. error out contains error information. If status is TRUE. The default is no error. This node runs normally only if no error occurred before this node runs. in most cases. The default is 0. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 19 Counter VIs error in (no error) describes error conditions that occur before this node runs. source specifies the origin of the error or warning and is. If an error occurs while this node runs. If status is FALSE. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 19-3 LabVIEW Robotics Programming Guide for FRC . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is 0 or a warning code. Otherwise. If status is TRUE.

this VI returns an error. CntIndex specifies the index of the reserved counter. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. the name of the node that produced the error or warning. DevStatus describes the error status before this VI or function runs. The default is FALSE.com .05 seconds. MaxPeriod (sec) specifies the maximum time that can elapse between pulses before the CompactRIO device considers the counter stopped. Number Samples to Average specifies the number of samples of the timer to average when calculating the period. The default is no error. Use the VI to open this reference. code is the error or warning code. code is 0 or a warning code. CntIndex can specify a value between Ctr 0 and Ctr 7. CounterDevRef in specifies a reference to the counter you want to use. The default is an empty string. If status is TRUE. Use the Get VI to determine whether the counter is stopped. If CntIndex is Invalid. in most cases.vi Configures the timer on the counter. code is an error code. The default is 1. You can specify a value between 1 and 128. The default is 0. Use this VI to specify the maximum time between pulses that can elapse before the application considers the counter stopped and to specify the number of samples of the timer to average when calculating the period. LabVIEW Robotics Programming Guide for FRC 19-4 ni. If status is FALSE.Chapter 19 Counter VIs ConfigureTimer. Perform averaging to account for mechanical imperfections. source specifies the origin of the error or warning and is.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. If CntIndex returns a value of Invalid. If status is TRUE. the name of the node that produced the error or warning. The default is FALSE. If an error occurs while this node runs. in most cases. DevStatus describes the error status that this VI or function produces. the node passes the error in (no error) value to error out. If an error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. source specifies the origin of the error or warning and is. it runs normally and sets its own error status in error out. The default is no error. the VI did not find the counter you specified. code is 0 or a warning code. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. the name of the node that produced the error or warning. The default is an empty string. CntIndex can return a value between Ctr 0 and Ctr 7. code is an error code. CounterDevRef out returns a reference to the counter. If status is TRUE. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. and this VI returns an error. © National Instruments Corporation 19-5 LabVIEW Robotics Programming Guide for FRC . code is 0 or a warning code.Chapter 19 Counter VIs error in (no error) describes error conditions that occur before this node runs. CntIndex returns the index of the reserved counter. code is the error or warning code. in most cases. code is an error code. This node runs normally only if no error occurred before this node runs. If status is FALSE.

from the counter you specify.295. in most cases. The maximum value of the counter is 4. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.vi Returns information. error out contains the same error information. The default is no error. If status is FALSE. Use the VI to open this reference. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. When the value of the counter exceeds the maximum value of Value. code is 0 or a warning code. source specifies the origin of the error or warning and is. Get. code is an error code. The Get VI returns the accumulated count from the counter unless you reset the counter with the Reset VI.294. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. Otherwise.Chapter 19 Counter VIs error out contains error information. code is the error or warning code. it describes the error status that this VI or function produces. LabVIEW Robotics Programming Guide for FRC 19-6 ni.com . If status is TRUE. If error in indicates that an error occurred before this VI or function ran. such as number of counts and the period. the name of the node that produced the error or warning.967. CounterDevRef in specifies a reference to the counter you want to use. DevStatus describes the error status before this VI or function runs. the counter resets to zero automatically and continues counting.

source specifies the origin of the error or warning and is. code is an error code. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is FALSE. the name of the node that produced the error or warning. The default is an empty string. in most cases. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error. error in (no error) describes error conditions that occur before this node runs. If an error occurs while this node runs. code is the error or warning code. The default is no error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. © National Instruments Corporation 19-7 LabVIEW Robotics Programming Guide for FRC . CounterDevRef out returns a reference to the counter. The default is 0. code is an error code. code is 0 or a warning code. the node passes the error in (no error) value to error out. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. CntIndex specifies the index of the reserved counter. in most cases. this VI returns an error.Chapter 19 Counter VIs code is the error or warning code. If status is TRUE. This node runs normally only if no error occurred before this node runs. CntIndex can specify a value between Ctr 0 and Ctr 7. The default is FALSE. The default is an empty string. If status is TRUE. If an error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If CntIndex is Invalid. code is the error or warning code. it runs normally and sets its own error status in error out. code is 0 or a warning code. If status is FALSE. If status is TRUE.

code is 0 or a warning code. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. error out contains the same error information. CntIndex returns the index of the reserved counter. Period (sec) returns the average period. If status is FALSE. code is the error or warning code.Chapter 19 Counter VIs source specifies the origin of the error or warning and is. and this VI returns an error. between pulses of the counter. in most cases. Otherwise. If you know the linear or rotational distance that the robot moved between pulses. Value returns the count from the counter. CntIndex can return a value between Ctr 0 and Ctr 7. the name of the node that produced the error or warning.com . you can use the period to determine linear or rotational velocity. it describes the error status that this VI or function produces. code is an error code. If error in indicates that an error occurred before this VI or function ran. Direction returns FALSE if the counter last moved in a direction corresponding to a decrease in the count. Stopped returns TRUE if the counter is stopped. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 19-8 ni. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Direction returns TRUE if the counter last moved in a direction corresponding to an increase in the count. error out contains error information. If CntIndex returns a value of Invalid. in seconds. the VI did not find the counter you specified. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. The CompactRIO device considers a counter stopped if the CompactRIO device does not detect a new pulse and the number of counts does not change during the period you specify with the VI.

The default is FALSE. the name of the node that produced the error or warning. DevStatus describes the error status before this VI or function runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurred before this node runs. code is the error or warning code. it runs normally and sets its own error status in error out. The default is 0. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is an empty string. Use the Stop VI if you want to stop the counter. If status is TRUE. © National Instruments Corporation 19-9 LabVIEW Robotics Programming Guide for FRC . This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the node passes the error in (no error) value to error out. The default is FALSE. CounterDevRef in specifies a reference to the counter you want to use. If status is FALSE. The default is no error. Use the VI to open this reference. this VI returns an error. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.vi Resets the counter you specify to 0. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. error in (no error) describes error conditions that occur before this node runs. in most cases. CntIndex specifies the index of the reserved counter. source specifies the origin of the error or warning and is. If CntIndex is Invalid. CntIndex can specify a value between Ctr 0 and Ctr 7.Chapter 19 Counter VIs Reset.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. code is an error code. in most cases. code is the error or warning code. code is the error or warning code. If status is FALSE. If status is TRUE. the name of the node that produced the error or warning. CounterDevRef out returns a reference to the counter. source specifies the origin of the error or warning and is. Otherwise. in most cases. in most cases. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. If error in indicates that an error occurred before this VI or function ran. code is an error code. CntIndex can return a value between Ctr 0 and Ctr 7. CntIndex returns the index of the reserved counter. error out contains the same error information. source specifies the origin of the error or warning and is. If status is TRUE. the name of the node that produced the error or warning.com . code is 0 or a warning code. If status is FALSE. code is an error code. If CntIndex returns a value of Invalid. The default is an empty string. error out contains error information. If status is FALSE. DevStatus describes the error status that this VI or function produces. code is 0 or a warning code. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 19-10 ni. code is 0 or a warning code. the VI did not find the counter you specified.Chapter 19 Counter VIs code is the error or warning code. and this VI returns an error. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the name of the node that produced the error or warning.

If status is TRUE. If an error occurred before this node runs. CntIndex specifies the index of the reserved counter. The default is 0. source specifies the origin of the error or warning and is. This node runs normally only if no error occurred before this node runs. CntIndex can specify a value between Ctr 0 and Ctr 7. The default is an empty string. this VI returns an error. the node passes the error in (no error) value to error out. If status is FALSE. © National Instruments Corporation 19-11 LabVIEW Robotics Programming Guide for FRC . error in (no error) describes error conditions that occur before this node runs. Use the Reset VI if you want to reset the counter. If CntIndex is Invalid. code is the error or warning code. the name of the node that produced the error or warning. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use the VI to open this reference.vi Starts the counter that you specify. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it runs normally and sets its own error status in error out. The default is no error.Chapter 19 Counter VIs Start. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. If an error occurs while this node runs. The default is FALSE. Use the Open VI to open a reference to the counter before you use this VI. DevStatus describes the error status before this VI or function runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. in most cases. The default is no error. The default is FALSE. CounterDevRef in specifies a reference to the counter you want to use.

If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. If status is FALSE. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is FALSE. the name of the node that produced the error or warning. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 19-12 ni. error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. the name of the node that produced the error or warning. code is 0 or a warning code. DevStatus describes the error status that this VI or function produces. in most cases. in most cases. CntIndex can return a value between Ctr 0 and Ctr 7. code is an error code. CntIndex returns the index of the reserved counter. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. and this VI returns an error.Chapter 19 Counter VIs code is the error or warning code. The default is an empty string. code is an error code. the VI did not find the counter you specified. error out contains the same error information.com . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. in most cases. If status is FALSE. If status is TRUE. If CntIndex returns a value of Invalid. it describes the error status that this VI or function produces. Otherwise. CounterDevRef out returns a reference to the counter. The default is 0. If status is TRUE. code is an error code. code is 0 or a warning code. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning.

this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. in most cases. the node passes the error in (no error) value to error out.vi Stops the counter that you specify but does not reset the counter to zero. © National Instruments Corporation 19-13 LabVIEW Robotics Programming Guide for FRC . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use the VI to open this reference. error in (no error) describes error conditions that occur before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is an empty string. If status is TRUE. This node runs normally only if no error occurred before this node runs. Use the Reset VI if you want to reset the counter without stopping the counter. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If CntIndex is Invalid. it runs normally and sets its own error status in error out. The default is no error. If an error occurred before this node runs. The default is FALSE. code is an error code. The default is no error. If an error occurs while this node runs. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. CntIndex can specify a value between Ctr 0 and Ctr 7.Chapter 19 Counter VIs Stop. DevStatus describes the error status before this VI or function runs. The default is FALSE. the name of the node that produced the error or warning. code is 0 or a warning code. CntIndex specifies the index of the reserved counter. If status is FALSE. CounterDevRef in specifies a reference to the counter you want to use.

Otherwise. source specifies the origin of the error or warning and is. error out contains error information.com . code is an error code. code is 0 or a warning code. the VI did not find the counter you specified. CounterDevRef out returns a reference to the counter. code is the error or warning code. If status is FALSE. If status is FALSE. code is 0 or a warning code. the name of the node that produced the error or warning. If CntIndex returns a value of Invalid.Chapter 19 Counter VIs code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE. DevStatus describes the error status that this VI or function produces. and this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. The default is an empty string. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. code is an error code. it describes the error status that this VI or function produces. in most cases. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 19-14 ni. The default is 0. CntIndex returns the index of the reserved counter. in most cases. error out contains the same error information. in most cases. If status is FALSE. code is an error code. code is 0 or a warning code. CntIndex can return a value between Ctr 0 and Ctr 7. If status is TRUE. code is the error or warning code.

which in turn is connected to the digital module in slot 4 of the CompactRIO device. A digital line can accept input signals or send output signals. such as a limit switch or a touch sensor. © National Instruments Corporation 20-1 LabVIEW Robotics Programming Guide for FRC . whose signal has a value of either 0 or 1. The following figure demonstrates how to read and display the value of a digital sensor. Digital inputs accept signals from sensors. every second. available by selecting Help»Search the LabVIEW Help. Use the DigitalInput VIs to return digital input values. Use the Open VI to create a DigitalInputDevRef reference cluster that you then can wire to the other DigitalInput VIs. such as values that sensors send to the CompactRIO device. The digital line is connected to channel 1 of the digital sidecar. for the latest information about the DigitalInput VIs.DigitalInput VIs 20 Refer to the LabVIEW Help. You can connect a digital line to either a digital sidecar or directly to a digital module on the CompactRIO device. such as limit switches or touch sensors.

vi Closes the reference to the digital input you specify. The default digital module is the first digital module. If status is FALSE. If DIO Channel is Invalid. If status is TRUE. DIO Channel specifies the channel of the DIO Module that you want to use. this VI returns an error. If DIO Module specifies a value of Default. DIO Module can specify a value of Slot 4 or Slot 6. DigitalInputDevRef specifies a reference to the digital input you want to use. in most cases. code is an error code. this VI uses the default digital module. source specifies the origin of the error or warning and is.Chapter 20 DigitalInput VIs Close. the name of the node that produced the error or warning. The default is no error. or the module in slot 4. Use this VI to close each digital input reference that you open with the Open VI. DevStatus describes the error status before this VI or function runs. The default is 0. The default is FALSE. DIO Channel can specify a value between DIO 1 and DIO 14. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use.com . Use the VI to open this reference. The default is an empty string. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 20-2 ni. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code.

in most cases. If status is FALSE. code is an error code. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. The default is no error. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is TRUE. source specifies the origin of the error or warning and is. code is the error or warning code. the node passes the error in (no error) value to error out. it runs normally and sets its own error status in error out. in most cases. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. code is the error or warning code. © National Instruments Corporation 20-3 LabVIEW Robotics Programming Guide for FRC . code is 0 or a warning code. the name of the node that produced the error or warning. error out contains error information. error out contains the same error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Otherwise. The default is 0. If error in indicates that an error occurred before this VI or function ran. The default is an empty string. If status is TRUE. code is 0 or a warning code. If an error occurs while this node runs. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error.Chapter 20 DigitalInput VIs error in (no error) describes error conditions that occur before this node runs. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE.

If DIO Channel is Invalid. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. DIO Module can specify a value of Slot 4 or Slot 6. The default is 0. DevStatus describes the error status before this VI or function runs. this VI uses the default digital module. the name of the node that produced the error or warning. If status is FALSE. Use the VI to open this reference. source specifies the origin of the error or warning and is. code is the error or warning code.vi Returns the value of the digital input that you specify.Chapter 20 DigitalInput VIs GetValue. LabVIEW Robotics Programming Guide for FRC 20-4 ni. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DIO Channel specifies the channel of the DIO Module that you want to use. The default is no error. code is an error code. this VI returns an error. The default digital module is the first digital module. DIO Channel can specify a value between DIO 1 and DIO 14.com . If status is TRUE. The default is FALSE. or the module in slot 4. in most cases. code is 0 or a warning code. If DIO Module specifies a value of Default. DigitalInputDevRef specifies a reference to the digital input you want to use.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. or the module in slot 4. If an error occurs while this node runs. code is 0 or a warning code. code is the error or warning code. The default is 0. code is the error or warning code. code is an error code. DIO Module can return a value of Slot 4 or Slot 6. If DIO Module returns a value of Default. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. the name of the node that produced the error or warning. DigitalInputDevRef returns a reference to the digital input. DIO Channel can return a value between DIO 1 and DIO 14. If status is TRUE. If DIO Channel returns a value of Invalid. in most cases. The default is an empty string.Chapter 20 DigitalInput VIs error in (no error) describes error conditions that occur before this node runs. The default is no error. The default digital module is the first digital module. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. DevStatus describes the error status that this VI or function produces. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the node passes the error in (no error) value to error out. If status is FALSE. in most cases. the VI did © National Instruments Corporation 20-5 LabVIEW Robotics Programming Guide for FRC . DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. code is 0 or a warning code. it runs normally and sets its own error status in error out. the name of the node that produced the error or warning. DIO Channel returns the channel of the DIO Module that you want to use. this VI uses the default digital module. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. If status is FALSE.

error out contains the same error information. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . source specifies the origin of the error or warning and is. You also can select Default to specify the slot of the default digital module.Chapter 20 DigitalInput VIs not find the digital channel you specified. The default digital module is the first digital module. code is 0 or a warning code. If status is FALSE. You must open a reference before using any other VIs on this palette. in most cases. DIO Channel specifies the channel of the DIO Module that you want to use. Open. Select a value between DIO 1 and DIO 14. it describes the error status that this VI or function produces. and this VI returns an error.vi Creates a reference to the digital input you specify. The default is Slot 4. If error in indicates that an error occurred before this VI or function ran. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 20-6 ni. Select Slot 4 or Slot 6. code is the error or warning code. this VI returns an error. Otherwise. The default is DIO 1. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. or the module in slot 4. code is an error code. DIO Module (Slot 4) specifies the slot number on the CompactRIO device of the digital module you want to use. If DIO Channel is Invalid. error out contains error information. Value returns the Boolean value of the digital input.

this VI uses the default digital module. The default is 0. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. DIO Module can return a value of Slot 4 or Slot 6.Chapter 20 DigitalInput VIs error in (no error) describes error conditions that occur before this node runs. This node runs normally only if no error occurred before this node runs. source specifies the origin of the error or warning and is. If DIO Module returns a value of Default. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. the name of the node that produced the error or warning. code is the error or warning code. code is 0 or a warning code. DigitalInputDevRef returns a reference to the digital input. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is FALSE. code is an error code. The default is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. © National Instruments Corporation 20-7 LabVIEW Robotics Programming Guide for FRC . it runs normally and sets its own error status in error out. If status is TRUE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is an error code. the node passes the error in (no error) value to error out. the name of the node that produced the error or warning. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. DevStatus describes the error status that this VI or function produces. The default is no error. If an error occurred before this node runs. If status is FALSE. or the module in slot 4. The default digital module is the first digital module. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE. The default is an empty string. If an error occurs while this node runs. in most cases.

If status is FALSE. the VI did not find the digital channel you specified. LabVIEW Robotics Programming Guide for FRC 20-8 ni. If error in indicates that an error occurred before this VI or function ran.Chapter 20 DigitalInput VIs DIO Channel returns the channel of the DIO Module that you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise.com . code is 0 or a warning code. the name of the node that produced the error or warning. code is the error or warning code. error out contains error information. source specifies the origin of the error or warning and is. error out contains the same error information. in most cases. code is an error code. If status is TRUE. and this VI returns an error. DIO Channel can return a value between DIO 1 and DIO 14. it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If DIO Channel returns a value of Invalid.

you can use the Pulse VI and hardware timing to specify the duration of the pulse. The Timing functions have a resolution of milliseconds. A digital line can accept input signals or send output signals. the SetValue VI sets the digital output to TRUE for the duration of the pulse. You can connect a digital line to either a digital sidecar or directly to a digital module on the CompactRIO device. or one second. for the latest information about the DigitalOutput VIs. which in turn is connected to the digital module in slot 4 of the CompactRIO device. The following figure demonstrates how to emit a pulse on a digital line for 1000 milliseconds. Use the Open VI to create a DigitalOutputDevRef reference cluster that you then can wire to the other DigitalOutput VIs. In the previous figure. You can use digital outputs to activate a sensor or turn on an LED. which the Wait (ms) function specifies. you can use the digital output to turn on an LED for several seconds and then turn it off. Digital outputs can emit digital pulses. For example.DigitalOutput VIs 21 Refer to the LabVIEW Help. Use software timing to emit pulses over longer durations. In this example. The SetValue VI then sets the digital output back to FALSE at the end of the pulse. © National Instruments Corporation 21-1 LabVIEW Robotics Programming Guide for FRC . Alternatively. Use the DigitalOutput VIs to open or close a reference to a digital output and to set the value of the digital output. available by selecting Help»Search the LabVIEW Help. The digital line is connected to channel 2 of the digital sidecar. the pulse is software-timed.

The default is an empty string. The default is 0. If status is TRUE. DigitalOutputDevRef specifies a reference to the digital output you want to use. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. LabVIEW Robotics Programming Guide for FRC 21-2 ni. Use exception control to treat what is normally an error as no error or to treat a warning as an error. This node runs normally only if no error occurred before this node runs. The default is 0. If status is FALSE. The default is no error. code is the error or warning code. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. The default is no error. If an error occurs while this node runs. Use this VI to close each digital output reference that you open with the Open VI. The default is FALSE. If status is TRUE. code is an error code. it runs normally and sets its own error status in error out. DevStatus describes the error status before this VI or function runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE.vi Closes the reference to the digital output you specify. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurred before this node runs. code is 0 or a warning code.com . error in (no error) describes error conditions that occur before this node runs.Chapter 21 DigitalOutput VIs Close. in most cases. code is an error code. code is the error or warning code. the name of the node that produced the error or warning.

this VI uses the default digital module. The default is an empty string. DIO Channel specifies the channel of the DIO Module that you want to use. the name of the node that produced the error or warning. DIO Channel can specify a value between DIO 1 and DIO 14. error out contains error information. DIO Module can specify a value of Slot 4 or Slot 6. code is the error or warning code. this VI returns an error. You must open a reference before using any other VIs on this palette. code is 0 or a warning code. code is an error code. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Open. If DIO Module specifies a value of Default. The default digital module is the first digital module.Chapter 21 DigitalOutput VIs source specifies the origin of the error or warning and is. in most cases.vi Creates a reference to the digital output you specify. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. Otherwise. it describes the error status that this VI or function produces. source specifies the origin of the error or warning and is. in most cases. error out contains the same error information. If DIO Channel is Invalid. Select Slot 4 or Slot 6. If error in indicates that an error occurred before this VI or function ran. DIO Module (Slot 4) specifies the slot number on the CompactRIO device of the digital module you want to use. The default is Slot 4. You also can select Default to specify the slot of the default digital © National Instruments Corporation 21-3 LabVIEW Robotics Programming Guide for FRC . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE. or the module in slot 4. the name of the node that produced the error or warning.

DigitalOutputDevRef returns a reference to the digital output. source specifies the origin of the error or warning and is. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out.com . If status is TRUE. code is 0 or a warning code. the name of the node that produced the error or warning. If an error occurs while this node runs.Chapter 21 DigitalOutput VIs module. The default digital module is the first digital module. it runs normally and sets its own error status in error out. This node runs normally only if no error occurred before this node runs. The default is DIO 1. or the module in slot 4. DevStatus describes the error status that this VI or function produces. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If DIO Channel is Invalid. The default is no error. DIO Channel specifies the channel of the DIO Module that you want to use. code is the error or warning code. If status is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. LabVIEW Robotics Programming Guide for FRC 21-4 ni. error in (no error) describes error conditions that occur before this node runs. code is 0 or a warning code. If status is FALSE. this VI returns an error. The default is an empty string. code is the error or warning code. in most cases. Select a value between DIO 1 and DIO 14. The default is 0. code is an error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurred before this node runs. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. The default is FALSE. code is an error code.

DIO Channel returns the channel of the DIO Module that you want to use. Value specifies the Boolean value of the digital output. this VI uses the default digital module. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the VI did not find the digital channel you specified. source specifies the origin of the error or warning and is. If error in indicates that an error occurred before this VI or function ran. and this VI returns an error. error out contains error information. or the module in slot 4. code is the error or warning code. Otherwise. code is an error code.vi Specifies the value of the digital output you specify. If status is TRUE. the name of the node that produced the error or warning. error out contains the same error information. code is 0 or a warning code. If an error occurred before this node runs. If DIO Module returns a value of Default. the node passes the error in (no error) value to error out. SetValue. If DIO Channel returns a value of Invalid. The default digital module is the first digital module. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. in most cases. This node runs normally only if no error occurred before this node runs. If an error occurs © National Instruments Corporation 21-5 LabVIEW Robotics Programming Guide for FRC . DIO Module can return a value of Slot 4 or Slot 6.Chapter 21 DigitalOutput VIs DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. The default is no error. You can use this VI to specify the starting value of the digital output before you use the Pulse VI. DIO Channel can return a value between DIO 1 and DIO 14. error in (no error) describes error conditions that occur before this node runs. it describes the error status that this VI or function produces. If status is FALSE.

If status is TRUE. or the module in slot 4.Chapter 21 DigitalOutput VIs while this node runs. If status is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is an empty string. DevStatus describes the error status before this VI or function runs. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. LabVIEW Robotics Programming Guide for FRC 21-6 ni. DigitalOutputDevRef specifies a reference to the digital output you want to use. The default is FALSE. If DIO Channel is Invalid. The default is 0. The default digital module is the first digital module. The default is no error. code is an error code. in most cases. source specifies the origin of the error or warning and is.com . Use exception control to treat what is normally an error as no error or to treat a warning as an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DIO Channel can specify a value between DIO 1 and DIO 14. code is 0 or a warning code. If DIO Module specifies a value of Default. The default is 0. in most cases. DIO Channel specifies the channel of the DIO Module that you want to use. If status is FALSE. code is an error code. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. The default is FALSE. DIO Module can specify a value of Slot 4 or Slot 6. the name of the node that produced the error or warning. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. code is 0 or a warning code. it runs normally and sets its own error status in error out. this VI returns an error. The default is an empty string. this VI uses the default digital module.

code is 0 or a warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. If status is TRUE. If DIO Channel returns a value of Invalid. If status is FALSE. If error in indicates that an error occurred before this VI or function ran. code is an error code. code is an error code. it describes the error status that this VI or function produces.Chapter 21 DigitalOutput VIs DigitalOutputDevRef returns a reference to the digital output. the name of the node that produced the error or warning. the VI did not find the digital channel you specified. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. in most cases. this VI uses the default digital module. If status is FALSE. © National Instruments Corporation 21-7 LabVIEW Robotics Programming Guide for FRC . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. Otherwise. error out contains the same error information. code is 0 or a warning code. DIO Module can return a value of Slot 4 or Slot 6. DevStatus describes the error status that this VI or function produces. the name of the node that produced the error or warning. error out contains error information. code is the error or warning code. or the module in slot 4. DIO Channel returns the channel of the DIO Module that you want to use. source specifies the origin of the error or warning and is. If DIO Module returns a value of Default. The default digital module is the first digital module. code is the error or warning code. DIO Channel can return a value between DIO 1 and DIO 14. and this VI returns an error.

which in turn is connected to the digital module in slot 4 of the CompactRIO device. The following figure demonstrates how to emit a pulse on a digital line for one microsecond. for the latest information about the Digital Output Advanced VIs. Digital outputs can emit digital pulses.Digital Output Advanced VIs 22 Refer to the LabVIEW Help. You can use digital outputs to activate a sensor or turn on an LED. In the previous figure. Use the DigitalOutput Open VI to create a DigitalOutputDevRef reference cluster that you then can wire to the Digital Output Advanced VIs. you can use the digital output to emit a short ping from an ultrasonic sensor. the Pulse VI sets the digital output to the opposite of the current value for the duration you specify with the length (uSec) input. For example. available by selecting Help»Search the LabVIEW Help. you can use the SetValue VI and software timing to specify the duration of the pulse. The digital line is connected to channel 2 of the digital sidecar. A digital line can accept input signals or send output signals. You can connect a digital line to either the digital sidecar or to a digital module on the CompactRIO device. The Pulse VI emits a hardware-timed pulse. Alternatively. Use hardware timing to emit a pulse of a very short duration. Use the Digital Output Advanced VIs to emit digital pulses from the CompactRIO device. © National Instruments Corporation 22-1 LabVIEW Robotics Programming Guide for FRC . You can set the length (uSec) input of the Pulse VI to a value between 0 and 255 microseconds.

code is 0 or a warning code. code is 0 or a warning code. code is an error code. The default is FALSE. it runs normally and sets its own error status in error out. The default is 0. the node passes the error in (no error) value to error out.com . This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs. DevStatus describes the error status before this VI or function runs. DigitalOutputDevRef specifies a reference to the digital output you want to use. If an error occurred before this node runs. code is the error or warning code.Chapter 22 Digital Output Advanced VIs IsPulsing. LabVIEW Robotics Programming Guide for FRC 22-2 ni. in most cases. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error in (no error) describes error conditions that occur before this node runs. If status is TRUE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. source specifies the origin of the error or warning and is. If status is FALSE. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. The default is no error.vi Returns whether the digital output is emitting a pulse. If status is TRUE. the name of the node that produced the error or warning. code is the error or warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is no error. If status is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is an empty string.

code is an error code. If DIO Module returns a value of Default. DIO Channel specifies the channel of the DIO Module that you want to use. or the module in slot 4. If status is TRUE. DigitalOutputDevRef returns a reference to the digital output. DIO Channel returns the channel of the DIO Module that you want to use. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DIO Module can specify a value of Slot 4 or Slot 6.Chapter 22 Digital Output Advanced VIs source specifies the origin of the error or warning and is. in most cases. this VI returns an error. this VI uses the default digital module. the name of the node that produced the error or warning. IsPulsing? returns FALSE. DIO Module can return a value of Slot 4 or Slot 6. the VI did not find the digital channel you specified. DevStatus describes the error status that this VI or function produces. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. source specifies the origin of the error or warning and is. If DIO Module specifies a value of Default. The default digital module is the first digital module. IsPulsing? returns TRUE if the digital output is emitting a hardware-timed pulse. © National Instruments Corporation 22-3 LabVIEW Robotics Programming Guide for FRC . and this VI returns an error. DIO Channel can return a value between DIO 1 and DIO 14. the name of the node that produced the error or warning. If status is FALSE. in most cases. code is the error or warning code. If DIO Channel is Invalid. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. DIO Channel can specify a value between DIO 1 and DIO 14. The default digital module is the first digital module. or the module in slot 4. this VI uses the default digital module. If DIO Channel returns a value of Invalid. The default is an empty string. Otherwise.

Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. This node runs normally only if no error occurred before this node runs. For example. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it runs normally and sets its own error status in error out. If an error occurs while this node runs. If status is FALSE. You can specify a value between 7 E-6 and 1. You can use the SetValue VI to specify the starting value of the digital output before you use the Pulse VI. If error in indicates that an error occurred before this VI or function ran. error out contains the same error information. The default is no error. the node passes the error in (no error) value to error out. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.Chapter 22 Digital Output Advanced VIs error out contains error information. code is 0 or a warning code. source specifies the origin of the error or warning and is. in most cases. If an error occurred before this node runs.5 E-5. This VI sets the value of the digital output to the opposite of the current value. The default is 1. length (Sec) specifies the duration. error in (no error) describes error conditions that occur before this node runs. you can use this VI to emit a ping from an ultrasonic sensor.vi Emits a hardware-timed pulse for a duration that you specify. Otherwise. Use exception control to treat what is normally an error as no error or to treat a warning as an error.66 E-3. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 22-4 ni. the name of the node that produced the error or warning. in seconds.com . code is an error code. of the pulse the digital output emits. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it describes the error status that this VI or function produces. Pulse.

code is 0 or a warning code. © National Instruments Corporation 22-5 LabVIEW Robotics Programming Guide for FRC . source specifies the origin of the error or warning and is. The default is 0. or the module in slot 4. DIO Module can specify a value of Slot 4 or Slot 6. DigitalOutputDevRef specifies a reference to the digital output you want to use.Chapter 22 Digital Output Advanced VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. code is the error or warning code. the name of the node that produced the error or warning. this VI uses the default digital module. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default digital module is the first digital module. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. code is an error code. If status is FALSE. If DIO Channel is Invalid. the name of the node that produced the error or warning. code is an error code. If status is TRUE. DIO Channel specifies the channel of the DIO Module that you want to use. DIO Channel can specify a value between DIO 1 and DIO 14. in most cases. The default is FALSE. source specifies the origin of the error or warning and is. in most cases. DevStatus describes the error status before this VI or function runs. this VI returns an error. The default is an empty string. The default is an empty string. If status is FALSE. The default is no error. The default is FALSE. If DIO Module specifies a value of Default. The default is 0. If status is TRUE.

code is the error or warning code. If status is FALSE. LabVIEW Robotics Programming Guide for FRC 22-6 ni. code is an error code. DIO Channel returns the channel of the DIO Module that you want to use. the name of the node that produced the error or warning. If status is TRUE.Chapter 22 Digital Output Advanced VIs DigitalOutputDevRef returns a reference to the digital output. Otherwise. error out contains error information. If error in indicates that an error occurred before this VI or function ran. The default digital module is the first digital module. If status is TRUE. and this VI returns an error. DIO Module can return a value of Slot 4 or Slot 6.com . code is 0 or a warning code. error out contains the same error information. code is an error code. DIO Channel can return a value between DIO 1 and DIO 14. in most cases. If DIO Channel returns a value of Invalid. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is the error or warning code. this VI uses the default digital module. it describes the error status that this VI or function produces. source specifies the origin of the error or warning and is. or the module in slot 4. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. code is 0 or a warning code. DevStatus describes the error status that this VI or function produces. If DIO Module returns a value of Default. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. the VI did not find the digital channel you specified.

Analog 3 (V) returns the voltage of the third analog input on the driver station. and to send information from the robot to the host computer. Get Analog Input.vi Returns the voltage of each of the analog inputs on the driver station. and host computer.DriverStation VIs 23 Refer to the LabVIEW Help. You can use the DriverStation VIs to handle input data from sensors connected to the driver station. driver station. to send data from the driver station to LEDs or other sensors. The DriverStation VIs can handle both analog and digital data. © National Instruments Corporation 23-1 LabVIEW Robotics Programming Guide for FRC . Analog 4 (V) returns the voltage of the fourth analog input on the driver station. available by selecting Help»Search the LabVIEW Help. for the latest information about the DriverStation VIs. Use the DriverStation VIs to send data between the robot. Analog 1 (V) returns the voltage of the first analog input on the driver station. Analog 2 (V) returns the voltage of the second analog input on the driver station.

LabVIEW Robotics Programming Guide for FRC 23-2 ni. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. code is 0 or a warning code.com . If an error occurs while this node runs. Driver Station Digital Input (1-8) returns the value of each of the digital inputs on the driver station. Use exception control to treat what is normally an error as no error or to treat a warning as an error.vi Returns the value of each of the digital outputs on the driver station. The default is FALSE. The default is 0.vi Returns the value of each of the digital inputs on the driver station. code is the error or warning code. the node passes the error in (no error) value to error out. in most cases. If status is TRUE.Chapter 23 DriverStation VIs Get Digital Input. If an error occurred before this node runs. If status is FALSE. the name of the node that produced the error or warning. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. error in (no error) describes error conditions that occur before this node runs. This node runs normally only if no error occurred before this node runs. Driver Station Digital Output (1-8) returns the value of each of the digital outputs on the driver station. source specifies the origin of the error or warning and is. The default is no error. Get Digital Output. code is an error code. it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.

If an error occurs while this node runs. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. © National Instruments Corporation 23-3 LabVIEW Robotics Programming Guide for FRC . The UpdateDashboard VI must be running before you can use this VI. error in (no error) describes error conditions that occur before this node runs. If error in indicates that an error occurred before this VI or function ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is FALSE. code is 0 or a warning code. code is the error or warning code. Set Digital Output. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE. it runs normally and sets its own error status in error out. Driver Station Digital Output (1-8) specifies the value of each of the digital outputs on the driver station.vi Specifies the value of each of the digital outputs on the driver station. error out contains the same error information. If an error occurred before this node runs. This node runs normally only if no error occurred before this node runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. If status is FALSE. the node passes the error in (no error) value to error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.Chapter 23 DriverStation VIs error out contains error information. it describes the error status that this VI or function produces.

com . it runs normally and sets its own error status in error out. error out contains error information.vi Specifies the user data to send from the host computer to the driver station. in most cases. Otherwise. The default is 0. in most cases. code is the error or warning code. error out contains the same error information. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. LabVIEW Robotics Programming Guide for FRC 23-4 ni. error in (no error) describes error conditions that occur before this node runs. If status is TRUE.Chapter 23 DriverStation VIs code is the error or warning code. If status is TRUE. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. The default is no error. code is an error code. the node passes the error in (no error) value to error out. it describes the error status that this VI or function produces. If an error occurred before this node runs. If status is FALSE. code is 0 or a warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is FALSE. The default is an empty string. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. User Data (984 byte) specifies the user data to send from the host computer to the driver station. code is 0 or a warning code. This node runs normally only if no error occurred before this node runs. the name of the node that produced the error or warning. Set User Data. code is an error code.

The default is 0. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. The default is FALSE. joystick. as well as the system watchdog on the CompactRIO device. If status is TRUE. code is the error or warning code. and driver station data caches. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains error information. If status is TRUE. and driver station. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is the error or warning code. If error in indicates that an error occurred before this VI or function ran. in most cases. code is 0 or a warning code. code is an error code. joystick. in most cases. © National Instruments Corporation 23-5 LabVIEW Robotics Programming Guide for FRC . code is an error code. Otherwise. If status is FALSE. The default is an empty string. error out contains the same error information. This VI runs continuously and regularly checks for information from the host computer.vi Starts the communication loop between the CompactRIO device and the driver station.Chapter 23 DriverStation VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it describes the error status that this VI or function produces. code is 0 or a warning code. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. If status is FALSE. Start Communication. This VI also initializes the host computer.

stops the communication loop between the CompactRIO device and the driver station and closes the host computer. The default is 0. If an error occurs while this node runs.com . joystick. joystick. Use exception control to treat what is normally an error as no error or to treat a warning as an error.vi Stops the communication loop between the CompactRIO device and the driver station. This node runs normally only if no error occurred before this node runs. When FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 23 DriverStation VIs occurrence pauses the operation of the Robot Main VI in the FRC robot project that you deploy to and run on the CompactRIO device. and driver station data caches. Stop Communication. the node passes the error in (no error) value to error out. The occurrence reference comes from the Create Occurrence VI. The default is no error. joystick. If an error occurred before this node runs. This VI also closes the host computer. code is 0 or a warning code. If status is FALSE. Operation of the Robot Main VI resumes after the Start Communication VI data caches update. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. and driver station data caches. LabVIEW Robotics Programming Guide for FRC 23-6 ni. If status is TRUE. and driver station data caches. StopCommunication has no effect on the communication loop between the CompactRIO device and the driver station or the host computer. code is an error code. StopCommunication. when TRUE. code is the error or warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. error in (no error) describes error conditions that occur before this node runs. it runs normally and sets its own error status in error out. The default is FALSE.

error out contains error information. error out contains the same error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. If status is TRUE. © National Instruments Corporation 23-7 LabVIEW Robotics Programming Guide for FRC . The default is an empty string. code is 0 or a warning code. If status is FALSE. code is an error code.Chapter 23 DriverStation VIs source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. in most cases. in most cases. If error in indicates that an error occurred before this VI or function ran. Otherwise. the name of the node that produced the error or warning. code is the error or warning code.

Use the Open VI to create an EncoderDevRef reference cluster that you then can wire to the other Encoder VIs. You can reserve and release decoders as needed. or vice versa. If you connect this encoder directly to a wheel with a six-inch diameter. Use the Encoder VIs to get information about the rotation of a gear or motor. A 128-count encoder returns 128 pulses per encoder revolution. Timing is critical with encoder measurements. available by selecting Help»Search the LabVIEW Help. The decoders are not tied to a specific module or channel on the CompactRIO device.Encoder VIs 24 Refer to the LabVIEW Help. A quadrature encoder can count the number of rotations as well as determine the direction of rotation. for the latest information about the Encoder VIs.15 inches. Quadrature encoders use two digital sources that are out of phase to determine the count and direction of rotation. The FPGA on the CompactRIO device contains four quadrature decoders that perform 4x decoding and eight decoders that perform 1x and 2x decoding to interpret the information the encoders return. the circumference of the wheel is 6 π inches. © National Instruments Corporation 24-1 LabVIEW Robotics Programming Guide for FRC . and the resolution of the encoder is approximately 6 π /128 = 0. as measured by a quadrature encoder. Use the ToDigitalSource VI to create a digital source that you can wire to the ASource and BSource inputs of the Open VI. The Encoder VIs update the count for each rising and falling edge the encoder generates. You can use the Encoder VIs to configure the decoders to increment the count for forward rotations and decrement the count for reverse rotations.

and starts decoding the encoder signals. closing the reference to the encoder stops the encoder.vi Closes the reference to the encoder you specify. and this example VI closes the encoder reference. LabVIEW Robotics Programming Guide for FRC 24-2 ni. In this case. specifies a minimum pulse rate for determining if the encoder is stopped. the example VI continuously returns the distance moved and direction of the encoder until you press the Stop button on the front panel. the Get VI returns a Stopped value of TRUE. DevStatus describes the error status before this VI or function runs. Close.Chapter 24 Encoder VIs The following figure demonstrates how to return the count and direction of an encoder. If the encoder is not stopped. both digital sources are digital inputs. The default is no error. The encoder stops decoding.com . Use this VI to close each encoder reference that you open with the Open VI. and the FALSE case of the Case structure executes. This example VI uses the ToDigitalSource VI to create the digital sources for the encoder. This example VI then opens a reference to an encoder. EncoderDevRef specifies a reference to the encoder you want to use. the Get VI returns a Stopped value of FALSE. In this example. If you do not stop a running encoder with the Stop VI. and the TRUE case of the Case structure executes. If the encoder is stopped.

If an error occurred before this node runs. the name of the node that produced the error or warning. code is the error or warning code. in most cases. you input . The default is 0. Use exception control to treat what is normally an error as no error or to treat a warning as an error. When TRUE. The default is FALSE. Close Dependencies specifies to close any digital inputs when you close the reference to the encoder. CounterIndex can specify a value between Ctr 0 and Ctr 7. and 4x. For example. if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. © National Instruments Corporation 24-3 LabVIEW Robotics Programming Guide for FRC . this VI returns an error. 2x. Close Dependencies closes the digital inputs. code is 0 or a warning code. This node runs normally only if no error occurred before this node runs. error in (no error) describes error conditions that occur before this node runs. the node passes the error in (no error) value to error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. EncoderIndex specifies the index of the reserved encoder. If status is TRUE. The default is an empty string. source specifies the origin of the error or warning and is.2945 returns the number of inches the wheel has turned. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. In this case. If an error occurs while this node runs. it runs normally and sets its own error status in error out. this VI returns an error. CounterIndex specifies the index of the reserved counter.2945 Decoding Type specifies the type of decoding used to decode the quadrature signal. If status is FALSE. If CounterIndex is Invalid. The default is no error. code is an error code. EncoderIndex can specify a value between Enc 0 and Enc 3. DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. then a scaling factor of 6/64 = . Decoding Type supports three types of decoding for quadrature encoders: 1x.Chapter 24 Encoder VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If EncoderIndex is Invalid.

ConfigureTimer. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 24 Encoder VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. The default is an empty string. in most cases. the name of the node that produced the error or warning.com . code is an error code. error out contains the same error information. If status is FALSE. in most cases. code is 0 or a warning code. it describes the error status that this VI or function produces. LabVIEW Robotics Programming Guide for FRC 24-4 ni. You also can use this VI to specify the number of samples of the timer to average when calculating the pulse rate. If status is FALSE. source specifies the origin of the error or warning and is. Use this VI to specify the minimum rate at which the CompactRIO device must receive pulses from the encoder before the device considers the encoder stopped. the name of the node that produced the error or warning. Use the Get VI to determine whether the encoder is stopped. The default is FALSE. The default is 0. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. error out contains error information. If status is TRUE. code is the error or warning code. code is the error or warning code. EncoderDevRef specifies a reference to the encoder you want to use. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Otherwise.vi Configures the timer for the encoder you specify. code is 0 or a warning code.

CounterIndex specifies the index of the reserved counter. The default is 20. if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. source specifies the origin of the error or warning and is. DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. Minimum Rate specifies the minimum rate. You can specify a value between 1 and 128. © National Instruments Corporation 24-5 LabVIEW Robotics Programming Guide for FRC . The default is 0. In this case. this VI returns an error. the name of the node that produced the error or warning. If status is TRUE. EncoderIndex can specify a value between Enc 0 and Enc 3. 2x.2945 returns the number of inches the wheel has turned. If EncoderIndex is Invalid. in pulses per second. you input . code is 0 or a warning code. CounterIndex can specify a value between Ctr 0 and Ctr 7. this VI returns an error.Chapter 24 Encoder VIs DevStatus describes the error status before this VI or function runs. and 4x. at which the CompactRIO device must receive pulses from the encoder before the device considers the encoder stopped. Number Samples to Average specifies the number of samples of the timer to average when calculating the pulse rate. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. then a scaling factor of 6/64 = . The default is 1. in most cases. The default is an empty string. If status is FALSE. EncoderIndex specifies the index of the reserved encoder. The default is FALSE. If CounterIndex is Invalid. Perform averaging to account for mechanical imperfections. The default is no error. Decoding Type supports three types of decoding for quadrature encoders: 1x.2945 Decoding Type specifies the type of decoding used to decode the quadrature signal. For example. Use the VI to return the stopped status of the encoder. code is an error code.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. EncoderIndex returns the index of the reserved encoder. If an error occurred before this node runs. the node passes the error in (no error) value to error out. If an error occurs while this node runs. the VI did not find the encoder you specified. If CounterIndex returns a value of Invalid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 24-6 ni. source specifies the origin of the error or warning and is. it runs normally and sets its own error status in error out. the name of the node that produced the error or warning. code is the error or warning code. EncoderIndex can return a value between Enc 0 and Enc 3. in most cases. code is 0 or a warning code. If status is FALSE. and this VI returns an error. Use exception control to treat what is normally an error as no error or to treat a warning as an error.Chapter 24 Encoder VIs error in (no error) describes error conditions that occur before this node runs.com . EncoderDevRef returns a reference to the encoder. The default is FALSE. CounterIndex can return a value between Ctr 0 and Ctr 7. If EncoderIndex returns a value of Invalid. the name of the node that produced the error or warning. code is an error code. If status is TRUE. If status is TRUE. CounterIndex returns the index of the reserved counter. code is the error or warning code. the VI did not find the counter you specified. source specifies the origin of the error or warning and is. The default is no error. in most cases. code is an error code. DevStatus describes the error status that this VI or function produces. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is 0 or a warning code. The default is 0. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. This node runs normally only if no error occurred before this node runs. and this VI returns an error. The default is an empty string.

If error in indicates that an error occurred before this VI or function ran. and period of the encoder you specify. DevStatus describes the error status before this VI or function runs. code is an error code. code is the error or warning code. error out contains the same error information. If status is FALSE. © National Instruments Corporation 24-7 LabVIEW Robotics Programming Guide for FRC . Otherwise.Chapter 24 Encoder VIs DistancePerCount returns the pulses of the encoder as engineering units. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Decoding Type returns the type of decoding used to decode the quadrature signal. it describes the error status that this VI or function produces. If you call this VI repeatedly.vi Returns information about the count. EncoderDevRef specifies a reference to the encoder you want to use. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. Consider when the encoder was last reset when using this VI. If status is TRUE. as well as whether the encoder is stopped. this VI returns an accumulated count. The default is no error. error out contains error information. code is 0 or a warning code. Get. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. This VI returns the count of the encoder you specify but does not reset the count of the encoder. direction.

If an error occurs while this node runs. If status is TRUE. The default is FALSE. LabVIEW Robotics Programming Guide for FRC 24-8 ni.com . this VI returns an error. If status is FALSE. source specifies the origin of the error or warning and is. if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. the name of the node that produced the error or warning. This node runs normally only if no error occurred before this node runs. CounterIndex can specify a value between Ctr 0 and Ctr 7.Chapter 24 Encoder VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If CounterIndex is Invalid. code is an error code. If an error occurred before this node runs. in most cases.2945 Decoding Type specifies the type of decoding used to decode the quadrature signal. it runs normally and sets its own error status in error out. CounterIndex specifies the index of the reserved counter. The default is an empty string. If EncoderIndex is Invalid. this VI returns an error. The default is 0. you input . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. EncoderIndex specifies the index of the reserved encoder. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. In this case. 2x. and 4x. EncoderIndex can specify a value between Enc 0 and Enc 3. code is the error or warning code.2945 returns the number of inches the wheel has turned. Decoding Type supports three types of decoding for quadrature encoders: 1x. For example. The default is no error. code is 0 or a warning code. DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. then a scaling factor of 6/64 = . error in (no error) describes error conditions that occur before this node runs. the node passes the error in (no error) value to error out.

resulting in the Distance value. code is 0 or a warning code. The default is an empty string. and this VI returns an error. The default is 0. the VI did not find the encoder you specified. or 4. That value is then multiplied by the value of the DistancePerCount parameter from the VI. Distance takes the count from the FPGA and divides it by 1. Distance returns the distance. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. code is an error code. code is an error code. code is 0 or a warning code. and this VI returns an error. in most cases. in most cases. EncoderDevRef returns a reference to the encoder. Decoding Type returns the type of decoding used to decode the quadrature signal. If status is FALSE. the VI did not find the counter you specified. 2. If status is TRUE. EncoderIndex can return a value between Enc 0 and Enc 3. If CounterIndex returns a value of Invalid. in inches. DistancePerCount returns the pulses of the encoder as engineering units. Direction returns FALSE if the encoder last moved in a direction corresponding a decrease in the count. code is the error or warning code. If status is TRUE. CounterIndex can return a value between Ctr 0 and Ctr 7. Direction returns TRUE if the encoder last moved in a direction corresponding to an increase in the count. EncoderIndex returns the index of the reserved encoder. depending on the corresponding encoder type. CounterIndex returns the index of the reserved counter.Chapter 24 Encoder VIs code is the error or warning code. that the wheel has traveled. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. © National Instruments Corporation 24-9 LabVIEW Robotics Programming Guide for FRC . If status is FALSE. DevStatus describes the error status that this VI or function produces. If EncoderIndex returns a value of Invalid.

If error in indicates that an error occurred before this VI or function ran. in Hz. Rate returns the rate.Chapter 24 Encoder VIs error out contains error information. of pulses of the encoder.com . in most cases. you can use the Start and Stop VIs to start and stop the encoder. code is 0 or a warning code. If status is FALSE. code is the error or warning code. source specifies the origin of the error or warning and is. Use the ToDigitalSource VI to create a digital source that you can wire to the ASource and BSource inputs of this VI. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it describes the error status that this VI or function produces. error out contains the same error information. Open. respectively. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.vi Opens a reference to the encoder you specify. The CompactRIO device considers an encoder stopped if the rate at which the CompactRIO device detects pulses from the encoder is less than the minimum rate you specify with the VI. You must open a reference before using any other VIs on this palette. LabVIEW Robotics Programming Guide for FRC 24-10 ni. code is an error code. Otherwise. Stopped returns TRUE if the encoder is stopped. the name of the node that produced the error or warning. After you open a reference to the encoder.

source specifies the origin of the error or warning and is. the encoder resets when the digital source is high. When External Reset Active High is TRUE. code is 0 or a warning code. the FPGA on the CompactRIO device disables the routing destination. AnalogTriggerMode? specifies. If DIO Channel is Disabled.Chapter 24 Encoder VIs External Reset Active High specifies whether the encoder resets when the External Reset digital source is high or low. The default is TRUE. DIO Channel specifies the channel of the DIO Module that you want to use. © National Instruments Corporation 24-11 LabVIEW Robotics Programming Guide for FRC . code is an error code. to use an analog trigger output instead of a digital input as the digital source. or the module in slot 4. when TRUE. The default is 0. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. If status is FALSE. The default is no error. External Reset configures the digital source for the external signal that resets the encoder. code is the error or warning code. When External Reset Active High is FALSE. DIO Module can specify a value of Slot 4 or Slot 6. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status before this VI or function runs. If DIO Module specifies a value of Default. DigitalMode specifies information about the digital input you want to use as the digital source. in most cases. The default is an empty string. this VI uses the default digital module. If status is TRUE. The default digital module is the first digital module. the name of the node that produced the error or warning. AnalogTriggerMode specifies information about the analog trigger output you want to use as the digital source. The default is FALSE. DIO Channel can specify a value between DIO 1 and DIO 14. the encoder resets when the digital source is low.

DIO Channel specifies the channel of the DIO Module that you want to use. The default digital module is the first digital module. The default is an empty string. or the module in slot 4. this VI returns an error. in most cases. code is the error or warning code. If status is TRUE.com . code is 0 or a warning code. If AnalogTriggerIndex is Invalid. The default is no error. code is an error code. Use the VI to create this digital source. the name of the node that produced the error or warning. AnalogTriggerIndex can specify a value between Trig 0 and Trig 7. The default is 0. DIO Channel can specify a value between DIO 1 and DIO 14. DigitalMode specifies information about the digital input you want to use as the digital source. ASource specifies information about the first digital source of the encoder. OutputType specifies the output of the analog trigger that you want to use as the digital source. If status is FALSE. LabVIEW Robotics Programming Guide for FRC 24-12 ni. this VI uses the default digital module. DIO Module can specify a value of Slot 4 or Slot 6. AnalogTriggerMode specifies information about the analog trigger output you want to use as the digital source. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. to use an analog trigger output instead of a digital input as the digital source. source specifies the origin of the error or warning and is. The default is FALSE. If DIO Module specifies a value of Default. AnalogTriggerMode? specifies. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. when TRUE. You can use either a digital input or an analog trigger output as the digital source. If DIO Channel is Disabled. DevStatus describes the error status before this VI or function runs.Chapter 24 Encoder VIs AnalogTriggerIndex specifies the index of the reserved analog trigger. the FPGA on the CompactRIO device disables the routing destination.

code is 0 or a warning code. code is the error or warning code. DIO Channel can specify a value between DIO 1 and DIO 14. DIO Channel specifies the channel of the DIO Module that you want to use. DIO Module can specify a value of Slot 4 or Slot 6. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. The default is FALSE. or the module in slot 4. when TRUE. If AnalogTriggerIndex is Invalid. this VI uses the default digital module. The default digital module is the first digital module. The default is 0. AnalogTriggerMode specifies information about the analog trigger output you want to use as the digital source. BSource specifies information about the second digital source of the encoder. DevStatus describes the error status before this VI or function runs. this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. OutputType specifies the output of the analog trigger that you want to use as the digital source. AnalogTriggerIndex can specify a value between Trig 0 and Trig 7. the FPGA on the CompactRIO device disables the routing destination. AnalogTriggerMode? specifies. If status is FALSE. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. in most cases. code is an error code. If status is TRUE. If DIO Channel is Disabled. © National Instruments Corporation 24-13 LabVIEW Robotics Programming Guide for FRC . You can use either a digital input or an analog trigger output as the digital source. to use an analog trigger output instead of a digital input as the digital source. The default is no error. If DIO Module specifies a value of Default. DigitalMode specifies information about the digital input you want to use as the digital source. Use the VI to create this digital source.Chapter 24 Encoder VIs AnalogTriggerIndex specifies the index of the reserved analog trigger.

the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 24-14 ni. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is TRUE. Invert Direction (False) specifies. Decoding Type supports three types of decoding for quadrature encoders: 1x. code is 0 or a warning code. that the encoder increases the count when the ASource signal leads the BSource signal and decreases the count when the BSource signal leads the ASource signal. this VI returns an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If AnalogTriggerIndex is Invalid. The default is FALSE. when FALSE. The default is 0. when TRUE. code is the error or warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error.Chapter 24 Encoder VIs AnalogTriggerIndex specifies the index of the reserved analog trigger. it runs normally and sets its own error status in error out. The default is FALSE. AnalogTriggerIndex can specify a value between Trig 0 and Trig 7. Decoding Type specifies the type of decoding used to decode the quadrature signal. in most cases. error in (no error) describes error conditions that occur before this node runs. Invert Direction (False) specifies.com . the node passes the error in (no error) value to error out. If an error occurred before this node runs. that the encoder increases the count when the BSource signal leads the ASource signal and decreases the count when the ASource signal leads the BSource signal. code is an error code. 2x. This node runs normally only if no error occurred before this node runs. and 4x. The default is an empty string. OutputType specifies the output of the analog trigger that you want to use as the digital source. If status is FALSE. If an error occurs while this node runs. The default is no error.

If error in indicates that an error occurred before this VI or function ran.2945 EncoderDevRef returns a reference to the encoder. error out contains error information. if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. the VI did not find the encoder you specified. code is an error code.2945 returns the number of inches the wheel has turned. EncoderIndex returns the index of the reserved encoder. error out contains the same error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. DistancePerCount returns the pulses of the encoder as engineering units. In this case. Otherwise. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. If status is FALSE. and this VI returns an error. EncoderIndex can return a value between Enc 0 and Enc 3. in most cases. Decoding Type returns the type of decoding used to decode the quadrature signal. the VI did not find the counter you specified. If status is TRUE. © National Instruments Corporation 24-15 LabVIEW Robotics Programming Guide for FRC . If CounterIndex returns a value of Invalid. DevStatus describes the error status that this VI or function produces. then a scaling factor of 6/64 = . CounterIndex returns the index of the reserved counter. code is the error or warning code. CounterIndex can return a value between Ctr 0 and Ctr 7. it describes the error status that this VI or function produces. If EncoderIndex returns a value of Invalid. For example. code is 0 or a warning code. you input .Chapter 24 Encoder VIs DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. and this VI returns an error.

If CounterIndex is Invalid. this VI returns an error. If status is TRUE.vi Resets the count of the encoder you specify to 0. EncoderIndex specifies the index of the reserved encoder. in most cases. code is an error code. source specifies the origin of the error or warning and is. Use the Stop VI if want the encoder to continue counting but want to stop decoding the signals the encoder returns. If status is FALSE.Chapter 24 Encoder VIs code is the error or warning code. If status is FALSE. EncoderDevRef specifies a reference to the encoder you want to use. LabVIEW Robotics Programming Guide for FRC 24-16 ni. The default is FALSE. this VI returns an error. EncoderIndex can specify a value between Enc 0 and Enc 3. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If EncoderIndex is Invalid. The default is 0. The default is an empty string. CounterIndex specifies the index of the reserved counter. DevStatus describes the error status before this VI or function runs. Reset. code is the error or warning code.com . code is 0 or a warning code. the name of the node that produced the error or warning. in most cases. CounterIndex can specify a value between Ctr 0 and Ctr 7. If status is TRUE. code is 0 or a warning code. the name of the node that produced the error or warning. The default is no error. source specifies the origin of the error or warning and is.

The default is FALSE.2945 returns the number of inches the wheel has turned. code is 0 or a warning code. the name of the node that produced the error or warning. and 4x. source specifies the origin of the error or warning and is. This node runs normally only if no error occurred before this node runs. If status is TRUE. 2x. in most cases. If an error occurred before this node runs. The default is no error. EncoderDevRef returns a reference to the encoder. Decoding Type supports three types of decoding for quadrature encoders: 1x. If status is TRUE. code is the error or warning code. The default is 0. the node passes the error in (no error) value to error out. In this case. it runs normally and sets its own error status in error out. DevStatus describes the error status that this VI or function produces. Use exception control to treat what is normally an error as no error or to treat a warning as an error. you input . then a scaling factor of 6/64 = . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If an error occurs while this node runs. if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. © National Instruments Corporation 24-17 LabVIEW Robotics Programming Guide for FRC . code is an error code. If status is FALSE. For example.2945 Decoding Type specifies the type of decoding used to decode the quadrature signal. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code.Chapter 24 Encoder VIs DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. The default is an empty string. code is an error code. error in (no error) describes error conditions that occur before this node runs.

Chapter 24 Encoder VIs source specifies the origin of the error or warning and is. DistancePerCount returns the pulses of the encoder as engineering units. the VI did not find the counter you specified. the name of the node that produced the error or warning.com . it describes the error status that this VI or function produces. LabVIEW Robotics Programming Guide for FRC 24-18 ni. code is the error or warning code. the VI did not find the encoder you specified. EncoderIndex returns the index of the reserved encoder. If status is FALSE. in most cases. Otherwise. If CounterIndex returns a value of Invalid. in most cases. CounterIndex can return a value between Ctr 0 and Ctr 7. the name of the node that produced the error or warning.vi Starts decoding the signals that the encoder you specify returns. error out contains the same error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If error in indicates that an error occurred before this VI or function ran. Use the Reset VI if you want to reset the count of the encoder. CounterIndex returns the index of the reserved counter. Use the Open VI to open a reference to the encoder before you use this VI. Decoding Type returns the type of decoding used to decode the quadrature signal. If status is TRUE. EncoderIndex can return a value between Enc 0 and Enc 3. and this VI returns an error. If EncoderIndex returns a value of Invalid. error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. and this VI returns an error. code is an error code. Start. source specifies the origin of the error or warning and is. code is 0 or a warning code.

EncoderIndex can specify a value between Enc 0 and Enc 3. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. this VI returns an error. This node runs normally only if no error occurred before this node runs. the name of the node that produced the error or warning. and 4x. it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If an error occurred before this node runs. The default is 0. code is an error code. 2x. you input . code is the error or warning code. EncoderIndex specifies the index of the reserved encoder.2945 Decoding Type specifies the type of decoding used to decode the quadrature signal. The default is an empty string. the node passes the error in (no error) value to error out. if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. this VI returns an error. The default is FALSE. If status is FALSE. If CounterIndex is Invalid. In this case. If EncoderIndex is Invalid. error in (no error) describes error conditions that occur before this node runs. CounterIndex specifies the index of the reserved counter.Chapter 24 Encoder VIs EncoderDevRef specifies a reference to the encoder you want to use. If status is TRUE.2945 returns the number of inches the wheel has turned. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If an error occurs while this node runs. Decoding Type supports three types of decoding for quadrature encoders: 1x. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. For example. then a scaling factor of 6/64 = . CounterIndex can specify a value between Ctr 0 and Ctr 7. code is 0 or a warning code. DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. The default is no error. DevStatus describes the error status before this VI or function runs. source specifies the origin of the error or warning and is. The default is no error. in most cases. © National Instruments Corporation 24-19 LabVIEW Robotics Programming Guide for FRC .

EncoderIndex returns the index of the reserved encoder. the name of the node that produced the error or warning. code is an error code. EncoderDevRef returns a reference to the encoder. DistancePerCount returns the pulses of the encoder as engineering units. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. If EncoderIndex returns a value of Invalid. the name of the node that produced the error or warning. The default is FALSE. If status is TRUE.Chapter 24 Encoder VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. and this VI returns an error. source specifies the origin of the error or warning and is. The default is an empty string. in most cases. Decoding Type returns the type of decoding used to decode the quadrature signal. CounterIndex returns the index of the reserved counter. code is 0 or a warning code. the VI did not find the counter you specified. CounterIndex can return a value between Ctr 0 and Ctr 7.com . the VI did not find the encoder you specified. in most cases. DevStatus describes the error status that this VI or function produces. and this VI returns an error. code is the error or warning code. code is an error code. source specifies the origin of the error or warning and is. If CounterIndex returns a value of Invalid. If status is FALSE. If status is TRUE. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 24-20 ni. EncoderIndex can return a value between Enc 0 and Enc 3. The default is 0.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. The default is FALSE. code is the error or warning code. EncoderDevRef specifies a reference to the encoder you want to use. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. code is an error code. code is 0 or a warning code. the name of the node that produced the error or warning. Stop. If status is FALSE.Chapter 24 Encoder VIs error out contains error information. If status is TRUE. © National Instruments Corporation 24-21 LabVIEW Robotics Programming Guide for FRC . error out contains the same error information. If status is FALSE. in most cases.vi Stops decoding the signals the encoder you specify returns. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. The default is an empty string. it describes the error status that this VI or function produces. If status is TRUE. The default is no error. DevStatus describes the error status before this VI or function runs. in most cases. If error in indicates that an error occurred before this VI or function ran. code is an error code. The default is 0. Use the Reset VI if you want to reset the count of the encoder. source specifies the origin of the error or warning and is.

if the wheel diameter is six inches and the encoder pulses 64 times per rotation of the wheel. If CounterIndex is Invalid. The default is an empty string. the node passes the error in (no error) value to error out. EncoderIndex can specify a value between Enc 0 and Enc 3. source specifies the origin of the error or warning and is. it runs normally and sets its own error status in error out. If EncoderIndex is Invalid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. you input . The default is no error.2945 Decoding Type specifies the type of decoding used to decode the quadrature signal. The default is 0. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If an error occurred before this node runs. LabVIEW Robotics Programming Guide for FRC 24-22 ni. error in (no error) describes error conditions that occur before this node runs. in most cases. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is 0 or a warning code. In this case. If status is FALSE. code is the error or warning code. this VI returns an error. 2x. the name of the node that produced the error or warning. If status is TRUE. This node runs normally only if no error occurred before this node runs. CounterIndex can specify a value between Ctr 0 and Ctr 7. The default is FALSE. Decoding Type supports three types of decoding for quadrature encoders: 1x. and 4x. CounterIndex specifies the index of the reserved counter. code is an error code.com . For example.Chapter 24 Encoder VIs EncoderIndex specifies the index of the reserved encoder. then a scaling factor of 6/64 = .2945 returns the number of inches the wheel has turned. DistancePerCount scales the pulses of the encoder into engineering units for the Distance parameter of the VI. If an error occurs while this node runs. this VI returns an error.

Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. CounterIndex can return a value between Ctr 0 and Ctr 7. If CounterIndex returns a value of Invalid. EncoderIndex returns the index of the reserved encoder. If status is TRUE. If status is TRUE. in most cases. the name of the node that produced the error or warning. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. the VI did not find the counter you specified. source specifies the origin of the error or warning and is. If EncoderIndex returns a value of Invalid. and this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. © National Instruments Corporation 24-23 LabVIEW Robotics Programming Guide for FRC . If status is FALSE. it describes the error status that this VI or function produces. code is the error or warning code. EncoderIndex can return a value between Enc 0 and Enc 3. the name of the node that produced the error or warning. code is 0 or a warning code. error out contains the same error information. DistancePerCount returns the pulses of the encoder as engineering units. in most cases. Decoding Type returns the type of decoding used to decode the quadrature signal. code is the error or warning code. the VI did not find the encoder you specified. code is an error code. error out contains error information. If status is FALSE. code is 0 or a warning code. and this VI returns an error. CounterIndex returns the index of the reserved counter. DevStatus describes the error status that this VI or function produces.Chapter 24 Encoder VIs EncoderDevRef returns a reference to the encoder. code is an error code.

DevStatus describes the error status before this VI or function runs. The default is FALSE. Negative heading values indicate rotation to the left. code is an error code. set to zero. constantly summing the rate information to determine heading.vi Closes the reference to the gyroscope you specify. code is the error or warning code. Use the Gyro VIs to set and monitor the heading. The bias value is the point of origin. that is subtracted from subsequent heading samples. You also can use the Gyro VIs to measure how many degrees off of an original heading a robot has turned and to monitor the sensitivity in volts per degree per second that the robot turns. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. as measured by a gyroscope transducer. The default is 0. If status is FALSE. The gyroscope driver runs in the background. positive values indicate rotation to the right. available by selecting Help»Search the LabVIEW Help. GyroDevRef specifies a reference to the gyroscope you want to use. Close. The Gyro VIs measure the instantaneous rate of rotation. code is 0 or a warning code. The default is no error. with no rotation.Gyro VIs 25 Refer to the LabVIEW Help. Use this VI to close each gyroscope reference that you open with the Open VI. of the robot. Use the Reset VI to initialize gyroscope measurements while the robot is stationary to determine the offset or bias value. or yaw rate. © National Instruments Corporation 25-1 LabVIEW Robotics Programming Guide for FRC . or direction. for the latest information about the Gyro VIs. of the robot.

code is an error code. If Analog Channel is Invalid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Analog Module can specify a value of Slot 1 or Slot 2.Chapter 25 Gyro VIs source specifies the origin of the error or warning and is. The default is FALSE. in most cases. If status is FALSE. the node passes the error in (no error) value to error out. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. in most cases. the name of the node that produced the error or warning. If an error occurred before this node runs. The default is an empty string. The default is 0. If status is TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use exception control to treat what is normally an error as no error or to treat a warning as an error. LabVIEW Robotics Programming Guide for FRC 25-2 ni. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. code is the error or warning code. This parameter is used by the VI to calculate and report the heading of the robot. this VI returns an error. it runs normally and sets its own error status in error out. Offset specifies the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. This node runs normally only if no error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is 0 or a warning code. The default is no error. source specifies the origin of the error or warning and is. If an error occurs while this node runs. Analog Channel specifies the channel of the Analog Module you want to use. Analog Channel can specify a value between AI 1 and AI 8. Gain (VoltsPerDegree/Second) specifies the voltage per degree of rotation per second.com . the name of the node that produced the error or warning.

code is an error code. GetAngle. The default is FALSE. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. code is 0 or a warning code. the name of the node that produced the error or warning. in most cases. The default is an empty string.Chapter 25 Gyro VIs error out contains error information. code is an error code. in most cases. the name of the node that produced the error or warning. in degrees. source specifies the origin of the error or warning and is. from the original heading that the robot is currently facing. Otherwise. If status is FALSE. If status is FALSE. GyroDevRef specifies a reference to the gyroscope you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.vi Returns the angle. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. code is the error or warning code. it describes the error status that this VI or function produces. code is the error or warning code. © National Instruments Corporation 25-3 LabVIEW Robotics Programming Guide for FRC . The default is no error. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. error out contains the same error information. DevStatus describes the error status before this VI or function runs. source specifies the origin of the error or warning and is. The default is 0.

The default is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Analog Channel can specify a value between AI 1 and AI 8. This node runs normally only if no error occurred before this node runs. Gain (VoltsPerDegree/Second) specifies the voltage per degree of rotation per second. If status is FALSE. GyroDevRef returns the status of the gyroscope. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. source specifies the origin of the error or warning and is. If an error occurred before this node runs. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. this VI returns an error. This parameter is used by the VI to calculate and report the heading of the robot. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. LabVIEW Robotics Programming Guide for FRC 25-4 ni. the name of the node that produced the error or warning. The default is 0.com . Offset specifies the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. If Analog Channel is Invalid.Chapter 25 Gyro VIs Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. If an error occurs while this node runs. it runs normally and sets its own error status in error out. in most cases. Analog Channel specifies the channel of the Analog Module you want to use. code is 0 or a warning code. The default is no error. Analog Module can specify a value of Slot 1 or Slot 2. the node passes the error in (no error) value to error out.

If status is TRUE. that the robot is currently facing.Chapter 25 Gyro VIs code is the error or warning code. code is an error code. Analog Channel returns the channel of the Analog Module you want to use. in degrees. Otherwise. If status is FALSE. and this VI returns an error. Gain (VoltsPerDegree/Second) returns the voltage per degree of rotation per second. Offset returns the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. Analog Channel can return a value between AI 1 and AI 8. © National Instruments Corporation 25-5 LabVIEW Robotics Programming Guide for FRC . If Analog Channel returns a value of Invalid. code is 0 or a warning code. The accumulator on the FPGA numerically integrates this value to return the Angle of the gyroscope. code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. code is an error code. error out contains the same error information. the name of the node that produced the error or warning. it describes the error status that this VI or function produces. error out contains error information. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. source specifies the origin of the error or warning and is. Angle returns the angle. in most cases. One of the parameters used by the VI to calculate and report the heading of the robot. If status is FALSE. Analog Module can return a value of Slot 1 or Slot 2. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. the VI did not find the analog channel you specified. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Angular Rate scales the angular rate voltage signal from the gyroscope into engineering units of degrees per second. code is 0 or a warning code.

in most cases. The default is 0. source specifies the origin of the error or warning and is. Select AI 1 or AI 2. The default is an empty string. Analog Channel specifies the channel of the Analog Module you want to use. The default is AI 1. The default is no error. the name of the node that produced the error or warning.vi Opens a reference to the gyroscope you specify. You must open a reference before using any other VIs on this palette. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. You must select Slot 1. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is FALSE. the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Note Analog Module (Slot 1) specifies the slot number on the CompactRIO device of the analog module you want to use. code is 0 or a warning code. The default is FALSE.Chapter 25 Gyro VIs Open. this VI returns an error. If an error occurred before this node runs. LabVIEW Robotics Programming Guide for FRC 25-6 ni. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Gyroscopes use accumulators. error in (no error) describes error conditions that occur before this node runs. If Analog Channel is Invalid. If an error occurs while this node runs. it runs normally and sets its own error status in error out.com . If status is TRUE. which you can access only through the analog module in slot 1 of the CompactRIO device. code is an error code. You therefore must set Analog Module to Slot 1.

Analog Channel can return a value between AI 1 and AI 8. One of the parameters used by the VI to calculate and report the heading of the robot. code is the error or warning code. If status is FALSE. Otherwise. If status is TRUE. DevStatus describes the error status that this VI or function produces. it describes the error status that this VI or function produces. in most cases. code is 0 or a warning code. error out contains error information. If status is TRUE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. Offset returns the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. If status is FALSE. error out contains the same error information. code is 0 or a warning code. Analog Module can return a value of Slot 1 or Slot 2. © National Instruments Corporation 25-7 LabVIEW Robotics Programming Guide for FRC . and this VI returns an error.Chapter 25 Gyro VIs GyroDevRef returns the status of the gyroscope. Gain (VoltsPerDegree/Second) returns the voltage per degree of rotation per second. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. If error in indicates that an error occurred before this VI or function ran. Analog Channel returns the channel of the Analog Module you want to use. the VI did not find the analog channel you specified. code is an error code. If Analog Channel returns a value of Invalid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

Offset specifies the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. Gain (VoltsPerDegree/Second) specifies the voltage per degree of rotation per second. DevStatus describes the error status before this VI or function runs. The default is 0.Chapter 25 Gyro VIs source specifies the origin of the error or warning and is.com . source specifies the origin of the error or warning and is. in most cases. the name of the node that produced the error or warning. If status is TRUE. code is 0 or a warning code. code is an error code. GyroDevRef specifies a reference to the gyroscope you want to use.vi Resets the gyroscope to a heading of zero. the name of the node that produced the error or warning. The default is an empty string. Analog Channel can specify a value between AI 1 and AI 8. code is the error or warning code. This parameter is used by the VI to calculate and report the heading of the robot. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. Analog Channel specifies the channel of the Analog Module you want to use. in most cases. this VI returns an error. If Analog Channel is Invalid. Use this VI to recalibrate the gyroscope after significant drift. LabVIEW Robotics Programming Guide for FRC 25-8 ni. Analog Module can specify a value of Slot 1 or Slot 2. The default is no error. Reset. If status is FALSE. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

in most cases. code is the error or warning code. code is an error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. source specifies the origin of the error or warning and is. If status is TRUE. the node passes the error in (no error) value to error out. code is 0 or a warning code. source specifies the origin of the error or warning and is.Chapter 25 Gyro VIs error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. Analog Channel can return a value between AI 1 and AI 8. If Analog Channel returns a value of Invalid. the name of the node that produced the error or warning. in most cases. the name of the node that produced the error or warning. The default is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is the error or warning code. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. If status is TRUE. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status that this VI or function produces. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. it runs normally and sets its own error status in error out. Analog Channel returns the channel of the Analog Module you want to use. If status is FALSE. © National Instruments Corporation 25-9 LabVIEW Robotics Programming Guide for FRC . The default is 0. code is 0 or a warning code. If an error occurs while this node runs. The default is an empty string. and this VI returns an error. the VI did not find the analog channel you specified. Analog Module can return a value of Slot 1 or Slot 2. GyroDevRef returns the status of the gyroscope. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. If status is FALSE.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. LabVIEW Robotics Programming Guide for FRC 25-10 ni. it describes the error status that this VI or function produces.com .vi Specifies the voltage used per degree of rotation per second. code is the error or warning code. the name of the node that produced the error or warning. error out contains the same error information. One of the parameters used by the VI to calculate and report the heading of the robot. If status is TRUE. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status before this VI or function runs. Otherwise. source specifies the origin of the error or warning and is. error out contains error information. code is an error code. SetGain. The default is FALSE.Chapter 25 Gyro VIs Offset returns the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. If status is FALSE. If error in indicates that an error occurred before this VI or function ran. Gain (VoltsPerDegree/Second) returns the voltage per degree of rotation per second. GyroDevRef specifies a reference to the gyroscope you want to use. code is 0 or a warning code. This VI specifies one of the parameters used by the GetAngle VI to calculate and report the heading of the robot.

code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. the node passes the error in (no error) value to error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. If status is TRUE. This parameter is used by the VI to calculate and report the heading of the robot. Analog Channel specifies the channel of the Analog Module you want to use. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is FALSE. it runs normally and sets its own error status in error out. The default is 0. code is an error code. Gain (VoltsPerDegree/Second) specifies the voltage per degree of rotation per second. Analog Module can specify a value of Slot 1 or Slot 2.Chapter 25 Gyro VIs code is the error or warning code. The default is no error. Gain (VoltsPerDegree/Second) specifies the voltage per degree of rotation per second. This parameter is used by the VI to calculate and report the heading of the robot. The default is an empty string. If an error occurred before this node runs. code is 0 or a warning code. © National Instruments Corporation 25-11 LabVIEW Robotics Programming Guide for FRC . Analog Channel can specify a value between AI 1 and AI 8. If Analog Channel is Invalid. The default is 0. this VI returns an error. Offset specifies the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is an error code. source specifies the origin of the error or warning and is. If status is FALSE. Analog Module specifies the slot number on the CompactRIO device of the analog module you want to use. If an error occurs while this node runs. error in (no error) describes error conditions that occur before this node runs. the name of the node that produced the error or warning. If status is TRUE. This node runs normally only if no error occurred before this node runs. code is the error or warning code.

GyroDevRef returns the status of the gyroscope. One of the parameters used by the VI to calculate and report the heading of the robot. Analog Channel returns the channel of the Analog Module you want to use. Analog Module can return a value of Slot 1 or Slot 2. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 25-12 ni. If Analog Channel returns a value of Invalid. code is the error or warning code. the VI did not find the analog channel you specified. code is an error code. If status is TRUE. in most cases. and this VI returns an error. Analog Channel can return a value between AI 1 and AI 8. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. Analog Module returns the slot number on the CompactRIO device of the analog module you want to use. Gain (VoltsPerDegree/Second) returns the voltage per degree of rotation per second. in most cases. source specifies the origin of the error or warning and is. code is 0 or a warning code.com .Chapter 25 Gyro VIs source specifies the origin of the error or warning and is. Offset returns the difference between the expected 0 heading value and the reported 0 heading value before the robot starts moving. The default is an empty string.

If status is TRUE. error out contains the same error information. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. in most cases. it describes the error status that this VI or function produces. code is the error or warning code. © National Instruments Corporation 25-13 LabVIEW Robotics Programming Guide for FRC . code is an error code. If error in indicates that an error occurred before this VI or function ran.Chapter 25 Gyro VIs error out contains error information. code is 0 or a warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

Others. Use the Open VI to create an I2CDevRef reference cluster that you then can wire to the other I2C VIs. Some sensors. do not have configurable addresses. available by selecting Help»Search the LabVIEW Help.I2C VIs 26 Refer to the LabVIEW Help. Use this VI to close each I2C sensor reference that you open with the Open VI. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. I2CDevRef specifies a reference to the I2C sensor you want to use. The default is FALSE. Use the Inter-Integrated Circuit (I2C) VIs to access and monitor sensors connected to an I2C communications bus. have configurable addresses.vi Closes a reference to the I2C sensor you specify. The default is no error. DevStatus describes the error status before this VI or function runs. such as the HiTechnic NXT sensors. Close. such as the Devantech SRF08 ultrasonic sensor. Each sensor connected to an I2C communications bus must have a unique device address. If status is FALSE. code is the error or warning code. If status is TRUE. code is an error code. Each digital module on the CompactRIO device has one independent I2C communications bus. © National Instruments Corporation 26-1 LabVIEW Robotics Programming Guide for FRC . for the latest information about the I2C VIs. code is 0 or a warning code. The default is 0.

If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. This node runs normally only if no error occurred before this node runs.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains the same error information. the name of the node that produced the error or warning. If an error occurred before this node runs.Chapter 26 I2C VIs source specifies the origin of the error or warning and is. in most cases. The default digital module is the first digital module. If DIO Module specifies a value of Default. in most cases. it runs normally and sets its own error status in error out. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If error in indicates that an error occurred before this VI or function ran. DIO Module can specify a value of Slot 4 or Slot 6. source specifies the origin of the error or warning and is. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is no error. error in (no error) describes error conditions that occur before this node runs. code is the error or warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. it describes the error status that this VI or function produces. this VI uses the default digital module. the node passes the error in (no error) value to error out. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. The default is an empty string. code is an error code. code is 0 or a warning code. Otherwise. error out contains error information. LabVIEW Robotics Programming Guide for FRC 26-2 ni. If status is TRUE. The default is 0. the name of the node that produced the error or warning. The default is FALSE. Device Address specifies the unique device address of the I2C sensor. If an error occurs while this node runs. or the module in slot 4. The default is an empty string.

code is an error code. This node runs normally only if no error occurred before this node runs. The default is FALSE. After you open a reference to an I2C sensor. Select Slot 4 or Slot 6. The default digital module is the first digital module. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it runs normally and sets its own error status in error out. in most cases. Device Address specifies the unique device address of the I2C sensor.Chapter 26 I2C VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error in (no error) describes error conditions that occur before this node runs. code is the error or warning code.vi Opens a reference to the I2C sensor you specify. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. you can use the other I2C VIs to access and monitor the sensor. If status is FALSE. The default is Slot 4. code is 0 or a warning code. If an error occurs while this node runs. You also can select Default to specify the slot of the default digital module. © National Instruments Corporation 26-3 LabVIEW Robotics Programming Guide for FRC . Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. or the module in slot 4. DIO Module (Slot 4) specifies the slot number on the CompactRIO device of the digital module you want to use. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. If an error occurred before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. You must open a reference before using any other VIs on this palette. If status is TRUE. The default is no error. Open. the name of the node that produced the error or warning.

LabVIEW Robotics Programming Guide for FRC 26-4 ni. in most cases. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If DIO Module returns a value of Default. code is an error code. DIO Module can return a value of Slot 4 or Slot 6. code is the error or warning code. If status is FALSE. or the module in slot 4. DevStatus describes the error status that this VI or function produces. the name of the node that produced the error or warning.Chapter 26 I2C VIs code is the error or warning code. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. in most cases. If status is TRUE. code is an error code. code is the error or warning code. this VI uses the default digital module. The default is 0. code is an error code. If status is FALSE. If status is FALSE. code is 0 or a warning code. The default is an empty string. error out contains the same error information. I2CDevRef returns a reference to the I2C sensor. If status is TRUE.com . error out contains error information. the name of the node that produced the error or warning. code is 0 or a warning code. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Device Address returns the unique device address of the I2C sensor. source specifies the origin of the error or warning and is. code is 0 or a warning code. Otherwise. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. The default digital module is the first digital module. source specifies the origin of the error or warning and is.

If DIO Module specifies a value of Default. I2CBytesToRead specifies the number of bytes to read from the I2CRegister of the I2C sensor. The default digital module is the first digital module. DevStatus describes the error status before this VI or function runs. If status is TRUE. code is 0 or a warning code. The default is FALSE. DIO Module can specify a value of Slot 4 or Slot 6. This node runs normally only if no error occurred before this node runs. I2CRegister specifies the register of the I2C sensor you want to read. code is the error or warning code. Device Address specifies the unique device address of the I2C sensor. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. in most cases. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. source specifies the origin of the error or warning and is. the node passes the error in (no error) value to error out.vi Reads between one and four bytes in a single transaction from the I2C sensor you specify. this VI uses the default digital module. I2CDevRef specifies a reference to the I2C sensor you want to use. or the module in slot 4. The default is no error. If an error occurs © National Instruments Corporation 26-5 LabVIEW Robotics Programming Guide for FRC .Chapter 26 I2C VIs Read. If an error occurred before this node runs. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. code is an error code. The default is 0. the name of the node that produced the error or warning.

in most cases. The default is 0. code is 0 or a warning code. Data Out returns the array of bytes this VI read from the I2C sensor. the name of the node that produced the error or warning. code is 0 or a warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Device Address returns the unique device address of the I2C sensor. LabVIEW Robotics Programming Guide for FRC 26-6 ni. code is an error code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. DIO Module can return a value of Slot 4 or Slot 6.Chapter 26 I2C VIs while this node runs. in most cases.com . it runs normally and sets its own error status in error out. DevStatus describes the error status that this VI or function produces. If status is FALSE. The default is an empty string. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. source specifies the origin of the error or warning and is. If status is TRUE. code is the error or warning code. this VI uses the default digital module. If DIO Module returns a value of Default. or the module in slot 4. code is the error or warning code. the name of the node that produced the error or warning. I2CDevRef returns a reference to the I2C sensor. The default digital module is the first digital module. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. source specifies the origin of the error or warning and is.

Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is FALSE. © National Instruments Corporation 26-7 LabVIEW Robotics Programming Guide for FRC . I2CDevRef specifies a reference to the I2C sensor you want to use. This VI returns an error if the register strings do not match. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. The default is FALSE. Otherwise.vi Reads consecutive registers from the I2C sensor you specify and compares the register strings to an expected value. DevStatus describes the error status before this VI or function runs. VerifyString.Chapter 26 I2C VIs error out contains error information. code is the error or warning code. in most cases. If status is TRUE. The default is 0. The default is no error. in most cases. code is 0 or a warning code. If status is FALSE. it describes the error status that this VI or function produces. error out contains the same error information. The default is an empty string. the name of the node that produced the error or warning. the name of the node that produced the error or warning. code is 0 or a warning code. code is the error or warning code. code is an error code. If status is TRUE. source specifies the origin of the error or warning and is. If error in indicates that an error occurred before this VI or function ran.

Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. or the module in slot 4. DevStatus describes the error status that this VI or function produces. If an error occurs while this node runs. Register Address specifies the starting register to read from the I2C sensor. Expected specifies the string that the I2C sensor is expected to return. If status is TRUE. the name of the node that produced the error or warning. code is the error or warning code. source specifies the origin of the error or warning and is. If status is FALSE. The default is an empty string. the node passes the error in (no error) value to error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. DIO Module can specify a value of Slot 4 or Slot 6. error in (no error) describes error conditions that occur before this node runs. The default is FALSE. code is 0 or a warning code.com . This node runs normally only if no error occurred before this node runs. Device Address specifies the unique device address of the I2C sensor. code is an error code. If an error occurred before this node runs.Chapter 26 I2C VIs DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. The default digital module is the first digital module. I2CDevRef returns a reference to the I2C sensor. The default is 0. This VI returns an error if the I2C sensor does not return this string. it runs normally and sets its own error status in error out. If DIO Module specifies a value of Default. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 26-8 ni. this VI uses the default digital module.

© National Instruments Corporation 26-9 LabVIEW Robotics Programming Guide for FRC . the name of the node that produced the error or warning. DIO Module can return a value of Slot 4 or Slot 6. code is an error code. I2CDevRef specifies a reference to the I2C sensor you want to use.Chapter 26 I2C VIs code is the error or warning code. Device Address returns the unique device address of the I2C sensor. this VI uses the default digital module.vi Writes a byte to the I2C sensor you specify. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is the error or warning code. in most cases. DevStatus describes the error status before this VI or function runs. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. If status is TRUE. The default digital module is the first digital module. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. If error in indicates that an error occurred before this VI or function ran. error out contains the same error information. the name of the node that produced the error or warning. error out contains error information. code is an error code. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is FALSE. If DIO Module returns a value of Default. source specifies the origin of the error or warning and is. Write. or the module in slot 4. code is 0 or a warning code. If status is FALSE. If status is TRUE. The default is no error. it describes the error status that this VI or function produces.

code is the error or warning code. If an error occurs while this node runs. LabVIEW Robotics Programming Guide for FRC 26-10 ni. in most cases. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. source specifies the origin of the error or warning and is. The default is FALSE. code is an error code. error in (no error) describes error conditions that occur before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. it runs normally and sets its own error status in error out. DIO Module can specify a value of Slot 4 or Slot 6. If status is FALSE. code is 0 or a warning code.Chapter 26 I2C VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If DIO Module specifies a value of Default. The default is no error. code is the error or warning code. If an error occurred before this node runs. I2CDataToSend specifies the byte you want to write to the I2C sensor. I2CRegister specifies the register of the I2C sensor to which you want to write. This node runs normally only if no error occurred before this node runs. code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. or the module in slot 4. If status is TRUE. The default digital module is the first digital module. the name of the node that produced the error or warning. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. The default is an empty string. The default is 0.com . the node passes the error in (no error) value to error out. Device Address specifies the unique device address of the I2C sensor. If status is FALSE. this VI uses the default digital module.

If status is TRUE.Chapter 26 I2C VIs source specifies the origin of the error or warning and is. If status is FALSE. this VI uses the default digital module. the name of the node that produced the error or warning. in most cases. code is 0 or a warning code. in most cases. DIO Module can return a value of Slot 4 or Slot 6. source specifies the origin of the error or warning and is. code is 0 or a warning code. © National Instruments Corporation 26-11 LabVIEW Robotics Programming Guide for FRC . Device Address returns the unique device address of the I2C sensor. The default is an empty string. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If DIO Module returns a value of Default. in most cases. DevStatus describes the error status that this VI or function produces. If error in indicates that an error occurred before this VI or function ran. or the module in slot 4. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. code is an error code. Otherwise. source specifies the origin of the error or warning and is. The default digital module is the first digital module. I2CDevRef returns a reference to the I2C sensor. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. error out contains error information. error out contains the same error information. it describes the error status that this VI or function produces. code is the error or warning code. code is an error code. If status is TRUE. If status is FALSE. the name of the node that produced the error or warning.

DevStatus describes the error status before this VI or function runs. The default is FALSE. for the latest information about the Interrupts VIs. code is the error or warning code. code is an error code. code is 0 or a warning code. The default is no error.Interrupts VIs 27 Refer to the LabVIEW Help. source specifies the origin of the error or warning and is. Close. Use the Open VI to create an InterruptRef reference cluster that you then can wire to the other Interrupts VIs. available by selecting Help»Search the LabVIEW Help. The default is 0. The default is an empty string.vi Closes the reference to the interrupt you specify. If status is FALSE. InterruptRef specifies a reference to the interrupt you want to use. If status is TRUE. the name of the node that produced the error or warning. Use the Interrupts VIs to configure interrupts for the CompactRIO device. You can program interrupt handlers to perform certain tasks when the CompactRIO device receives an interrupt. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. © National Instruments Corporation 27-1 LabVIEW Robotics Programming Guide for FRC . Use this VI to close each interrupt reference that you open with the Open VI.

code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains the same error information. this VI returns an error. error out contains error information. code is an error code. when TRUE. If status is FALSE. in most cases. InterruptIndex can specify a value between 0 and 7. it runs normally and sets its own error status in error out.Chapter 27 Interrupts VIs InterruptIndex specifies the index of the reserved interrupt.com . Use exception control to treat what is normally an error as no error or to treat a warning as an error. it describes the error status that this VI or function produces. The default is 0. If status is TRUE. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. If status is TRUE. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 27-2 ni. The default is an empty string. in most cases. Close Dependencies specifies. The default is no error. If an error occurs while this node runs. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the name of the node that produced the error or warning. If error in indicates that an error occurred before this VI or function ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If an error occurred before this node runs. code is an error code. Otherwise. source specifies the origin of the error or warning and is. code is 0 or a warning code. the node passes the error in (no error) value to error out. If InterruptIndex is Invalid. If status is FALSE. code is the error or warning code. This node runs normally only if no error occurred before this node runs. to close any digital inputs or analog trigger outputs that the interrupt uses when you close the reference to the interrupt. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE.

If DIO Module specifies a value of Default. in most cases. The default is FALSE. Source specifies the source signal for the interrupt. If DIO Channel is Disabled. the FPGA on the CompactRIO device disables the routing destination. when TRUE. The default is 0. AnalogTriggerMode? specifies. code is 0 or a warning code. The default digital module is the first digital module. You must open a reference before using any other VIs on this palette. DIO Module can specify a value of Slot 4 or Slot 6. DIO Channel can specify a value between DIO 1 and DIO 14. © National Instruments Corporation 27-3 LabVIEW Robotics Programming Guide for FRC . DevStatus describes the error status before this VI or function runs. the name of the node that produced the error or warning. If status is FALSE. or the module in slot 4. The default is no error. to use an analog trigger output instead of a digital input as the digital source. this VI uses the default digital module. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. AnalogTriggerMode specifies information about the analog trigger output you want to use as the digital source.Chapter 27 Interrupts VIs Open. code is an error code. DIO Channel specifies the channel of the DIO Module that you want to use. DigitalMode specifies information about the digital input you want to use as the digital source. If status is TRUE. source specifies the origin of the error or warning and is.vi Opens a reference to the interrupt you specify. The default is an empty string.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. to use the rising edge of the Source signal to trigger an interrupt handler.com .Chapter 27 Interrupts VIs AnalogTriggerIndex specifies the index of the reserved analog trigger. If an error occurs while this node runs. Falling Edge specifies. The default is no error. code is an error code. DevStatus describes the error status that this VI or function produces. the name of the node that produced the error or warning. in most cases. If status is TRUE. If status is FALSE. it runs normally and sets its own error status in error out. InterruptRef returns a reference to the interrupt. AnalogTriggerIndex can specify a value between Trig 0 and Trig 7. OutputType specifies the output of the analog trigger that you want to use as the digital source. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. code is 0 or a warning code. The default is an empty string. This node runs normally only if no error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out. The default is FALSE. source specifies the origin of the error or warning and is. Rising Edge specifies. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. to use the falling edge of the Source signal to trigger an interrupt handler. LabVIEW Robotics Programming Guide for FRC 27-4 ni. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is 0. when TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If AnalogTriggerIndex is Invalid. this VI returns an error. If an error occurred before this node runs. when TRUE.

in most cases. If the CompactRIO device receives an interrupt. and this VI returns an error. If status is TRUE. Note The use of interrupts is an advanced feature. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. If status is TRUE. One common use case is to place this VI in an independent While Loop and set Timeout (ms) to –1. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is FALSE. error out contains error information. You can set this VI to wait for an interrupt indefinitely by setting Timeout (ms) to –1.vi Specifies that the CompactRIO device waits for an interrupt. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. You then return to the While Loop to wait indefinitely for another interrupt. You then can handle the interrupt as appropriate. InterruptIndex returns the index of the reserved interrupt. in most cases. code is an error code. code is an error code. © National Instruments Corporation 27-5 LabVIEW Robotics Programming Guide for FRC . If the CompactRIO device receives an interrupt during the time you specify. this VI returns a Timed Out value of FALSE. Wait. the name of the node that produced the error or warning. the name of the node that produced the error or warning. code is 0 or a warning code.Chapter 27 Interrupts VIs code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If the CompactRIO device times out before receiving an interrupt. If InterruptIndex returns a value of Invalid. If status is FALSE. InterruptIndex can return a value between 0 and 7. error out contains the same error information. Otherwise. and you handle the interrupt. this VI returns the InterruptRef and a Timed Out value of FALSE. code is the error or warning code. the VI did not find the interrupt you specified. this VI returns a Timed Out value of TRUE. source specifies the origin of the error or warning and is. Most teams might not need to use these VIs.

Specifying a finite time to wait for an interrupt can introduce jitter into the interrupt handling process. and Stop Derived States section of Chapter 1. code is an error code. do not set the Wait VI to wait for an interrupt indefinitely. Refer to the Init. The default is no error. DevStatus describes the error status before this VI or function runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the CompactRIO device takes longer to recognize and handle the interrupt. return to the Wait VI. If status is FALSE. The default is an empty string. InterruptRef specifies a reference to the interrupt you want to use. specify a finite time for the CompactRIO device to wait for an interrupt. The smaller the Timeout (ms). Timeout (ms) specifies the time. source specifies the origin of the error or warning and is. The default is 0. Otherwise. for more information about the robot derived states. which specifies to wait indefinitely for an interrupt to occur. to wait for the interrupt. Instead. When the CompactRIO device times out. The default is FALSE. The CompactRIO device might be handling a timeout at the same time an actual interrupt occurs. Overview of the FIRST Robotics Competition. the name of the node that produced the error or warning. InterruptIndex can specify a value between 0 and 7. If status is TRUE. code is 0 or a warning code. the greater the likelihood of introducing jitter.com . LabVIEW Robotics Programming Guide for FRC 27-6 ni. InterruptIndex specifies the index of the reserved interrupt. Execute. the robot program might hang if no interrupts occur when you shut down the robot. code is the error or warning code. in milliseconds. If InterruptIndex is Invalid. Therefore.Chapter 27 Interrupts VIs If you specify a program to handle the Stop derived state of the robot instead of aborting the robot program directly. check if the robot is shutting down. If the robot is not shutting down. The default is –1. this VI returns an error. in most cases.

Timed Out returns TRUE if the time you specified with the Timeout (ms) input has passed without the CompactRIO device receiving an interrupt. If status is TRUE. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. code is the error or warning code. This node runs normally only if no error occurred before this node runs. it runs normally and sets its own error status in error out. Timed Out returns FALSE. code is an error code. source specifies the origin of the error or warning and is. If an error occurs while this node runs. The default is no error. the node passes the error in (no error) value to error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurred before this node runs. InterruptIndex returns the index of the reserved interrupt. If status is FALSE. InterruptIndex can return a value between 0 and 7. code is the error or warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error.Chapter 27 Interrupts VIs error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. InterruptRef returns a reference to the interrupt. the name of the node that produced the error or warning. The default is FALSE. and this VI returns an error. If status is FALSE. in most cases. the VI did not find the interrupt you specified. The default is an empty string. code is an error code. code is 0 or a warning code. code is 0 or a warning code. The default is 0. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. © National Instruments Corporation 27-7 LabVIEW Robotics Programming Guide for FRC . DevStatus describes the error status that this VI or function produces. If InterruptIndex returns a value of Invalid. Otherwise.

LabVIEW Robotics Programming Guide for FRC 27-8 ni. Otherwise.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. code is 0 or a warning code.Chapter 27 Interrupts VIs error out contains error information. code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. in most cases. If status is TRUE. If status is FALSE. it describes the error status that this VI or function produces. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran.

IO VIs 28 Refer to the LabVIEW Help. © National Instruments Corporation 28-1 LabVIEW Robotics Programming Guide for FRC . for the latest information about the IO VIs. Use the IO VIs to send and receive analog and digital data from a module on the CompactRIO device. available by selecting Help»Search the LabVIEW Help.

for the latest information about the Joystick VIs. the robot moves in response to commands it receives from the joysticks.0 implies the fastest speed in one direction. Use the Joystick VIs to get information about one or more joysticks you connect to the driver station.0. the faster the object moves in that direction.0.0 and 1.0. Joystick 1 has resolution of 256 × 256. The following figure demonstrates how to open a reference to joystick 1. © National Instruments Corporation 29-1 LabVIEW Robotics Programming Guide for FRC . set the Scaler value to 127. available by selecting Help»Search the LabVIEW Help. and values between 0 and 127 are scaled to values between 0. where 1.0 implies the fastest speed in the opposite direction. Most analog joysticks have a resolution of 256 × 256. You can connect up to four joysticks to the driver station. so you set the Scaler input of the Get VI to 127. The Joystick VIs use axis values between –1.Joystick VIs 29 Refer to the LabVIEW Help.0 and 0. if the resolution of the joystick is 256 × 256. Use the Open VI to create a JoystickDevRef reference cluster that you then can wire to the other Joystick VIs. The farther you move the joystick in a certain direction. Values between –127 and 0 are scaled to values between –1. Analog joysticks use a pair of potentiometers or Hall sensors and magnets to measure left-to-right movement and forward-and-back movement. For example. In the Teleop mode of the FIRST Robotics Competition (FRC).0 and 1.0. and –1. and use those values to specify the Y axis value (Speed) and X axis value (Curve) inputs for the ArcadeDrive VI. Use the Scaler value of the Get and GetAxis VIs to scale the joystick values to values between –1.0 and 1. get the button values and scaled axis values for that joystick.

from 1–4. Use the GetRawValue VI to return button and raw axis information about the joystick. JoystickDevRef specifies a reference to the joystick you want to use. LabVIEW Robotics Programming Guide for FRC 29-2 ni. to which you connected the joystick. Get.vi Returns button and scaled axis information about a joystick that you specify. Close.vi Closes a reference to the joystick you specify.Chapter 29 Joystick VIs The RobotDrive VIs in the previous figure control a two-wheeled robot using Jaguar motor controllers. Use this VI to close each joystick reference that you open with the Open VI. The ArcadeDrive VI computes the motor speed from the Y axis value (Speed) and X axis value (Curve) values you specify.com . Device specifies the port on the driver station. Use the GetAxis VI to return the scaled value of a specific axis of the joystick.

Chapter 29 Joystick VIs JoystickDevRef specifies a reference to the joystick you want to use. JoystickDevRef returns a reference to the joystick. axis 2 (y) returns the scaled y-axis value of the joystick that the FRC kit provides. axis 5 returns a scaled value of the joystick. axis 1 (x) returns the scaled x-axis value of the joystick that the FIRST Robotics Competition (FRC) kit provides. Buttons returns the values of the buttons on the joystick. The value to which axis 5 corresponds is dependent on the joystick or axis configuration you use. axis 4 returns a scaled value of the joystick. axis 2 (y) might return the value of a different axis if you use a different joystick or configure the axes differently. to which you connected the joystick. axis 1 (x) might return the value of a different axis if you use a different joystick or configure the axes differently. axis 3 (throttle) might return the value of a different axis if you use a different joystick or configure the axes differently. Button 2 returns TRUE when button 2 on the joystick is pressed. Button 1 returns TRUE when button 1 on the joystick is pressed. The value to which axis 4 corresponds is dependent on the joystick or axis configuration you use. The default is 127. Device returns the port on the driver station. axis 3 (throttle) returns the scaled throttle value of the joystick that the FRC kit provides. Scaler specifies the scaling value this VI uses to calculate the scaled joystick value. from 1–4. to which you connected the joystick. The value to which axis 6 corresponds is dependent on the joystick or axis configuration you use. Device specifies the port on the driver station. from 1–4. Axes returns the scaled axis information for the joystick. © National Instruments Corporation 29-3 LabVIEW Robotics Programming Guide for FRC . axis 6 returns a scaled value of the joystick.

vi Returns the scaled value of an axis of a joystick that you specify.Chapter 29 Joystick VIs Button 3 returns TRUE when button 3 on the joystick is pressed. Button 8 returns TRUE when button 8 on the joystick is pressed. Button 4 returns TRUE when button 4 on the joystick is pressed. Button 6 returns TRUE when button 6 on the joystick is pressed. from 1–4. Button 9 returns TRUE when button 9 on the joystick is pressed.com . Button 7 returns TRUE when button 7 on the joystick is pressed. JoystickDevRef specifies a reference to the joystick you want to use. to which you connected the joystick. The default is 127. Button 10 returns TRUE when button 10 on the joystick is pressed. LabVIEW Robotics Programming Guide for FRC 29-4 ni. Button 12 returns TRUE when button 12 on the joystick is pressed. GetAxis. Button 5 returns TRUE when button 5 on the joystick is pressed. Button 11 returns TRUE when button 11 on the joystick is pressed. Scaler specifies the scaling value this VI uses to calculate the scaled joystick value. Use the GetRawValue VI to return raw axis information about the joystick. Axis specifies the axis whose scaled value you want this VI to return. Device specifies the port on the driver station.

axis 4 returns a raw value of the joystick. Value returns the scaled axis value of the joystick you specified. to which you connected the joystick. Axes returns the raw axis information for the joystick. axis 1 (x) might return the value of a different axis if you use a different joystick or configure the axes differently. to which you connected the joystick. axis 3 (throttle) might return the value of a different axis if you use a different joystick or configure the axes differently. © National Instruments Corporation 29-5 LabVIEW Robotics Programming Guide for FRC . from 1–4.Chapter 29 Joystick VIs JoystickDevRef returns a reference to the joystick. axis 2 (y) might return the value of a different axis if you use a different joystick or configure the axes differently. JoystickDevRef returns a reference to the joystick. Use the Get VI to return button and scaled axis information about the joystick. Device returns the port on the driver station. JoystickDevRef specifies a reference to the joystick you want to use. from 1–4. from 1–4. axis 3 (throttle) returns the raw throttle value of the joystick that the FRC kit provides. The value to which axis 4 corresponds is dependent on the joystick or axis configuration you use. axis 1 (x) returns the raw x-axis value of the joystick that the FIRST Robotics Competition (FRC) kit provides. axis 2 (y) returns the raw y-axis value of the joystick that the FRC kit provides. Device specifies the port on the driver station. GetRawValue. to which you connected the joystick.vi Returns button and raw axis information about a joystick that you specify. Device returns the port on the driver station.

Button 7 returns TRUE when button 7 on the joystick is pressed. Button 10 returns TRUE when button 10 on the joystick is pressed. Button 9 returns TRUE when button 9 on the joystick is pressed. Button 8 returns TRUE when button 8 on the joystick is pressed. Button 5 returns TRUE when button 5 on the joystick is pressed. Buttons returns the values of the buttons on the joystick. axis 6 returns a raw value of the joystick. The value to which axis 5 corresponds is dependent on the joystick or axis configuration you use.Chapter 29 Joystick VIs axis 5 returns a raw value of the joystick. Button 12 returns TRUE when button 12 on the joystick is pressed. Button 11 returns TRUE when button 11 on the joystick is pressed. LabVIEW Robotics Programming Guide for FRC 29-6 ni. Button 6 returns TRUE when button 6 on the joystick is pressed.com . The value to which axis 6 corresponds is dependent on the joystick or axis configuration you use. Button 2 returns TRUE when button 2 on the joystick is pressed. Button 4 returns TRUE when button 4 on the joystick is pressed. Button 1 returns TRUE when button 1 on the joystick is pressed. Button 3 returns TRUE when button 3 on the joystick is pressed.

© National Instruments Corporation 29-7 LabVIEW Robotics Programming Guide for FRC . from 1–4. After you open a reference to the joystick. from 1–4. JoystickDevice specifies the port on the driver station. You must open a reference before using any other VIs on this palette.Chapter 29 Joystick VIs Open. Device returns the port on the driver station. you can use the other Joystick VIs to read the button and axis values of the joystick. to which you connected the joystick. to which you connected the joystick.vi Opens a reference to the joystick you specify. JoystickDevRef returns a reference to the joystick.

The default is no error. code is 0 or a warning code. Use the MotorControl VIs to control the speed and direction of motors. MotorControlDevRef specifies a reference to the motor controller you want to use. code is the error or warning code. Use the Open VI to create a MotorControlDevRef reference cluster that you then can wire to the other MotorControl VIs. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. use the Jaguar instance of the Open VI to open a reference to the Jaguar motor controller and use the Close VI to close that reference. The Close VI closes references to either the Jaguar or Victor motor control references that you open with the Open VI.MotorControl VIs 30 Refer to the LabVIEW Help. If status is TRUE. If status is FALSE. The default is FALSE.vi Closes the reference to the motor controller you specify. Close. © National Instruments Corporation 30-1 LabVIEW Robotics Programming Guide for FRC . For example. DeviceStatus describes the error status before this VI or function runs. available by selecting Help»Search the LabVIEW Help. for the latest information about the MotorControl VIs. Use this VI to close each motor control reference that you open with the Open VI.

centerPwm specifies the center value of the PWM signal. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. If DIO Module specifies a value of Default. maxNegativePwm is the minimum value of the deadband. the name of the node that produced the error or warning. If PWM Channel is Invalid. this VI returns an error. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. or the module in slot 4. PWM Channel can specify a value between PWM 1 and PWM 10. this VI uses the default digital module.com . minPositivePwm specifies the minimum positive value of the signal that creates a response. angularRange specifies the maximum range of the servo. maxPositivePwm specifies the maximum value of the signal. DIO Module can specify a value of Slot 4 or Slot 6. DeadBand specifies the range of the deadband for the signal. maxNegativePwm specifies the maximum negative value of the signal that creates a response. Name identifies the PWM signal and deadband. LabVIEW Robotics Programming Guide for FRC 30-2 ni. The default is an empty string. The default digital module is the first digital module. minPositivePwm is the maximum value of the deadband. minNegativePwm specifies the minimum value of the signal. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. in most cases. The deadband is a range in the signal that has no effect on the motor.Chapter 30 MotorControl VIs source specifies the origin of the error or warning and is. if applicable.

Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. it runs normally and sets its own error status in error out. in most cases. code is an error code. The default is FALSE. error out contains the same error information. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. If status is FALSE. If an error occurred before this node runs. the node passes the error in (no error) value to error out. If an error occurs while this node runs. If status is FALSE. This node runs normally only if no error occurred before this node runs. in most cases. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. © National Instruments Corporation 30-3 LabVIEW Robotics Programming Guide for FRC . Otherwise. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. the name of the node that produced the error or warning. If status is TRUE. code is an error code.Chapter 30 MotorControl VIs error in (no error) describes error conditions that occur before this node runs. If status is TRUE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. error out contains error information. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces. code is 0 or a warning code. The default is an empty string. The default is 0.

The default is FALSE. The default is no error. The default is an empty string. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. source specifies the origin of the error or warning and is. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. MotorControlDevRef specifies a reference to the motor controller you want to use. If status is TRUE. DeadBand specifies the range of the deadband for the signal. DeviceStatus describes the error status before this VI or function runs. The deadband is a range in the signal that has no effect on the motor. The default digital module is the first digital module.com . DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. LabVIEW Robotics Programming Guide for FRC 30-4 ni. code is 0 or a warning code. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. this VI uses the default digital module. this VI returns an error. DIO Module can specify a value of Slot 4 or Slot 6. If PWM Channel is Invalid. in most cases. PWM Channel can specify a value between PWM 1 and PWM 10. code is an error code. If status is FALSE. The default is 0. or the module in slot 4.Chapter 30 MotorControl VIs GetSpeed.vi Returns the speed of the motor you specify. If DIO Module specifies a value of Default. code is the error or warning code. the name of the node that produced the error or warning.

centerPwm specifies the center value of the PWM signal. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. maxNegativePwm is the minimum value of the deadband. This node runs normally only if no error occurred before this node runs. error in (no error) describes error conditions that occur before this node runs. minPositivePwm specifies the minimum positive value of the signal that creates a response. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. If an error occurs while this node runs. maxPositivePwm specifies the maximum value of the signal. code is an error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. it runs normally and sets its own error status in error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. © National Instruments Corporation 30-5 LabVIEW Robotics Programming Guide for FRC . maxNegativePwm specifies the maximum negative value of the signal that creates a response. If status is TRUE. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. code is 0 or a warning code. If status is FALSE. The default is no error. minPositivePwm is the maximum value of the deadband.Chapter 30 MotorControl VIs Name identifies the PWM signal and deadband. The default is an empty string. The default is 0. code is the error or warning code. the name of the node that produced the error or warning. if applicable. angularRange specifies the maximum range of the servo. minNegativePwm specifies the minimum value of the signal. If an error occurred before this node runs. The default is FALSE.

TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. in most cases. DeadBand returns the range of the deadband for the signal. and this VI returns an error. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. If DIO Module returns a value of Default. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. If PWM Channel returns a value of Invalid. DIO Module can return a value of Slot 4 or Slot 6. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. LabVIEW Robotics Programming Guide for FRC 30-6 ni. code is the error or warning code. or the module in slot 4. maxPositivePwm returns the maximum value of the signal. If status is TRUE. code is an error code. this VI uses the default digital module. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. the VI did not find the digital channel you specified. source specifies the origin of the error or warning and is.Chapter 30 MotorControl VIs MotorControlDevRef returns a reference to the motor controller you want to use.com . PWM Channel can return a value between PWM 1 and PWM 10. Name returns a reference for the PWM signal. DeviceStatus describes the error status that this VI or function produces. the name of the node that produced the error or warning. The default digital module is the first digital module.

Speed returns the scaled value from the PWM. error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. maxNegativePwm returns the maximum negative value of the signal that creates a response. angularRange returns the maximum range of the servo. if applicable. The scaled value ranges from –1.Chapter 30 MotorControl VIs minPositivePwm returns the minimum positive value of the signal that creates a response. the name of the node that produced the error or warning. code is 0 or a warning code. Otherwise. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is.0 to 1. If error in indicates that an error occurred before this VI or function ran. error out contains the same error information. centerPwm returns the center value of the PWM signal. If status is FALSE. the range of the scaled values depends on the custom scaling you specify with the TransformRef and InvTransformRef converters. minNegativePwm returns the minimum value of the signal. in most cases. Otherwise. code is an error code. minPositivePwm is the maximum value of the deadband. If status is TRUE. maxNegativePwm is the minimum value of the deadband. it describes the error status that this VI or function produces. Use these converters if you need to apply a non-linear transformation to the motor control signal to compensate for the characteristics of the motor. code is the error or warning code.0. © National Instruments Corporation 30-7 LabVIEW Robotics Programming Guide for FRC .

Use the SetValue VI to set the PWM using a raw value from 0 to 255. The default digital module is the first digital module.Chapter 30 MotorControl VIs SetSpeed. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. LabVIEW Robotics Programming Guide for FRC 30-8 ni. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. MotorControlDevRef specifies a reference to the motor controller you want to use. code is 0 or a warning code. The default is no error. this VI returns an error. If status is FALSE. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. If DIO Module specifies a value of Default. If status is TRUE. The default is 0. this VI uses the default digital module. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. PWM Channel can specify a value between PWM 1 and PWM 10. or the module in slot 4.0. The default is an empty string. The default is FALSE. the name of the node that produced the error or warning. If PWM Channel is Invalid. The deadband is a range in the signal that has no effect on the motor.com . DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. DeadBand specifies the range of the deadband for the signal. code is the error or warning code. DeviceStatus describes the error status before this VI or function runs.0 to 1. source specifies the origin of the error or warning and is. DIO Module can specify a value of Slot 4 or Slot 6.vi Specifies the motion of the PWM using a scaled value from –1.

Otherwise. the range of the scaled values depends on the custom scaling you specify with the TransformRef and InvTransformRef converters. code is 0 or a warning code.0 to 1. If an error occurs while this node runs. minNegativePwm specifies the minimum value of the signal. If an error occurred before this node runs. The default is 0. angularRange specifies the maximum range of the servo. the scaled value can range from –1. minPositivePwm specifies the minimum positive value of the signal that creates a response. maxNegativePwm is the minimum value of the deadband. The default is FALSE. centerPwm specifies the center value of the PWM signal.Chapter 30 MotorControl VIs Name identifies the PWM signal and deadband. code is the error or warning code. the node passes the error in (no error) value to error out. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. maxNegativePwm specifies the maximum negative value of the signal that creates a response. The default is no error. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.0. code is an error code. if applicable. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. maxPositivePwm specifies the maximum value of the signal. Use exception control to treat what is normally an error as no error or to treat a warning as an error. error in (no error) describes error conditions that occur before this node runs. Speed specifies the scaled value of the PWM. If you use a Jaguar or Victor motor controller. it runs normally and sets its own error status in error out. If status is TRUE. © National Instruments Corporation 30-9 LabVIEW Robotics Programming Guide for FRC . minPositivePwm is the maximum value of the deadband. If status is FALSE. This node runs normally only if no error occurred before this node runs.

LabVIEW Robotics Programming Guide for FRC 30-10 ni. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. Name returns a reference for the PWM signal. If PWM Channel returns a value of Invalid. or the module in slot 4. code is 0 or a warning code. code is an error code. The default is an empty string. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. in most cases. DeviceStatus describes the error status that this VI or function produces. maxPositivePwm returns the maximum value of the signal. PWM Channel can return a value between PWM 1 and PWM 10.Chapter 30 MotorControl VIs source specifies the origin of the error or warning and is.com . The default digital module is the first digital module. in most cases. this VI uses the default digital module. the name of the node that produced the error or warning. the VI did not find the digital channel you specified. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. If status is FALSE. If DIO Module returns a value of Default. and this VI returns an error. DIO Module can return a value of Slot 4 or Slot 6. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. MotorControlDevRef returns a reference to the motor controller you want to use. code is the error or warning code. DeadBand returns the range of the deadband for the signal. the name of the node that produced the error or warning. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. If status is TRUE.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. minNegativePwm returns the minimum value of the signal. error out contains error information. If error in indicates that an error occurred before this VI or function ran. minPositivePwm is the maximum value of the deadband. angularRange returns the maximum range of the servo. it describes the error status that this VI or function produces. in most cases. code is the error or warning code. code is 0 or a warning code. If status is FALSE. source specifies the origin of the error or warning and is. code is an error code. if applicable. Otherwise.Chapter 30 MotorControl VIs minPositivePwm returns the minimum positive value of the signal that creates a response. If status is TRUE. error out contains the same error information. maxNegativePwm returns the maximum negative value of the signal that creates a response. centerPwm returns the center value of the PWM signal. © National Instruments Corporation 30-11 LabVIEW Robotics Programming Guide for FRC . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the name of the node that produced the error or warning. maxNegativePwm is the minimum value of the deadband.

code is 0 or a warning code. You can use PWM signals to drive motor controllers. Use the VIs on this palette with custom motor controllers. available by selecting Help»Search the LabVIEW Help. Use the PWM VIs to generate a hobby-style pulse width modulation (PWM) signal. Use the Open VI to create a PWMDeviceRef reference cluster that you then can wire to the other PWM VIs. DeviceStatus describes the error status before this VI or function runs. for the latest information about the PWM VIs. If status is FALSE. PWMDeviceRef specifies a reference to the PWM you want to use. use the VI to open this reference. The default is 0. Close. Otherwise. If status is TRUE.vi Closes the reference to the PWM or motor controller you specify.PWM VIs 31 Refer to the LabVIEW Help. use the VIs on the RobotDrive or MotorControl palettes to use PWM for those devices. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 31-1 LabVIEW Robotics Programming Guide for FRC . Otherwise. code is an error code. The default is FALSE. Use the specific motor controller or servo Open VI to open this reference when possible. Use this VI to close each PWM reference that you open with the Open VI. The default is no error.

The deadband is a range in the signal that has no effect on the motor. this VI returns an error. this VI uses the default digital module. centerPwm specifies the center value of the PWM signal. maxNegativePwm is the minimum value of the deadband. LabVIEW Robotics Programming Guide for FRC 31-2 ni. angularRange specifies the maximum range of the servo. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. minPositivePwm is the maximum value of the deadband. DIO Module can specify a value of Slot 4 or Slot 6. If DIO Module specifies a value of Default. PWM Channel can specify a value between PWM 1 and PWM 10. DeadBand specifies the range of the deadband for the signal. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. if applicable. minNegativePwm specifies the minimum value of the signal. or the module in slot 4. the name of the node that produced the error or warning. maxPositivePwm specifies the maximum value of the signal. in most cases. The default digital module is the first digital module. maxNegativePwm specifies the maximum negative value of the signal that creates a response. minPositivePwm specifies the minimum positive value of the signal that creates a response.Chapter 31 PWM VIs source specifies the origin of the error or warning and is.com . If PWM Channel is Invalid. Name identifies the PWM signal and deadband. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. The default is an empty string.

in most cases. The default is an empty string. Otherwise. error out contains the same error information. the node passes the error in (no error) value to error out. code is 0 or a warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. The default is FALSE. © National Instruments Corporation 31-3 LabVIEW Robotics Programming Guide for FRC . If status is FALSE. code is the error or warning code. If an error occurred before this node runs. This node runs normally only if no error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE.Chapter 31 PWM VIs error in (no error) describes error conditions that occur before this node runs. The default is 0. code is an error code. code is 0 or a warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it describes the error status that this VI or function produces. in most cases. If status is TRUE. code is an error code. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error. the name of the node that produced the error or warning. If an error occurs while this node runs. If status is TRUE. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. code is the error or warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If error in indicates that an error occurred before this VI or function ran. error out contains error information.

Use this VI with custom motor controllers. If DIO Module specifies a value of Default. or the module in slot 4. this VI uses the default digital module. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 31 PWM VIs GetValue. a value of 255 puts the motor controller in full forward. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. in most cases. The default is FALSE. and a value of 0 disables the motor controller. A value of 1 puts the motor controller in full reverse. code is the error or warning code. this VI returns an error. use the VI to open this reference.vi Returns the raw value from the PWM you specify. PWMDeviceRef specifies a reference to the PWM you want to use. source specifies the origin of the error or warning and is. Use the specific motor controller or servo Open VI to open this reference when possible. If status is FALSE. Use the GetSpeed VI on the MotorControl palette to return PWM values from the Jaguar or Victor motor controllers. code is an error code. Otherwise. The default is 0.com . the name of the node that produced the error or warning. If status is TRUE. The raw PWM value ranges from 0 to 255. LabVIEW Robotics Programming Guide for FRC 31-4 ni. The default digital module is the first digital module. DIO Module can specify a value of Slot 4 or Slot 6. DeviceStatus describes the error status before this VI or function runs. The default is no error. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. PWM Channel can specify a value between PWM 1 and PWM 10. The default is an empty string. If PWM Channel is Invalid.

minNegativePwm specifies the minimum value of the signal. centerPwm specifies the center value of the PWM signal. Use exception control to treat what is normally an error as no error or to treat a warning as an error. maxNegativePwm specifies the maximum negative value of the signal that creates a response. If an error occurs while this node runs. If an error occurred before this node runs. code is the error or warning code. The default is no error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE.Chapter 31 PWM VIs TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. code is an error code. The default is 0. DeadBand specifies the range of the deadband for the signal. if applicable. angularRange specifies the maximum range of the servo. the node passes the error in (no error) value to error out. error in (no error) describes error conditions that occur before this node runs. maxNegativePwm is the minimum value of the deadband. maxPositivePwm specifies the maximum value of the signal. code is 0 or a warning code. Name identifies the PWM signal and deadband. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. minPositivePwm is the maximum value of the deadband. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. © National Instruments Corporation 31-5 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. This node runs normally only if no error occurred before this node runs. minPositivePwm specifies the minimum positive value of the signal that creates a response. If status is FALSE. it runs normally and sets its own error status in error out. The deadband is a range in the signal that has no effect on the motor. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

the name of the node that produced the error or warning. If status is TRUE. and this VI returns an error. DIO Module can return a value of Slot 4 or Slot 6. The default digital module is the first digital module. LabVIEW Robotics Programming Guide for FRC 31-6 ni.Chapter 31 PWM VIs source specifies the origin of the error or warning and is. DeadBand returns the range of the deadband for the signal. DeviceStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. this VI uses the default digital module. code is the error or warning code. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. the VI did not find the digital channel you specified. in most cases. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. The PWM specifies the amount of power sent to the motors. If DIO Module returns a value of Default. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. Name returns a reference for the PWM signal. PWM Channel can return a value between PWM 1 and PWM 10. If PWM Channel returns a value of Invalid. The default is an empty string. PWMDeviceRef returns a reference to the PWM. code is 0 or a warning code. or the module in slot 4. If status is FALSE. the name of the node that produced the error or warning. in most cases.com . source specifies the origin of the error or warning and is. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. code is an error code. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction.

Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. a value of 255 puts the motor controller in full forward. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. minNegativePwm returns the minimum value of the signal. centerPwm returns the center value of the PWM signal. A value of 1 puts the motor controller in full reverse. angularRange returns the maximum range of the servo. it describes the error status that this VI or function produces. code is 0 or a warning code. minPositivePwm is the maximum value of the deadband. If status is FALSE. Value returns the PWM value between 0 and 255. in most cases. the name of the node that produced the error or warning.Chapter 31 PWM VIs maxPositivePwm returns the maximum value of the signal. minPositivePwm returns the minimum positive value of the signal that creates a response. source specifies the origin of the error or warning and is. maxNegativePwm is the minimum value of the deadband. Otherwise. error out contains error information. maxNegativePwm returns the maximum negative value of the signal that creates a response. © National Instruments Corporation 31-7 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. and a value of 0 disables the motor controller. error out contains the same error information. if applicable. code is an error code.

PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. Select a value between PWM 1 and PWM 10.Chapter 31 PWM VIs Open. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. you can use the Close VI to close the reference. If PWM Channel is Invalid. The default is no error. You must open a reference before using any other PWM VIs. This node runs normally only if no error occurred before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. You also can select Default to specify the slot of the default digital module. the center of the signal is 128. The Open VI on the PWM palette opens references to custom motor controllers. it runs normally and sets its own error status in error out. By default. or the module in slot 4. DIO Module (Slot 4) specifies the slot number on the CompactRIO device of the digital module you want to use. You must use the Open VI on the RobotDrive or MotorControl palettes to open references to those devices. After you open a reference to the PWM. For example.vi Opens a reference to the PWM port you specify. the node passes the error in (no error) value to error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.com . LabVIEW Robotics Programming Guide for FRC 31-8 ni. The default is FALSE. The default is PWM 1. The default digital module is the first digital module. The default is Slot 4. Select Slot 4 or Slot 6. error in (no error) describes error conditions that occur before this node runs. If an error occurred before this node runs. this VI returns an error. use the Jaguar instance of the Open VI on the MotorControl palette to open a reference to the Jaguar motor controller. If an error occurs while this node runs.

If DIO Module returns a value of Default. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. source specifies the origin of the error or warning and is. DeadBand returns the range of the deadband for the signal. PWMDeviceRef returns a reference to the PWM. or the module in slot 4. DeviceStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The PWM specifies the amount of power sent to the motors. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. code is an error code. in most cases. © National Instruments Corporation 31-9 LabVIEW Robotics Programming Guide for FRC . If status is TRUE.Chapter 31 PWM VIs code is the error or warning code. If PWM Channel returns a value of Invalid. and this VI returns an error. If status is FALSE. code is the error or warning code. the name of the node that produced the error or warning. The default is 0. If status is FALSE. in most cases. this VI uses the default digital module. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. source specifies the origin of the error or warning and is. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. code is an error code. code is 0 or a warning code. DIO Module can return a value of Slot 4 or Slot 6. If status is TRUE. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. The default is an empty string. the VI did not find the digital channel you specified. The default digital module is the first digital module. the name of the node that produced the error or warning. PWM Channel can return a value between PWM 1 and PWM 10. code is 0 or a warning code.

Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. minPositivePwm is the maximum value of the deadband. centerPwm returns the center value of the PWM signal. the name of the node that produced the error or warning. if applicable. maxNegativePwm returns the maximum negative value of the signal that creates a response. code is the error or warning code. minNegativePwm returns the minimum value of the signal. If status is FALSE. angularRange returns the maximum range of the servo. Otherwise.Chapter 31 PWM VIs Name returns a reference for the PWM signal. error out contains error information. code is an error code.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains the same error information. code is 0 or a warning code. If error in indicates that an error occurred before this VI or function ran. LabVIEW Robotics Programming Guide for FRC 31-10 ni. maxNegativePwm is the minimum value of the deadband. in most cases. If status is TRUE. it describes the error status that this VI or function produces. minPositivePwm returns the minimum positive value of the signal that creates a response. source specifies the origin of the error or warning and is. maxPositivePwm returns the maximum value of the signal.

If DIO Module specifies a value of Default. source specifies the origin of the error or warning and is. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. use the VI to open this reference. The default is an empty string. this VI returns an error. the name of the node that produced the error or warning. in most cases. The default is 0. DeviceStatus describes the error status before this VI or function runs. code is an error code. or the module in slot 4. PWMDeviceRef specifies a reference to the PWM you want to use. DeadBand specifies the range of the deadband for the signal. Use the specific motor controller or servo Open VI to open this reference when possible. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. code is 0 or a warning code. Otherwise.Chapter 31 PWM VIs SetPeriodMultiplier.vi Scales the period of the PWM you specify. If status is FALSE. DIO Module can specify a value of Slot 4 or Slot 6. The default digital module is the first digital module. code is the error or warning code. The default is FALSE. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. PWM Channel can specify a value between PWM 1 and PWM 10. this VI uses the default digital module. If PWM Channel is Invalid. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. © National Instruments Corporation 31-11 LabVIEW Robotics Programming Guide for FRC . The deadband is a range in the signal that has no effect on the motor. If status is TRUE.

minPositivePwm specifies the minimum positive value of the signal that creates a response. If status is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is an error code. Otherwise. If an error occurred before this node runs. maxPositivePwm specifies the maximum value of the signal. it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. LabVIEW Robotics Programming Guide for FRC 31-12 ni. angularRange specifies the maximum range of the servo. You can right-click the PWMPeriodMultiplier input and select Create»Constant to create a ring control from which you can select a multiplier. PWMPeriodMultiplier specifies how much to scale the period of the PWM. centerPwm specifies the center value of the PWM signal. The default is FALSE. minPositivePwm is the maximum value of the deadband. If an error occurs while this node runs. maxNegativePwm is the minimum value of the deadband.com . code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This node runs normally only if no error occurred before this node runs. if applicable. you can wire an unsigned 8-bit integer to the input according to the following table.Chapter 31 PWM VIs Name identifies the PWM signal and deadband. the node passes the error in (no error) value to error out. The default is no error. code is the error or warning code. The default is 0. If status is TRUE. maxNegativePwm specifies the maximum negative value of the signal that creates a response. minNegativePwm specifies the minimum value of the signal. error in (no error) describes error conditions that occur before this node runs.

The default is an empty string. and this VI returns an error. in most cases. If status is TRUE. The PWM specifies the amount of power sent to the motors. If DIO Module returns a value of Default. If status is FALSE. DIO Module can return a value of Slot 4 or Slot 6. in most cases. source specifies the origin of the error or warning and is.Chapter 31 PWM VIs source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. code is an error code. this VI uses the default digital module. PWMDeviceRef returns a reference to the PWM. code is 0 or a warning code. code is the error or warning code. maxPositivePwm returns the maximum value of the signal. The default digital module is the first digital module. If PWM Channel returns a value of Invalid. PWM Channel can return a value between PWM 1 and PWM 10. DeviceStatus describes the error status that this VI or function produces. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. Name returns a reference for the PWM signal. DeadBand returns the range of the deadband for the signal. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. the VI did not find the digital channel you specified. or the module in slot 4. the name of the node that produced the error or warning. the name of the node that produced the error or warning. © National Instruments Corporation 31-13 LabVIEW Robotics Programming Guide for FRC .

source specifies the origin of the error or warning and is. A value of 1 puts the motor controller in full reverse. If status is TRUE. maxNegativePwm returns the maximum negative value of the signal that creates a response. it describes the error status that this VI or function produces. Use this VI with custom motor controllers. code is 0 or a warning code.vi Specifies the motion of the PWM using a PWM value from 0 to 255. maxNegativePwm is the minimum value of the deadband. and a value of 0 disables the motor controller. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. error out contains error information. minNegativePwm returns the minimum value of the signal. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. code is the error or warning code. Use the SetSpeed VI on the MotorControl palette to specify PWM values for the Jaguar or Victor motor controllers.Chapter 31 PWM VIs minPositivePwm returns the minimum positive value of the signal that creates a response. If error in indicates that an error occurred before this VI or function ran. code is an error code. centerPwm returns the center value of the PWM signal. a value of 255 puts the motor controller in full forward. if applicable. angularRange returns the maximum range of the servo. in most cases. If status is FALSE. minPositivePwm is the maximum value of the deadband. SetValue. The raw PWM value ranges from 0 to 255. LabVIEW Robotics Programming Guide for FRC 31-14 ni. error out contains the same error information.com .

code is an error code. Name identifies the PWM signal and deadband. DeviceStatus describes the error status before this VI or function runs. maxPositivePwm specifies the maximum value of the signal. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. this VI returns an error. The default is 0. DIO Module can specify a value of Slot 4 or Slot 6. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. If status is FALSE. Use the specific motor controller or servo Open VI to open this reference when possible. or the module in slot 4. minPositivePwm is the maximum value of the deadband. code is the error or warning code. the name of the node that produced the error or warning. minPositivePwm specifies the minimum positive value of the signal that creates a response. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. © National Instruments Corporation 31-15 LabVIEW Robotics Programming Guide for FRC . code is 0 or a warning code. source specifies the origin of the error or warning and is. If DIO Module specifies a value of Default. The default is FALSE. The default digital module is the first digital module. The deadband is a range in the signal that has no effect on the motor. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If PWM Channel is Invalid. PWM Channel can specify a value between PWM 1 and PWM 10. If status is TRUE. this VI uses the default digital module. The default is no error. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. in most cases. The default is an empty string. use the VI to open this reference.Chapter 31 PWM VIs PWMDeviceRef specifies a reference to the PWM you want to use. DeadBand specifies the range of the deadband for the signal. Otherwise.

If an error occurs while this node runs. maxNegativePwm is the minimum value of the deadband. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. DeviceStatus describes the error status that this VI or function produces. A value of 1 puts the motor controller in full reverse. code is the error or warning code. The default is an empty string. The PWM specifies the amount of power sent to the motors. the name of the node that produced the error or warning. The default is no error. maxNegativePwm specifies the maximum negative value of the signal that creates a response. The default is FALSE. code is an error code. if applicable. it runs normally and sets its own error status in error out. a value of 255 puts the motor controller in full forward. the node passes the error in (no error) value to error out. Use exception control to treat what is normally an error as no error or to treat a warning as an error.Chapter 31 PWM VIs centerPwm specifies the center value of the PWM signal. LabVIEW Robotics Programming Guide for FRC 31-16 ni. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. PWMDeviceRef returns a reference to the PWM. error in (no error) describes error conditions that occur before this node runs. Value specifies the PWM value between 0 and 255. If status is TRUE. If status is FALSE. angularRange specifies the maximum range of the servo. minNegativePwm specifies the minimum value of the signal. code is 0 or a warning code. This node runs normally only if no error occurred before this node runs.com . and a value of 0 disables the motor controller. The default is 0. If an error occurred before this node runs.

the name of the node that produced the error or warning. the VI did not find the digital channel you specified. If status is FALSE. PWM Channel can return a value between PWM 1 and PWM 10. DeadBand returns the range of the deadband for the signal. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values.Chapter 31 PWM VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. minPositivePwm is the maximum value of the deadband. this VI uses the default digital module. code is 0 or a warning code. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. minPositivePwm returns the minimum positive value of the signal that creates a response. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. If status is TRUE. maxNegativePwm returns the maximum negative value of the signal that creates a response. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. If PWM Channel returns a value of Invalid. or the module in slot 4. DIO Module can return a value of Slot 4 or Slot 6. centerPwm returns the center value of the PWM signal. maxNegativePwm is the minimum value of the deadband. The default digital module is the first digital module. © National Instruments Corporation 31-17 LabVIEW Robotics Programming Guide for FRC . and this VI returns an error. source specifies the origin of the error or warning and is. code is the error or warning code. code is an error code. If DIO Module returns a value of Default. in most cases. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. Name returns a reference for the PWM signal. maxPositivePwm returns the maximum value of the signal.

Otherwise. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. code is the error or warning code. code is 0 or a warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.Chapter 31 PWM VIs minNegativePwm returns the minimum value of the signal.com . If status is TRUE. error out contains the same error information. in most cases. angularRange returns the maximum range of the servo. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 31-18 ni. error out contains error information. source specifies the origin of the error or warning and is. If status is FALSE. if applicable. code is an error code.

in which the motor moves. you can specify only whether each motor does or does not move. You can open and close relays to control the power source for a motor or other device. which in turn can start the compressor. either forward or backward. Each digital module on the CompactRIO device contains eight relay channels. If you wire the outputs to two different motors.Relay VIs 32 Refer to the LabVIEW Help. You can use the CompactRIO device to operate a relay that connects a motor to a battery. available by selecting Help»Search the LabVIEW Help. Use the Open VI to create a RelayDevRef reference cluster that you then can wire to the other Relay VIs. © National Instruments Corporation 32-1 LabVIEW Robotics Programming Guide for FRC . the pressure switch can turn the relay on. you can determine the direction. current flows to the motor from the battery. Use the Relay VIs to manipulate relays. If you wire both outputs of a relay to the same motor. However. The following figure demonstrates how to set a relay such that the corresponding motor moves continuously in the forward direction. When the pressure is low. for the latest information about the Relay VIs. When the relay is closed. The relay is connected to relay channel 1 of the default digital module on the CompactRIO device. Most sensors that you use in the FIRST Robotics Competition (FRC) can receive sufficient power from the CompactRIO device. and each relay channel consists of two outputs. You also can use relays with a pressure switch and the Compressor VIs to maintain pressure with a compressor. motors require more power than the CompactRIO device can provide and therefore must receive power directly from a battery.

the True case of the outer Case structure executes. LabVIEW Robotics Programming Guide for FRC 32-2 ni. and the False case moves the motor in the reverse direction. are used as limit switches. respectively. of the digital module in slot 4 of the CompactRIO device. The True case moves the motor in the forward direction. the False case of the outer Case structure executes. If both limit switches are FALSE. A relay is connected to relay channel 1 of the default digital module on the CompactRIO device. connected to channels 1 and 2. Two digital input values.Chapter 32 Relay VIs The following figure demonstrates how to use the Relay VIs and the DigitalInput VIs to control the direction of a motor and to stop the motor if either of two limit switches is triggered. and the motor stops. The Up/Down Boolean then determines which case of the inner Case structure to execute. If one or both limit switches are TRUE.com .

or the module in slot 4.vi Closes the reference to the relay you specify. DIO Module can specify a value of Slot 4 or Slot 6. the name of the node that produced the error or warning. The default is no error. The default is 0. If status is TRUE. this VI uses the default digital module. The default is an empty string. code is the error or warning code. If status is FALSE. DevStatus describes the error status before this VI or function runs. Relay Direction specifies the direction in which a motor corresponding to the relay moves. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 32-3 LabVIEW Robotics Programming Guide for FRC . source specifies the origin of the error or warning and is. RelayDevRef specifies a reference to the relay you want to use. If Relay Channel is Invalid. The default digital module is the first digital module. Use this VI to close each relay reference that you open with the Open VI. code is 0 or a warning code. this VI returns an error. If DIO Module specifies a value of Default.Chapter 32 Relay VIs Close. Relay Channel can specify a value between Relay 1 and Relay 8. code is an error code. The default is FALSE. Relay Channel specifies the channel of the DIO Module to which the relay is connected. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use.

Otherwise. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. code is 0 or a warning code. code is the error or warning code. This node runs normally only if no error occurred before this node runs. source specifies the origin of the error or warning and is. The default is FALSE. code is 0 or a warning code. code is the error or warning code. source specifies the origin of the error or warning and is. error out contains the same error information. LabVIEW Robotics Programming Guide for FRC 32-4 ni. If an error occurred before this node runs. The default is no error. The default is an empty string. If error in indicates that an error occurred before this VI or function ran. in most cases. the name of the node that produced the error or warning. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. error out contains error information. If status is FALSE. the name of the node that produced the error or warning. in most cases. the node passes the error in (no error) value to error out. The default is 0. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.Chapter 32 Relay VIs error in (no error) describes error conditions that occur before this node runs. If status is TRUE. code is an error code. it describes the error status that this VI or function produces. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . If status is FALSE. If an error occurs while this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it runs normally and sets its own error status in error out.

or the module in slot 4. If an error occurred before this node runs. The default is no error. the name of the node that produced the error or warning. The default is 0. © National Instruments Corporation 32-5 LabVIEW Robotics Programming Guide for FRC . it runs normally and sets its own error status in error out. this VI returns an error. error in (no error) describes error conditions that occur before this node runs. This node runs normally only if no error occurred before this node runs. The default is Slot 4. The default digital module is the first digital module. You also can select Default to specify the slot of the default digital module. The default is Relay 1. Relay Direction specifies the direction in which a motor corresponding to the relay moves. Select a value between Relay 1 and Relay 8. in most cases. Relay Channel specifies the channel of the DIO Module to which the relay is connected. If Relay Channel is Invalid.Chapter 32 Relay VIs Open. code is 0 or a warning code. The default is an empty string. If status is FALSE. Select Slot 4 or Slot 6. If status is TRUE.vi Opens a reference to the relay you specify. Use exception control to treat what is normally an error as no error or to treat a warning as an error. DIO Module (Slot 4) specifies the slot number on the CompactRIO device of the digital module you want to use. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. You must open a reference before using any other VIs on this palette. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. code is the error or warning code. The default is FALSE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.

this VI uses the default digital module. code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is 0 or a warning code. the name of the node that produced the error or warning. The default digital module is the first digital module. code is 0 or a warning code. DevStatus describes the error status that this VI or function produces. DIO Module can return a value of Slot 4 or Slot 6. and this VI returns an error.com . status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. Otherwise. source specifies the origin of the error or warning and is. in most cases. Relay Channel can return a value between Relay 1 and Relay 8. in most cases. If status is FALSE. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. If Relay Channel returns a value of Invalid. the VI did not find the relay you specified. the name of the node that produced the error or warning. code is the error or warning code. code is an error code. LabVIEW Robotics Programming Guide for FRC 32-6 ni. error out contains error information. If status is FALSE.Chapter 32 Relay VIs RelayDevRef returns a reference to the relay. it describes the error status that this VI or function produces. If status is TRUE. source specifies the origin of the error or warning and is. Relay Direction returns the direction in which a motor corresponding to the relay moves. If error in indicates that an error occurred before this VI or function ran. If DIO Module returns a value of Default. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains the same error information. Relay Channel returns the channel of the DIO Module to which the relay is connected. or the module in slot 4.

The default digital module is the first digital module. code is an error code. © National Instruments Corporation 32-7 LabVIEW Robotics Programming Guide for FRC . If Relay Channel is Invalid. code is the error or warning code. RelayValue specifies whether the relay is configured to move the motor in a forward or reverse direction. code is 0 or a warning code. or the module in slot 4. If status is FALSE. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. source specifies the origin of the error or warning and is. Relay Channel can specify a value between Relay 1 and Relay 8. The default is an empty string. this VI uses the default digital module.vi Specifies the direction of the motors corresponding to the relay you specify. The default is no error. If DIO Module specifies a value of Default. the name of the node that produced the error or warning. Relay Direction specifies the direction in which a motor corresponding to the relay moves. Relay Channel specifies the channel of the DIO Module to which the relay is connected. RelayDevRef specifies a reference to the relay you want to use. DevStatus describes the error status before this VI or function runs. DIO Module can specify a value of Slot 4 or Slot 6. The default is 0. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. this VI returns an error. The default is FALSE. in most cases.Chapter 32 Relay VIs Set.

in most cases. DIO Module can return a value of Slot 4 or Slot 6. If status is FALSE. The default is FALSE. the node passes the error in (no error) value to error out. the name of the node that produced the error or warning.com . this VI uses the default digital module. If DIO Module returns a value of Default. code is an error code. source specifies the origin of the error or warning and is. The default is no error. code is an error code. If status is TRUE. The default digital module is the first digital module. The default is an empty string. If status is FALSE. code is 0 or a warning code. If an error occurs while this node runs. DevStatus describes the error status that this VI or function produces. in most cases. Use exception control to treat what is normally an error as no error or to treat a warning as an error. or the module in slot 4. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. it runs normally and sets its own error status in error out. code is 0 or a warning code. code is the error or warning code. This node runs normally only if no error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning. If status is TRUE. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 32 Relay VIs error in (no error) describes error conditions that occur before this node runs. If an error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. LabVIEW Robotics Programming Guide for FRC 32-8 ni. RelayDevRef returns a reference to the relay. source specifies the origin of the error or warning and is.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Relay Direction returns the direction in which a motor corresponding to the relay moves. If Relay Channel returns a value of Invalid. If status is TRUE. If error in indicates that an error occurred before this VI or function ran. Otherwise. source specifies the origin of the error or warning and is. error out contains error information. it describes the error status that this VI or function produces. Relay Channel can return a value between Relay 1 and Relay 8. the VI did not find the relay you specified. code is an error code. code is 0 or a warning code. If status is FALSE. © National Instruments Corporation 32-9 LabVIEW Robotics Programming Guide for FRC . error out contains the same error information. and this VI returns an error.Chapter 32 Relay VIs Relay Channel returns the channel of the DIO Module to which the relay is connected. the name of the node that produced the error or warning. in most cases. code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

or holonomic driving and either joystick or autonomous control. Use this VI to close each robot drive reference that you open with the Open2Motor VI or the Open4Motor VI. Use the RobotDrive VIs to configure the motors you use to drive the robot. © National Instruments Corporation 33-1 LabVIEW Robotics Programming Guide for FRC . HolonomicDrive VI. tank.RobotDrive VIs 33 Refer to the LabVIEW Help. TankDrive VI. Close. The RobotDrive VIs configure the motors according to the type of motor controller you use. ensure that you specify negative values for forward movements and positive values for backward movements. If you wire joystick axis information directly from the Joystick VIs to the RobotDrive VIs. available by selecting Help»Search the LabVIEW Help. for the latest information about the RobotDrive VIs. or the manner in which the PWM values determine the movement of the motors. This issue is a concern mainly when you develop autonomous code. RobotDriveDevRef specifies a reference to the robot drive you want to use. Use the Open2Motor VI or the Open4Motor VI to specify the PWM channels you want to use for each motor. You can use the RobotDrive VIs to drive two-motor or four-motor robots using arcade. or the RobotDrive Advanced VIs to specify the control mechanism. if you wire joystick axis values to the RobotDrive VIs. you do not need to manipulate the axis values to move the robot in the intended direction. Human Interface Device (HID) joysticks map forward movements to negative values.vi Closes the reference to the robot drive you specify. Therefore. You then can use the ArcadeDrive VI.

The default digital module is the first digital module. The default is FALSE. the name of the node that produced the error or warning. The default is 0. DIO Module can specify a value of Slot 4 or Slot 6. The default is FALSE. When Invert is FALSE. The default is an empty string. The default is 0. The default is no error. Invert specifies. Motors[] specifies information about the motor you select. the name of the node that produced the error or warning. in most cases. LabVIEW Robotics Programming Guide for FRC 33-2 ni. in most cases. If status is TRUE. source specifies the origin of the error or warning and is. code is 0 or a warning code. the motor moves in the forward direction. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use.Chapter 33 RobotDrive VIs DevStatus describes the error status before this VI or function runs. If status is FALSE. code is an error code. or the module in slot 4. code is the error or warning code.com . The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. this VI returns an error. code is the error or warning code. PWM Channel can specify a value between PWM 1 and PWM 10. If status is TRUE. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. If status is FALSE. when TRUE. code is 0 or a warning code. If DIO Module specifies a value of Default. this VI uses the default digital module. that the motor moves in the reverse direction. DeviceStatus describes the error status before this VI or function runs. If PWM Channel is Invalid. The default is no error.

maxPositivePwm specifies the maximum value of the signal. If an error occurred before this node runs.1 to 1.and y-values to make the robot easier to maneuver. to square the x. DeadBand specifies the range of the deadband for the signal. The greater the sensitivity of the joystick. Sensitivity specifies the sensitivity of the joystick. but a range of 0. centerPwm specifies the center value of the PWM signal. if applicable. The deadband is a range in the signal that has no effect on the motor. Use exception control to treat what is normally an error as no error or to treat a warning as an error. This node runs normally only if no error occurred before this node runs. minNegativePwm specifies the minimum value of the signal. angularRange specifies the maximum range of the servo. Square Inputs causes the joysticks to have finer control and then to saturate quickly. the node passes the error in (no error) value to error out. when TRUE. Use error in © National Instruments Corporation 33-3 LabVIEW Robotics Programming Guide for FRC . If an error occurs while this node runs. Square Inputs specifies. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. maxNegativePwm is the minimum value of the deadband. minPositivePwm specifies the minimum positive value of the signal that creates a response. error in (no error) describes error conditions that occur before this node runs. The default is no error. minPositivePwm is the maximum value of the deadband. Name identifies the PWM signal and deadband. InvTransformRef specifies a reference to the converter that this VI uses to convert speed values to raw values.Chapter 33 RobotDrive VIs TransformRef specifies a reference that allows teams to define a non-linear relationship to compensate for motor response. maxNegativePwm specifies the maximum negative value of the signal that creates a response. The range is open-ended.0 performs well. the more responsive the robot. it runs normally and sets its own error status in error out.

code is the error or warning code. If status is FALSE. it describes the error status that this VI or function produces. error out contains the same error information.com . Holonomic driving allows you to move the robot in any direction without first rotating or maneuvering the robot. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 33-4 ni. code is 0 or a warning code. The default is 0. The default is an empty string. HolonomicDrive. code is an error code. the name of the node that produced the error or warning. The default is FALSE. in most cases. large main wheel mounted on a drive shaft and several smaller rollers around the perimeter of the main wheel. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This VI requires the robot to have four omni-directional wheels and four motors. The robot can travel in any direction by moving the main wheel and the rollers at different speeds. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. code is 0 or a warning code. code is an error code.vi Configures the motors for holonomic driving. in most cases. Otherwise. If error in indicates that an error occurred before this VI or function ran. If status is FALSE. If status is TRUE. The smaller rollers allow the robot to travel in a direction perpendicular to the main wheel without first having to move the main wheel.Chapter 33 RobotDrive VIs (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If status is TRUE. the name of the node that produced the error or warning. error out contains error information. Holonomic drive robots use omni-directional wheels that have a center. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Each wheel must rotate at a particular rotational velocity and direction for the robot to obtain and move along a particular heading.

code is 0 or a warning code. code is an error code. The default is FALSE. the name of the node that produced the error or warning. If status is FALSE. source specifies the origin of the error or warning and is. The default is no error. code is the error or warning code. source specifies the origin of the error or warning and is. DIO Module can specify a value of Slot 4 or Slot 6. in most cases. code is an error code. The default is an empty string. the name of the node that produced the error or warning. © National Instruments Corporation 33-5 LabVIEW Robotics Programming Guide for FRC . The default digital module is the first digital module. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. this VI uses the default digital module.Chapter 33 RobotDrive VIs RobotDriveDevRef specifies a reference to the robot drive you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. If status is TRUE. code is the error or warning code. The default is FALSE. DeviceStatus describes the error status before this VI or function runs. If DIO Module specifies a value of Default. or the module in slot 4. The default is 0. The default is an empty string. in most cases. The default is 0. If status is FALSE. The default is no error. code is 0 or a warning code. DevStatus describes the error status before this VI or function runs. Motors[] specifies information about the motor you select.

InvTransformRef specifies a reference to the converter that this VI uses to convert speed values to raw values. The greater the sensitivity of the joystick. centerPwm specifies the center value of the PWM signal. that the motor moves in the reverse direction. If PWM Channel is Invalid. Invert specifies.Chapter 33 RobotDrive VIs PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. the motor moves in the forward direction. minNegativePwm specifies the minimum value of the signal. minPositivePwm is the maximum value of the deadband.and y-values to make the robot easier to maneuver. minPositivePwm specifies the minimum positive value of the signal that creates a response. Square Inputs causes the joysticks to have finer control and then to saturate quickly.0 performs well. maxNegativePwm is the minimum value of the deadband. TransformRef specifies a reference that allows teams to define a non-linear relationship to compensate for motor response. DeadBand specifies the range of the deadband for the signal. when TRUE.1 to 1. to square the x. PWM Channel can specify a value between PWM 1 and PWM 10.com . Square Inputs specifies. if applicable. maxNegativePwm specifies the maximum negative value of the signal that creates a response. but a range of 0. the more responsive the robot. The deadband is a range in the signal that has no effect on the motor. angularRange specifies the maximum range of the servo. LabVIEW Robotics Programming Guide for FRC 33-6 ni. maxPositivePwm specifies the maximum value of the signal. when TRUE. When Invert is FALSE. Name identifies the PWM signal and deadband. Sensitivity specifies the sensitivity of the joystick. The range is open-ended. this VI returns an error.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 33-7 LabVIEW Robotics Programming Guide for FRC . error in (no error) describes error conditions that occur before this node runs. in most cases. Direction specifies the vector. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is FALSE. code is the error or warning code. at which the robot rotates. Rotation specifies the rate. code is an error code. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. If status is TRUE. source specifies the origin of the error or warning and is. RobotDriveDevRef returns a reference to the robot drive you want to use. in degrees per second. The default is no error. The default is no error. code is an error code. in degrees. code is 0 or a warning code. DevStatus describes the error status before this VI or function runs. This node runs normally only if no error occurred before this node runs. If status is TRUE.Chapter 33 RobotDrive VIs Magnitude specifies the speed at which the robot moves along the Direction vector. If status is FALSE. If an error occurred before this node runs. the node passes the error in (no error) value to error out. code is the error or warning code. If an error occurs while this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. the name of the node that produced the error or warning. it runs normally and sets its own error status in error out. along which the robot moves from its original heading. The default is 0. code is 0 or a warning code. If status is FALSE. The default is an empty string.

PWM Channel can return a value between PWM 1 and PWM 10. LabVIEW Robotics Programming Guide for FRC 33-8 ni. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. The default is an empty string. The default digital module is the first digital module.Chapter 33 RobotDrive VIs source specifies the origin of the error or warning and is. Motors[] returns information about the motor you specify. in most cases. the VI did not find the digital channel you specified.com . the name of the node that produced the error or warning. this VI uses the default digital module. DIO Module can return a value of Slot 4 or Slot 6. source specifies the origin of the error or warning and is. or the module in slot 4. maxPositivePwm returns the maximum value of the signal. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If PWM Channel returns a value of Invalid. If status is TRUE. Name returns a reference for the PWM signal. DeadBand returns the range of the deadband for the signal. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. DeviceStatus describes the error status that this VI or function produces. code is 0 or a warning code. the name of the node that produced the error or warning. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. in most cases. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. code is the error or warning code. code is an error code. and this VI returns an error. If DIO Module returns a value of Default.

Otherwise. If status is FALSE.and y-values. code is the error or warning code. if applicable. © National Instruments Corporation 33-9 LabVIEW Robotics Programming Guide for FRC . maxNegativePwm is the minimum value of the deadband. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. centerPwm returns the center value of the PWM signal. If error in indicates that an error occurred before this VI or function ran. The greater the sensitivity of the joystick. Sensitivity returns the sensitivity of the joystick. angularRange returns the maximum range of the servo. the more responsive the robot. Square Inputs indicates.Chapter 33 RobotDrive VIs minPositivePwm returns the minimum positive value of the signal that creates a response. minPositivePwm is the maximum value of the deadband. code is 0 or a warning code. maxNegativePwm returns the maximum negative value of the signal that creates a response. it describes the error status that this VI or function produces. when TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. that this parameter squares the x. minNegativePwm returns the minimum value of the signal. error out contains the same error information. in most cases. code is an error code. error out contains error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

source specifies the origin of the error or warning and is. The default is FALSE.com . If status is TRUE. If status is FALSE. LabVIEW Robotics Programming Guide for FRC 33-10 ni. Tank driving uses two joysticks where the y-axis values of each joystick specify the power to apply to the motors on either side of the robot. RobotDriveDevRef specifies a reference to the robot drive you want to use. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. Motors[] specifies information about the motor you select. the name of the node that produced the error or warning. DeviceStatus describes the error status before this VI or function runs. The default is no error. The default is 0. code is an error code. code is 0 or a warning code. DevStatus describes the error status before this VI or function runs. code is 0 or a warning code. The default is FALSE.vi Configures the motors for tank driving. The default is an empty string. If status is TRUE. code is the error or warning code. source specifies the origin of the error or warning and is. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. the name of the node that produced the error or warning. The default is no error. code is the error or warning code. The default is an empty string. If status is FALSE.Chapter 33 RobotDrive VIs TankDrive. in most cases.

DeadBand specifies the range of the deadband for the signal. Invert specifies. minPositivePwm specifies the minimum positive value of the signal that creates a response. this VI returns an error. the motor moves in the forward direction. If DIO Module specifies a value of Default. InvTransformRef specifies a reference to the converter that this VI uses to convert speed values to raw values. or the module in slot 4. when TRUE. PWM Channel can specify a value between PWM 1 and PWM 10. centerPwm specifies the center value of the PWM signal. The deadband is a range in the signal that has no effect on the motor. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. if applicable. maxNegativePwm specifies the maximum negative value of the signal that creates a response. that the motor moves in the reverse direction. Name identifies the PWM signal and deadband. © National Instruments Corporation 33-11 LabVIEW Robotics Programming Guide for FRC . TransformRef specifies a reference that allows teams to define a non-linear relationship to compensate for motor response. DIO Module can specify a value of Slot 4 or Slot 6. minPositivePwm is the maximum value of the deadband. The default digital module is the first digital module. When Invert is FALSE. maxNegativePwm is the minimum value of the deadband. If PWM Channel is Invalid. minNegativePwm specifies the minimum value of the signal. maxPositivePwm specifies the maximum value of the signal. angularRange specifies the maximum range of the servo.Chapter 33 RobotDrive VIs DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. this VI uses the default digital module.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Left Axis Value specifies the power to apply to the left motor. RobotDriveDevRef returns a reference to the robot drive you want to use. The range is open-ended. Square Inputs specifies. in most cases. source specifies the origin of the error or warning and is. but a range of 0. The default is FALSE. The default is no error.com . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The greater the sensitivity of the joystick.Chapter 33 RobotDrive VIs Sensitivity specifies the sensitivity of the joystick.and y-values to make the robot easier to maneuver. If status is FALSE. the node passes the error in (no error) value to error out.0 performs well. If an error occurs while this node runs. when TRUE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. it runs normally and sets its own error status in error out. the name of the node that produced the error or warning. The default is 0. LabVIEW Robotics Programming Guide for FRC 33-12 ni. Right Axis Value specifies the power to apply to the right motor. code is an error code.1 to 1. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. The default is FALSE. to square the x. the more responsive the robot. error in (no error) describes error conditions that occur before this node runs. If status is TRUE. The default is no error. The default is an empty string. code is 0 or a warning code. DevStatus describes the error status before this VI or function runs. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Square Inputs causes the joysticks to have finer control and then to saturate quickly.

If status is FALSE. the name of the node that produced the error or warning. Motors[] returns information about the motor you specify. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. source specifies the origin of the error or warning and is. code is an error code. the name of the node that produced the error or warning. The default digital module is the first digital module. © National Instruments Corporation 33-13 LabVIEW Robotics Programming Guide for FRC . Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. in most cases. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. in most cases. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values.Chapter 33 RobotDrive VIs code is the error or warning code. source specifies the origin of the error or warning and is. The default is an empty string. this VI uses the default digital module. code is an error code. DeviceStatus describes the error status that this VI or function produces. If status is TRUE. or the module in slot 4. If status is TRUE. DIO Module can return a value of Slot 4 or Slot 6. and this VI returns an error. code is 0 or a warning code. the VI did not find the digital channel you specified. If status is FALSE. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. code is the error or warning code. If PWM Channel returns a value of Invalid. code is 0 or a warning code. If DIO Module returns a value of Default. PWM Channel can return a value between PWM 1 and PWM 10. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DeadBand returns the range of the deadband for the signal.

error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. that this parameter squares the x. centerPwm returns the center value of the PWM signal. Otherwise. LabVIEW Robotics Programming Guide for FRC 33-14 ni. maxPositivePwm returns the maximum value of the signal. The greater the sensitivity of the joystick. when TRUE. If status is FALSE. minPositivePwm returns the minimum positive value of the signal that creates a response.and y-values. it describes the error status that this VI or function produces.com . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. angularRange returns the maximum range of the servo. If status is TRUE. error out contains the same error information. Square Inputs indicates. code is an error code.Chapter 33 RobotDrive VIs Name returns a reference for the PWM signal. the name of the node that produced the error or warning. maxNegativePwm returns the maximum negative value of the signal that creates a response. minNegativePwm returns the minimum value of the signal. source specifies the origin of the error or warning and is. maxNegativePwm is the minimum value of the deadband. code is the error or warning code. minPositivePwm is the maximum value of the deadband. If error in indicates that an error occurred before this VI or function ran. if applicable. the more responsive the robot. code is 0 or a warning code. in most cases. Sensitivity returns the sensitivity of the joystick.

Use the RobotDrive Advanced VIs to specify the speed and direction of the motors directly.RobotDrive Advanced VIs 34 Refer to the LabVIEW Help. The default is FALSE. code is an error code. code is 0 or a warning code. The default is an empty string. available by selecting Help»Search the LabVIEW Help. RobotDriveDevRef specifies a reference to the robot drive you want to use. Motors. the name of the node that produced the error or warning. DevStatus describes the error status before this VI or function runs.vi Determines the motor configuration and sends the speed values to the appropriate motors. Use the Open2Motor VI or the Open4Motor VI to create a RobotDriveDevRef reference cluster that you then can wire to the Motors VI on this palette. The default is no error. If status is TRUE. The default is 0. for the latest information about the RobotDrive Advanced VIs. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. in most cases. © National Instruments Corporation 34-1 LabVIEW Robotics Programming Guide for FRC . source specifies the origin of the error or warning and is.

The default is no error. that the motor moves in the reverse direction. or the module in slot 4. code is the error or warning code. LabVIEW Robotics Programming Guide for FRC 34-2 ni. The default is 0. code is an error code. TransformRef specifies a reference that allows teams to define a non-linear relationship to compensate for motor response. code is 0 or a warning code. If PWM Channel is Invalid. Invert specifies. this VI uses the default digital module. If status is FALSE. The default digital module is the first digital module. When Invert is FALSE. The default is an empty string. this VI returns an error. The default is FALSE. If DIO Module specifies a value of Default. the motor moves in the forward direction. when TRUE. PWM Channel can specify a value between PWM 1 and PWM 10.Chapter 34 RobotDrive Advanced VIs Motors[] specifies information about the motor you select. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. InvTransformRef specifies a reference to the converter that this VI uses to convert speed values to raw values. the name of the node that produced the error or warning. maxPositivePwm specifies the maximum value of the signal. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. The deadband is a range in the signal that has no effect on the motor.com . DIO Module can specify a value of Slot 4 or Slot 6. DeviceStatus describes the error status before this VI or function runs. DeadBand specifies the range of the deadband for the signal. in most cases. source specifies the origin of the error or warning and is. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. Name identifies the PWM signal and deadband.

The greater the sensitivity of the joystick.and y-values to make the robot easier to maneuver. minPositivePwm is the maximum value of the deadband. if applicable. The default is no error. the more responsive the robot. it runs normally and sets its own error status in error out. RightSpeed specifies the speed for the right motor.0 performs well. LeftSpeed specifies the speed for the left motor.Chapter 34 RobotDrive Advanced VIs minPositivePwm specifies the minimum positive value of the signal that creates a response. Use exception control to treat what is normally an error as no error or to treat a warning as an error. but a range of 0. Select a value between –1 and 1. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. maxNegativePwm is the minimum value of the deadband. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. minNegativePwm specifies the minimum value of the signal. maxNegativePwm specifies the maximum negative value of the signal that creates a response. If an error occurred before this node runs. Select a value between –1 and 1. the node passes the error in (no error) value to error out. when TRUE.1 to 1. centerPwm specifies the center value of the PWM signal. to square the x. Sensitivity specifies the sensitivity of the joystick. error in (no error) describes error conditions that occur before this node runs. This node runs normally only if no error occurred before this node runs. angularRange specifies the maximum range of the servo. © National Instruments Corporation 34-3 LabVIEW Robotics Programming Guide for FRC . Square Inputs causes the joysticks to have finer control and then to saturate quickly. Square Inputs specifies. The default is FALSE. The range is open-ended. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurs while this node runs.

or the module in slot 4. If status is TRUE. this VI uses the default digital module. source specifies the origin of the error or warning and is. code is the error or warning code. the name of the node that produced the error or warning. The default is FALSE. in most cases. source specifies the origin of the error or warning and is. The default is an empty string. RobotDriveDevRef returns a reference to the robot drive you want to use. code is the error or warning code. The default is no error. The default is 0. DeviceStatus describes the error status that this VI or function produces. in most cases. If DIO Module returns a value of Default. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. code is 0 or a warning code. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. The default is 0. DIO Module can return a value of Slot 4 or Slot 6. in most cases. LabVIEW Robotics Programming Guide for FRC 34-4 ni. code is an error code.Chapter 34 RobotDrive Advanced VIs code is the error or warning code. code is an error code. code is 0 or a warning code. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. If status is TRUE. Motors[] returns information about the motor you specify. If status is FALSE. code is an error code. the name of the node that produced the error or warning. DevStatus describes the error status before this VI or function runs. If status is TRUE. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. The default digital module is the first digital module.com .

centerPwm returns the center value of the PWM signal. PWM Channel can return a value between PWM 1 and PWM 10. if applicable. maxNegativePwm is the minimum value of the deadband. minNegativePwm returns the minimum value of the signal. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. The greater the sensitivity of the joystick. when TRUE. If PWM Channel returns a value of Invalid. the VI did not find the digital channel you specified. the more responsive the robot.Chapter 34 RobotDrive Advanced VIs PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. minPositivePwm returns the minimum positive value of the signal that creates a response.and y-values. maxNegativePwm returns the maximum negative value of the signal that creates a response. angularRange returns the maximum range of the servo. Name returns a reference for the PWM signal. maxPositivePwm returns the maximum value of the signal. that this parameter squares the x. minPositivePwm is the maximum value of the deadband. © National Instruments Corporation 34-5 LabVIEW Robotics Programming Guide for FRC . Square Inputs indicates. Sensitivity returns the sensitivity of the joystick. DeadBand returns the range of the deadband for the signal. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. and this VI returns an error.

the name of the node that produced the error or warning. in most cases. code is an error code. If status is TRUE.Chapter 34 RobotDrive Advanced VIs error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. source specifies the origin of the error or warning and is. error out contains the same error information. LabVIEW Robotics Programming Guide for FRC 34-6 ni. If status is FALSE. code is 0 or a warning code.com . Otherwise. code is the error or warning code. If error in indicates that an error occurred before this VI or function ran.

for the latest information about the Sensors VIs. © National Instruments Corporation 35-1 LabVIEW Robotics Programming Guide for FRC . available by selecting Help»Search the LabVIEW Help.Sensors VIs 35 Refer to the LabVIEW Help. Use the Sensors VIs to send and receive information from the sensors you connect to the CompactRIO device.

The default is FALSE. DevStatus describes the error status before this VI or function runs. © National Instruments Corporation 36-1 LabVIEW Robotics Programming Guide for FRC . Serial Port Name specifies the name of the serial port you want to use. for the latest information about the Serial Port VIs. Use the VI to open this reference. Close. source specifies the origin of the error or warning and is. If status is FALSE. Use this VI to close each serial port reference that you open with the Open VI. code is the error or warning code. the name of the node that produced the error or warning. code is an error code. The default is no error. The default is 0. Use the Open VI to create a SerialPortRef reference cluster that you then can wire to the other Serial Port VIs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Serial Port VIs to read data from or write data to a serial device connected to the serial port of the CompactRIO device. code is 0 or a warning code. If status is TRUE. The default is an empty string.Serial Port VIs 36 Refer to the LabVIEW Help. in most cases. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use.vi Closes the reference to the serial port you specify. available by selecting Help»Search the LabVIEW Help.

If status is TRUE. code is an error code. If an error occurs while this node runs. The default is FALSE.Chapter 36 Serial Port VIs error in (no error) describes error conditions that occur before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. it runs normally and sets its own error status in error out. If error in indicates that an error occurred before this VI or function ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. This node runs normally only if no error occurred before this node runs. error out contains error information. The default is no error. error out contains the same error information. code is the error or warning code.com . in most cases. LabVIEW Robotics Programming Guide for FRC 36-2 ni. If status is TRUE. If an error occurred before this node runs. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. If status is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is 0. Otherwise. code is 0 or a warning code. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. code is the error or warning code. The default is an empty string. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it describes the error status that this VI or function produces. code is 0 or a warning code.

Use exception control to treat what is normally an error as no error or to treat a warning as an error. This node runs normally only if no error occurred before this node runs. it runs normally and sets its own error status in error out. The default is an empty string. The default is no error. The default is FALSE.vi Flushes and discards contents of the output buffer of the serial device you specify by writing all the buffered data to the device. the name of the node that produced the error or warning. the node passes the error in (no error) value to error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. in most cases. The default is no error. DevStatus describes the error status before this VI or function runs.Chapter 36 Serial Port VIs Flush. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. © National Instruments Corporation 36-3 LabVIEW Robotics Programming Guide for FRC . code is the error or warning code. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurred before this node runs. The default is 0. source specifies the origin of the error or warning and is. Use the VI to open this reference. Serial Port Name specifies the name of the serial port you want to use. error in (no error) describes error conditions that occur before this node runs. code is an error code.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is the error or warning code.Chapter 36 Serial Port VIs code is the error or warning code. If status is FALSE. source specifies the origin of the error or warning and is. code is an error code. in most cases. code is 0 or a warning code. code is 0 or a warning code. If status is TRUE. If status is TRUE. Otherwise. If error in indicates that an error occurred before this VI or function ran. DevStatus describes the error status that this VI or function produces. error out contains the same error information. If status is FALSE. Serial Port Name returns the name of the serial port you want to use. LabVIEW Robotics Programming Guide for FRC 36-4 ni. the name of the node that produced the error or warning. in most cases. code is the error or warning code. SerialPortRef returns a reference to the serial port. The default is an empty string. in most cases. code is 0 or a warning code. If status is FALSE. source specifies the origin of the error or warning and is. The default is 0. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. it describes the error status that this VI or function produces. the name of the node that produced the error or warning.com . the name of the node that produced the error or warning. error out contains error information. code is an error code.

code is the error or warning code. Use the VI to open this reference. The default is no error. DevStatus describes the error status before this VI or function runs. source specifies the origin of the error or warning and is.vi Returns the number of bytes in the input buffer of the serial device you specify. in most cases. The default is FALSE. code is 0 or a warning code. error in (no error) describes error conditions that occur before this node runs. the node passes the error in (no error) value to error out. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 36 Serial Port VIs GetBytesReceived. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. Serial Port Name specifies the name of the serial port you want to use. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is 0. the name of the node that produced the error or warning. code is an error code. © National Instruments Corporation 36-5 LabVIEW Robotics Programming Guide for FRC . If an error occurs while this node runs. The default is no error. it runs normally and sets its own error status in error out. The default is FALSE.

The default is 0. LabVIEW Robotics Programming Guide for FRC 36-6 ni. Otherwise.Chapter 36 Serial Port VIs code is the error or warning code. The default is an empty string. If status is FALSE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. code is an error code. source specifies the origin of the error or warning and is. code is an error code. code is the error or warning code. it describes the error status that this VI or function produces. in most cases. error out contains error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. If status is FALSE. error out contains the same error information. If status is FALSE. If status is TRUE. code is 0 or a warning code. code is 0 or a warning code. Serial Port Name returns the name of the serial port you want to use.com . code is the error or warning code. If status is TRUE. DevStatus describes the error status that this VI or function produces. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. SerialPortRef returns a reference to the serial port. code is 0 or a warning code. the name of the node that produced the error or warning. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. in most cases. code is an error code. Bytes at Port returns the number of bytes in the input buffer of the serial port.

The default is 9600. Baud Rate specifies the rate of transmission. The default is 5000. Data Bits specifies the number of bits in each data character. error in (no error) describes error conditions that occur before this node runs. it runs normally and sets its own error status in error out. The default is 0xA. in milliseconds. Termination Char (0xA = '\n' = LF) specifies a character that terminates the read operation.Chapter 36 Serial Port VIs Open. which specifies a line feed character. that the serial device terminates a read operation when it reads the Termination Char. © National Instruments Corporation 36-7 LabVIEW Robotics Programming Guide for FRC .vi Opens a reference to the serial port. Stop Bits specifies the number of stop bits that indicate the end of a data character. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Timeout Value (ms) specifies the minimum timeout value. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. when TRUE. Enable Termination Char? (T) specifies. If an error occurs while this node runs. You must open a reference before using any other VIs on this palette. The default is TRUE. to use for the write and read operations. If an error occurred before this node runs. Parity specifies the parity type to use for the parity bit of each data character you want to transmit or receive. Use exception control to treat what is normally an error as no error or to treat a warning as an error. This node runs normally only if no error occurred before this node runs. The default is no error. The default value is 8. the node passes the error in (no error) value to error out. The value of data bits is between five and eight.

the name of the node that produced the error or warning. in most cases. code is 0 or a warning code. If status is FALSE. The default is FALSE. the name of the node that produced the error or warning. in most cases. code is 0 or a warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. DevStatus describes the error status that this VI or function produces. SerialPortRef returns a reference to the serial port. If status is TRUE. code is the error or warning code. Flow Control specifies the type of control used by the transfer mechanism. If status is TRUE. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. LabVIEW Robotics Programming Guide for FRC 36-8 ni. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. in most cases. Serial Port Name returns the name of the serial port you want to use. If status is FALSE. Otherwise. source specifies the origin of the error or warning and is. code is 0 or a warning code. The default is 0. code is the error or warning code. The default is an empty string. code is an error code. error out contains error information. error out contains the same error information.Chapter 36 Serial Port VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code.com . code is the error or warning code. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. source specifies the origin of the error or warning and is. If status is FALSE.

Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it runs normally and sets its own error status in error out. The default is no error. If status is TRUE. If an error occurred before this node runs. the node passes the error in (no error) value to error out. in most cases. If status is FALSE.Chapter 36 Serial Port VIs Read. The default is no error. The default is an empty string. Serial Port Name specifies the name of the serial port you want to use. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If an error occurs while this node runs. DevStatus describes the error status before this VI or function runs. The default is 0. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Num Bytes to Read specifies the number of bytes to read. The default is FALSE. © National Instruments Corporation 36-9 LabVIEW Robotics Programming Guide for FRC . code is 0 or a warning code. source specifies the origin of the error or warning and is. Use the VI to open this reference.vi Reads a specified number of bytes from the serial device you specify. the name of the node that produced the error or warning. This node runs normally only if no error occurred before this node runs. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. The default is FALSE. error in (no error) describes error conditions that occur before this node runs.

Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.Chapter 36 Serial Port VIs code is the error or warning code. The default is 0. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. code is an error code. code is the error or warning code. If status is TRUE. code is 0 or a warning code. source specifies the origin of the error or warning and is. The default is an empty string. the name of the node that produced the error or warning. the name of the node that produced the error or warning. Serial Port Name returns the name of the serial port you want to use. LabVIEW Robotics Programming Guide for FRC 36-10 ni. If status is FALSE. SerialPortRef returns a reference to the serial port. in most cases. error out contains the same error information. DevStatus describes the error status that this VI or function produces. in most cases. code is 0 or a warning code.com . code is an error code. Otherwise. error out contains error information. in most cases. If status is FALSE. the name of the node that produced the error or warning. Buffer returns the data read from the serial device. If status is TRUE. it describes the error status that this VI or function produces. If status is TRUE. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. source specifies the origin of the error or warning and is. code is 0 or a warning code. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

Use the VI to open this reference. it runs normally and sets its own error status in error out. the node passes the error in (no error) value to error out. code is 0 or a warning code. code is the error or warning code. If an error occurred before this node runs.vi Clears the input and output buffers of the serial device you specify. If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. in most cases. If status is FALSE. The default is FALSE. source specifies the origin of the error or warning and is. code is 0 or a warning code. The default is 0. © National Instruments Corporation 36-11 LabVIEW Robotics Programming Guide for FRC . This node runs normally only if no error occurred before this node runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. Serial Port Name specifies the name of the serial port you want to use. Use exception control to treat what is normally an error as no error or to treat a warning as an error. error in (no error) describes error conditions that occur before this node runs. code is an error code.Chapter 36 Serial Port VIs Reset. If status is TRUE. the name of the node that produced the error or warning. The default is an empty string. DevStatus describes the error status before this VI or function runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If status is TRUE. The default is 0. The default is no error. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. code is an error code. The default is FALSE.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. SerialPortRef returns a reference to the serial port. Otherwise. code is an error code. If status is FALSE.Chapter 36 Serial Port VIs source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. Serial Port Name returns the name of the serial port you want to use. code is 0 or a warning code. in most cases. error out contains the same error information. code is the error or warning code. code is 0 or a warning code. code is the error or warning code. DevStatus describes the error status that this VI or function produces. If status is TRUE. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.com . If status is TRUE. error out contains error information. in most cases. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. code is an error code. The default is an empty string. LabVIEW Robotics Programming Guide for FRC 36-12 ni. the name of the node that produced the error or warning. If status is FALSE. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

the node passes the error in (no error) value to error out. The default is an empty string. in milliseconds. The default is no error. Timeout Value (ms) specifies the minimum timeout value. © National Instruments Corporation 36-13 LabVIEW Robotics Programming Guide for FRC . SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. source specifies the origin of the error or warning and is. Use the VI to open this reference. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is the error or warning code. The default is FALSE. The default is 0. If an error occurs while this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error in (no error) describes error conditions that occur before this node runs. If an error occurred before this node runs.Chapter 36 Serial Port VIs SetTimeout. This node runs normally only if no error occurred before this node runs. If status is FALSE. DevStatus describes the error status before this VI or function runs. Serial Port Name specifies the name of the serial port you want to use. If status is TRUE. to use when reading data from or writing data to the serial device. The default is no error. The default is 5000. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. it runs normally and sets its own error status in error out. in most cases. code is an error code. the name of the node that produced the error or warning.vi Specifies the minimum timeout value. to use for the write and read operations. in milliseconds. code is 0 or a warning code.

source specifies the origin of the error or warning and is. code is 0 or a warning code. in most cases. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. LabVIEW Robotics Programming Guide for FRC 36-14 ni. The default is 0. in most cases. If status is FALSE. error out contains the same error information. If status is TRUE. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. If status is FALSE. SerialPortRef returns a reference to the serial port.com . code is the error or warning code. If status is TRUE. If status is TRUE. If status is FALSE. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. code is an error code. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 36 Serial Port VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. in most cases. code is the error or warning code. code is 0 or a warning code. code is 0 or a warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the name of the node that produced the error or warning. code is an error code. Serial Port Name returns the name of the serial port you want to use. code is the error or warning code. source specifies the origin of the error or warning and is. error out contains error information. the name of the node that produced the error or warning.

If an error occurred before this node runs. The default is TRUE. which specifies a line feed character. If status is TRUE. when TRUE. This node runs normally only if no error occurred before this node runs. Enable? (T) specifies. If status is FALSE. Use the VI to open this reference. the name of the node that produced the error or warning. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. © National Instruments Corporation 36-15 LabVIEW Robotics Programming Guide for FRC .Chapter 36 Serial Port VIs Termination. Use exception control to treat what is normally an error as no error or to treat a warning as an error. source specifies the origin of the error or warning and is. The default is FALSE. code is the error or warning code. it runs normally and sets its own error status in error out. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. Termination Char (0xA = '\n' = LF) specifies a character that terminates the read operation. The default is 0xA. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurs while this node runs. The default is no error. Serial Port Name specifies the name of the serial port you want to use. code is 0 or a warning code. in most cases. the node passes the error in (no error) value to error out. code is an error code.vi Specifies whether to terminate a read operation with a termination character. DevStatus describes the error status before this VI or function runs. that the serial device terminates a read operation when it reads the Termination Char. error in (no error) describes error conditions that occur before this node runs. The default is an empty string. The default is 0. The default is no error.

code is the error or warning code. code is the error or warning code. If status is TRUE. DevStatus describes the error status that this VI or function produces. code is an error code. The default is 0. code is 0 or a warning code. Serial Port Name returns the name of the serial port you want to use. If status is FALSE. error out contains the same error information. If status is FALSE. Otherwise.Chapter 36 Serial Port VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 36-16 ni. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. code is 0 or a warning code. code is 0 or a warning code. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. the name of the node that produced the error or warning. in most cases. error out contains error information. code is an error code. the name of the node that produced the error or warning. code is the error or warning code. SerialPortRef returns a reference to the serial port. in most cases. in most cases.com . the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. The default is FALSE. it describes the error status that this VI or function produces. If status is TRUE. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE.

If status is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.vi Writes data to the serial device you specify. The default is no error. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Serial Port Name specifies the name of the serial port you want to use. code is an error code. DevStatus describes the error status before this VI or function runs. The default is FALSE. If an error occurs while this node runs. The default is 0. the node passes the error in (no error) value to error out. The default is an empty string. This node runs normally only if no error occurred before this node runs. The default is FALSE. If an error occurred before this node runs. source specifies the origin of the error or warning and is. SerialPortRef specifies a reference to the serial port corresponding to the serial device you want to use. error in (no error) describes error conditions that occur before this node runs. The default is no error. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. Buffer specifies the data to write to the serial device.Chapter 36 Serial Port VIs Write. Use the VI to open this reference. in most cases. © National Instruments Corporation 36-17 LabVIEW Robotics Programming Guide for FRC . Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it runs normally and sets its own error status in error out. If status is TRUE.

code is an error code.com . code is the error or warning code. in most cases. Serial Port Name returns the name of the serial port you want to use. If error in indicates that an error occurred before this VI or function ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. source specifies the origin of the error or warning and is. SerialPortRef returns a reference to the serial port. If status is TRUE. it describes the error status that this VI or function produces. error out contains the same error information.Chapter 36 Serial Port VIs code is the error or warning code. code is an error code. If status is TRUE. code is 0 or a warning code. DevStatus describes the error status that this VI or function produces. in most cases. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. The default is 0. source specifies the origin of the error or warning and is. in most cases. code is an error code. code is 0 or a warning code. If status is FALSE. the name of the node that produced the error or warning. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Num Bytes Written returns the number of bytes written to the serial device. The default is an empty string. error out contains error information. If status is FALSE. the name of the node that produced the error or warning. Otherwise. code is the error or warning code. If status is TRUE. source specifies the origin of the error or warning and is. LabVIEW Robotics Programming Guide for FRC 36-18 ni. code is 0 or a warning code.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Servo VIs 37 Refer to the LabVIEW Help. If status is TRUE. The default is an empty string. The default is no error. code is an error code. the name of the node that produced the error or warning. MotorControlDevRef specifies a reference to the motor controller you want to use. © National Instruments Corporation 37-1 LabVIEW Robotics Programming Guide for FRC . DeviceStatus describes the error status before this VI or function runs. code is 0 or a warning code. use the Servo VIs instead of the PWM VIs. The Servo VIs use preconfigured PWM range and deadband values specific to the servo so you do not need to perform any conversions or scaling calculations on the raw PWM values. Use this VI to close each servo reference that you open with the Open VI. Use the Servo VIs to set or get the angle and position of a servo. available by selecting Help»Search the LabVIEW Help. If you use a servo. for the latest information about the Servo VIs. Close. code is the error or warning code. source specifies the origin of the error or warning and is. in most cases. The default is 0. The default is FALSE. Use the Open VI to create a PWMDeviceRef reference cluster that you then can wire to the other Servo VIs.vi Closes the reference to the servo controller you specify. If status is FALSE.

centerPwm specifies the center value of the PWM signal. minNegativePwm specifies the minimum value of the signal. maxPositivePwm specifies the maximum value of the signal. this VI returns an error. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. minPositivePwm is the maximum value of the deadband. maxNegativePwm is the minimum value of the deadband. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. maxNegativePwm specifies the maximum negative value of the signal that creates a response. The default digital module is the first digital module. minPositivePwm specifies the minimum positive value of the signal that creates a response.com . If DIO Module specifies a value of Default. The deadband is a range in the signal that has no effect on the motor. PWM Channel can specify a value between PWM 1 and PWM 10. this VI uses the default digital module. DeadBand specifies the range of the deadband for the signal. if applicable. Name identifies the PWM signal and deadband. DIO Module can specify a value of Slot 4 or Slot 6. LabVIEW Robotics Programming Guide for FRC 37-2 ni. or the module in slot 4. If PWM Channel is Invalid.Chapter 37 Servo VIs DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. angularRange specifies the maximum range of the servo.

The default is 0. source specifies the origin of the error or warning and is. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 37 Servo VIs error in (no error) describes error conditions that occur before this node runs. code is an error code. code is the error or warning code. the name of the node that produced the error or warning. The default is an empty string. This node runs normally only if no error occurred before this node runs. in most cases. The default is FALSE. source specifies the origin of the error or warning and is. code is the error or warning code. If an error occurs while this node runs. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is FALSE. If an error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out. If status is TRUE. If status is TRUE. code is 0 or a warning code. code is 0 or a warning code. the name of the node that produced the error or warning. it describes the error status that this VI or function produces. error out contains the same error information. in most cases. error out contains error information. If status is FALSE. it runs normally and sets its own error status in error out. If error in indicates that an error occurred before this VI or function ran. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is no error. code is an error code. © National Instruments Corporation 37-3 LabVIEW Robotics Programming Guide for FRC .

this VI uses the default digital module.Chapter 37 Servo VIs GetAngle. code is the error or warning code. The default is 0. If PWM Channel is Invalid.vi Returns the angle of the servo you specify. use the general PWM VI to open this reference. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. or the module in slot 4. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. The default is an empty string. use the VI on the Servo palette to open this reference. PWM Channel can specify a value between PWM 1 and PWM 10. The default digital module is the first digital module. When you use this VI with other VIs. source specifies the origin of the error or warning and is. The default is no error. code is an error code. in most cases. the name of the node that produced the error or warning. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. this VI returns an error. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. If status is TRUE. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. code is 0 or a warning code. PWMDeviceRef specifies a reference to the PWM you want to use. If DIO Module specifies a value of Default. Otherwise. The default is FALSE. LabVIEW Robotics Programming Guide for FRC 37-4 ni. If status is FALSE.com . DeviceStatus describes the error status before this VI or function runs. DIO Module can specify a value of Slot 4 or Slot 6.

minNegativePwm specifies the minimum value of the signal. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. if applicable. The default is an empty string. in most cases. code is the error or warning code.Chapter 37 Servo VIs DeadBand specifies the range of the deadband for the signal. maxNegativePwm specifies the maximum negative value of the signal that creates a response. The default is 0. code is an error code. © National Instruments Corporation 37-5 LabVIEW Robotics Programming Guide for FRC . error in (no error) describes error conditions that occur before this node runs. it runs normally and sets its own error status in error out. maxPositivePwm specifies the maximum value of the signal. minPositivePwm specifies the minimum positive value of the signal that creates a response. minPositivePwm is the maximum value of the deadband. This node runs normally only if no error occurred before this node runs. maxNegativePwm is the minimum value of the deadband. code is 0 or a warning code. If an error occurs while this node runs. The deadband is a range in the signal that has no effect on the motor. centerPwm specifies the center value of the PWM signal. angularRange specifies the maximum range of the servo. the name of the node that produced the error or warning. Name identifies the PWM signal and deadband. If status is TRUE. the node passes the error in (no error) value to error out. The default is no error. If an error occurred before this node runs. If status is FALSE. The default is FALSE. source specifies the origin of the error or warning and is.

DIO Module can return a value of Slot 4 or Slot 6. DeadBand returns the range of the deadband for the signal.com . minPositivePwm returns the minimum positive value of the signal that creates a response. the VI did not find the digital channel you specified. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. Name returns a reference for the PWM signal. code is an error code.Chapter 37 Servo VIs PWMDeviceRef returns a reference to the PWM. this VI uses the default digital module. If status is FALSE. the name of the node that produced the error or warning. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DeviceStatus describes the error status that this VI or function produces. If PWM Channel returns a value of Invalid. or the module in slot 4. in most cases. PWM Channel can return a value between PWM 1 and PWM 10. LabVIEW Robotics Programming Guide for FRC 37-6 ni. and this VI returns an error. code is 0 or a warning code. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. If status is TRUE. maxPositivePwm returns the maximum value of the signal. source specifies the origin of the error or warning and is. The PWM specifies the amount of power sent to the motors. The default digital module is the first digital module. If DIO Module returns a value of Default. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. minPositivePwm is the maximum value of the deadband.

© National Instruments Corporation 37-7 LabVIEW Robotics Programming Guide for FRC . angularRange returns the maximum range of the servo. Angle returns the angle. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. error out contains error information. it describes the error status that this VI or function produces. use the general PWM VI to open this reference. in most cases. When you use this VI with other VIs. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. GetPosition. The default is no error. Otherwise. minNegativePwm returns the minimum value of the signal. in degrees. If error in indicates that an error occurred before this VI or function ran. source specifies the origin of the error or warning and is. DeviceStatus describes the error status before this VI or function runs. the name of the node that produced the error or warning. PWMDeviceRef specifies a reference to the PWM you want to use. maxNegativePwm is the minimum value of the deadband. code is the error or warning code. Otherwise. If status is FALSE. maxNegativePwm returns the maximum negative value of the signal that creates a response. error out contains the same error information. if applicable. code is 0 or a warning code. use the VI on the Servo palette to open this reference. code is an error code.Chapter 37 Servo VIs centerPwm returns the center value of the PWM signal. of the servo.vi Returns the position of the servo you specify. If status is TRUE.

Chapter 37 Servo VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. LabVIEW Robotics Programming Guide for FRC 37-8 ni. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. maxPositivePwm specifies the maximum value of the signal. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. The default is an empty string. in most cases. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. If status is TRUE. If status is FALSE. code is 0 or a warning code. minPositivePwm is the maximum value of the deadband. maxNegativePwm is the minimum value of the deadband. minPositivePwm specifies the minimum positive value of the signal that creates a response. maxNegativePwm specifies the maximum negative value of the signal that creates a response. or the module in slot 4. The default digital module is the first digital module. code is the error or warning code.com . PWM Channel can specify a value between PWM 1 and PWM 10. code is an error code. If DIO Module specifies a value of Default. DIO Module can specify a value of Slot 4 or Slot 6. centerPwm specifies the center value of the PWM signal. Name identifies the PWM signal and deadband. this VI returns an error. The default is FALSE. this VI uses the default digital module. DeadBand specifies the range of the deadband for the signal. The default is 0. source specifies the origin of the error or warning and is. The deadband is a range in the signal that has no effect on the motor. If PWM Channel is Invalid.

in most cases. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. angularRange specifies the maximum range of the servo. If status is FALSE. code is the error or warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.Chapter 37 Servo VIs minNegativePwm specifies the minimum value of the signal. the name of the node that produced the error or warning. the name of the node that produced the error or warning. code is an error code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is no error. source specifies the origin of the error or warning and is. source specifies the origin of the error or warning and is. If status is TRUE. The default is 0. The default is an empty string. DeviceStatus describes the error status that this VI or function produces. © National Instruments Corporation 37-9 LabVIEW Robotics Programming Guide for FRC . PWMDeviceRef returns a reference to the PWM. code is 0 or a warning code. in most cases. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is an error code. code is 0 or a warning code. This node runs normally only if no error occurred before this node runs. If status is FALSE. error in (no error) describes error conditions that occur before this node runs. it runs normally and sets its own error status in error out. If an error occurred before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The PWM specifies the amount of power sent to the motors. if applicable. The default is FALSE. code is the error or warning code. the node passes the error in (no error) value to error out.

The default digital module is the first digital module. LabVIEW Robotics Programming Guide for FRC 37-10 ni. minNegativePwm returns the minimum value of the signal. Position returns the position of the servo.com . centerPwm returns the center value of the PWM signal. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. or the module in slot 4. If DIO Module returns a value of Default. If PWM Channel returns a value of Invalid. maxNegativePwm returns the maximum negative value of the signal that creates a response. angularRange returns the maximum range of the servo. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. maxPositivePwm returns the maximum value of the signal. this VI uses the default digital module.0. if applicable. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. the VI did not find the digital channel you specified. PWM Channel can return a value between PWM 1 and PWM 10. minPositivePwm is the maximum value of the deadband. minPositivePwm returns the minimum positive value of the signal that creates a response. Name returns a reference for the PWM signal.0 to 1. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. and this VI returns an error.Chapter 37 Servo VIs DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. DeadBand returns the range of the deadband for the signal. DIO Module can return a value of Slot 4 or Slot 6. Position ranges from 0. maxNegativePwm is the minimum value of the deadband.

If an error occurs while this node runs. The default is PWM 1. code is the error or warning code. The default digital module is the first digital module. If error in indicates that an error occurred before this VI or function ran. You also can select Default to specify the slot of the default digital module. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. error in (no error) describes error conditions that occur before this node runs. the name of the node that produced the error or warning.vi Creates a reference to the servo controller you specify. The default is Slot 4. it runs normally and sets its own error status in error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. You must open a reference before using any other VIs on this palette. code is 0 or a warning code. If an error occurred before this node runs. the node passes the error in (no error) value to error out. Otherwise. The default is no error. If status is FALSE. or the module in slot 4. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. source specifies the origin of the error or warning and is. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. in most cases. error out contains the same error information. If status is TRUE. this VI returns an error. Select a value between PWM 1 and PWM 10. This node runs normally only if no error occurred before this node runs. If PWM Channel is Invalid. code is an error code. Open. DIO Module (Slot 4) specifies the slot number on the CompactRIO device of the digital module you want to use. Select Slot 4 or Slot 6.Chapter 37 Servo VIs error out contains error information. Use exception control to treat what is © National Instruments Corporation 37-11 LabVIEW Robotics Programming Guide for FRC .

source specifies the origin of the error or warning and is. in most cases. If status is FALSE. If PWM Channel returns a value of Invalid. PWM Channel can return a value between PWM 1 and PWM 10. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. or the module in slot 4. code is 0 or a warning code. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. DIO Module can return a value of Slot 4 or Slot 6. The default is FALSE.Chapter 37 Servo VIs normally an error as no error or to treat a warning as an error. code is an error code. PWMDeviceRef returns a reference to the PWM. this VI uses the default digital module. LabVIEW Robotics Programming Guide for FRC 37-12 ni. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. code is the error or warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is an error code. the name of the node that produced the error or warning. The default digital module is the first digital module. in most cases. and this VI returns an error. the VI did not find the digital channel you specified. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. If status is TRUE. If DIO Module returns a value of Default. If status is TRUE. If status is FALSE. The default is an empty string. code is the error or warning code. The default is 0. code is 0 or a warning code. The PWM specifies the amount of power sent to the motors. DeviceStatus describes the error status that this VI or function produces.

minPositivePwm returns the minimum positive value of the signal that creates a response. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. code is an error code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the name of the node that produced the error or warning. code is 0 or a warning code. centerPwm returns the center value of the PWM signal. If status is FALSE.Chapter 37 Servo VIs TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. error out contains the same error information. maxNegativePwm is the minimum value of the deadband. error out contains error information. maxPositivePwm returns the maximum value of the signal. minNegativePwm returns the minimum value of the signal. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. source specifies the origin of the error or warning and is. maxNegativePwm returns the maximum negative value of the signal that creates a response. © National Instruments Corporation 37-13 LabVIEW Robotics Programming Guide for FRC . Otherwise. Name returns a reference for the PWM signal. if applicable. If status is TRUE. DeadBand returns the range of the deadband for the signal. angularRange returns the maximum range of the servo. in most cases. minPositivePwm is the maximum value of the deadband. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

in most cases. The default is FALSE. this VI returns an error. DIO Module can specify a value of Slot 4 or Slot 6. When you use this VI with other VIs. code is an error code. this VI uses the default digital module. code is 0 or a warning code. If DIO Module specifies a value of Default. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. If status is FALSE. use the general PWM VI to open this reference. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. Otherwise. PWM Channel can specify a value between PWM 1 and PWM 10. PWMDeviceRef specifies a reference to the PWM you want to use. If status is TRUE. code is the error or warning code.vi Sets the angle of the servo you specify. DeviceStatus describes the error status before this VI or function runs. The default is an empty string. The default digital module is the first digital module. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. source specifies the origin of the error or warning and is.com . or the module in slot 4.Chapter 37 Servo VIs SetAngle. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. the name of the node that produced the error or warning. If PWM Channel is Invalid. The default is no error. LabVIEW Robotics Programming Guide for FRC 37-14 ni. use the VI on the Servo palette to open this reference. The default is 0.

Use exception control to treat what is normally an error as no error or to treat a warning as an error.Chapter 37 Servo VIs DeadBand specifies the range of the deadband for the signal. it runs normally and sets its own error status in error out. The deadband is a range in the signal that has no effect on the motor. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. The default is FALSE. If an error occurred before this node runs. minPositivePwm specifies the minimum positive value of the signal that creates a response. maxNegativePwm is the minimum value of the deadband. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. © National Instruments Corporation 37-15 LabVIEW Robotics Programming Guide for FRC . angularRange specifies the maximum range of the servo. If status is TRUE. maxPositivePwm specifies the maximum value of the signal. minNegativePwm specifies the minimum value of the signal. maxNegativePwm specifies the maximum negative value of the signal that creates a response. of the servo. code is the error or warning code. Angle specifies the angle. Name identifies the PWM signal and deadband. error in (no error) describes error conditions that occur before this node runs. minPositivePwm is the maximum value of the deadband. code is 0 or a warning code. if applicable. The default is 0. the node passes the error in (no error) value to error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. The default is no error. in degrees. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs. centerPwm specifies the center value of the PWM signal.

code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. PWMDeviceRef returns a reference to the PWM. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value. this VI uses the default digital module. The default is an empty string. the name of the node that produced the error or warning. If DIO Module returns a value of Default. the name of the node that produced the error or warning. If status is TRUE. the VI did not find the digital channel you specified. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. DIO Module can return a value of Slot 4 or Slot 6. The default digital module is the first digital module. If status is FALSE. DeadBand returns the range of the deadband for the signal. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. in most cases. LabVIEW Robotics Programming Guide for FRC 37-16 ni. Name returns a reference for the PWM signal. source specifies the origin of the error or warning and is.Chapter 37 Servo VIs source specifies the origin of the error or warning and is. The PWM specifies the amount of power sent to the motors. PWM Channel can return a value between PWM 1 and PWM 10. code is 0 or a warning code.com . maxPositivePwm returns the maximum value of the signal. code is an error code. and this VI returns an error. DeviceStatus describes the error status that this VI or function produces. or the module in slot 4. in most cases. If PWM Channel returns a value of Invalid.

error out contains error information. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. PWMDeviceRef specifies a reference to the PWM you want to use. code is an error code. if applicable. If status is FALSE. maxNegativePwm returns the maximum negative value of the signal that creates a response. minPositivePwm is the maximum value of the deadband. If error in indicates that an error occurred before this VI or function ran. angularRange returns the maximum range of the servo. maxNegativePwm is the minimum value of the deadband. © National Instruments Corporation 37-17 LabVIEW Robotics Programming Guide for FRC . error out contains the same error information. source specifies the origin of the error or warning and is. SetPosition.vi Specifies the position of the servo you specify. Otherwise. minNegativePwm returns the minimum value of the signal. use the general PWM VI to open this reference. centerPwm returns the center value of the PWM signal.Chapter 37 Servo VIs minPositivePwm returns the minimum positive value of the signal that creates a response. in most cases. Otherwise. the name of the node that produced the error or warning. When you use this VI with other VIs. use the VI on the Servo palette to open this reference. code is 0 or a warning code. If status is TRUE.

The deadband is a range in the signal that has no effect on the motor. Name identifies the PWM signal and deadband. source specifies the origin of the error or warning and is. If status is TRUE. code is 0 or a warning code. PWM Channel can specify a value between PWM 1 and PWM 10. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DIO Module can specify a value of Slot 4 or Slot 6. this VI uses the default digital module. The default digital module is the first digital module. or the module in slot 4. in most cases. If PWM Channel is Invalid. InvTransformRef specifies a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. LabVIEW Robotics Programming Guide for FRC 37-18 ni. The default is FALSE. minPositivePwm specifies the minimum positive value of the signal that creates a response.Chapter 37 Servo VIs DeviceStatus describes the error status before this VI or function runs. If DIO Module specifies a value of Default.com . DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. If status is FALSE. the name of the node that produced the error or warning. minPositivePwm is the maximum value of the deadband. PWM Channel specifies the channel of the DIO Module from which you want to read the PWM value. code is an error code. The default is 0. centerPwm specifies the center value of the PWM signal. maxPositivePwm specifies the maximum value of the signal. DeadBand specifies the range of the deadband for the signal. TransformRef specifies a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. this VI returns an error. The default is no error. The default is an empty string. code is the error or warning code.

code is 0 or a warning code. If an error occurred before this node runs. minNegativePwm specifies the minimum value of the signal. The default is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. the node passes the error in (no error) value to error out. If status is FALSE.0 to 1. © National Instruments Corporation 37-19 LabVIEW Robotics Programming Guide for FRC . If status is TRUE.0. code is an error code. Position specifies the position of the servo. If status is TRUE.Chapter 37 Servo VIs maxNegativePwm specifies the maximum negative value of the signal that creates a response. angularRange specifies the maximum range of the servo. code is an error code. The PWM specifies the amount of power sent to the motors. The default is no error. code is 0 or a warning code. code is the error or warning code. If status is FALSE. if applicable. If an error occurs while this node runs. This node runs normally only if no error occurred before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. maxNegativePwm is the minimum value of the deadband. code is the error or warning code. it runs normally and sets its own error status in error out. the name of the node that produced the error or warning. DeviceStatus describes the error status that this VI or function produces. Position ranges from 0. source specifies the origin of the error or warning and is. PWMDeviceRef returns a reference to the PWM. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is 0.

or the module in slot 4. if applicable. If DIO Module returns a value of Default. centerPwm returns the center value of the PWM signal. Invert returns whether the motor moves in the forward (FALSE) or reverse (TRUE) direction. maxNegativePwm is the minimum value of the deadband. this VI uses the default digital module. PWM Channel can return a value between PWM 1 and PWM 10. DeadBand returns the range of the deadband for the signal. maxNegativePwm returns the maximum negative value of the signal that creates a response. InvTransformRef returns a reference to the converter that the PWM uses to convert scaled PWM values to PWM values. the VI did not find the digital channel you specified. and this VI returns an error. PWM Channel returns the channel of the DIO Module from which you want to read the PWM value.Chapter 37 Servo VIs source specifies the origin of the error or warning and is. maxPositivePwm returns the maximum value of the signal. minNegativePwm returns the minimum value of the signal. in most cases. minPositivePwm is the maximum value of the deadband. DIO Module can return a value of Slot 4 or Slot 6.com . The default digital module is the first digital module. the name of the node that produced the error or warning. minPositivePwm returns the minimum positive value of the signal that creates a response. TransformRef returns a reference to the converter that the PWM uses to convert PWM values to scaled PWM values. DIO Module returns the slot number on the CompactRIO device of the digital module you want to use. Name returns a reference for the PWM signal. If PWM Channel returns a value of Invalid. LabVIEW Robotics Programming Guide for FRC 37-20 ni. angularRange returns the maximum range of the servo.

source specifies the origin of the error or warning and is. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. Otherwise. code is 0 or a warning code. code is an error code. © National Instruments Corporation 37-21 LabVIEW Robotics Programming Guide for FRC . If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.Chapter 37 Servo VIs error out contains error information. error out contains the same error information. code is the error or warning code. the name of the node that produced the error or warning.

thus moving the robot part. The relay connects the solenoid to the battery. If you want to operate a solenoid but all channels of the NI 9472 are used. you alternatively can connect a relay to the NI 9403 digital input/output module and then connect the relay to the solenoid. for the latest information about the Solenoid VIs. © National Instruments Corporation 38-1 LabVIEW Robotics Programming Guide for FRC . the solenoid releases air. you can use the Compressor VIs to turn on the pressure switch of the compressor. which can provide a greater voltage current to operate the solenoid. Use the Open VI to create a SolenoidDevRef reference cluster that you then can wire to the other Solenoid VIs. the NI 9403 can operate the relay. You connect the solenoid to the NI 9472 digital output module on the CompactRIO device. If the air pressure drops below a certain level. Use the Solenoid VIs to operate a solenoid. The compressor then pumps more air into the system. When the solenoid receives the 12 V signal. The NI 9403 cannot output sufficient voltage to operate the solenoid. thus increasing the air pressure. A solenoid is a pneumatic valve that can release air to move a part on the robot. the air pressure of the compression system drops. You then use the Solenoid VIs to specify whether the NI 9472 sends a 12 V signal to the solenoid. However.Solenoid VIs 38 Refer to the LabVIEW Help. available by selecting Help»Search the LabVIEW Help. Each time the solenoid releases air.

LabVIEW Robotics Programming Guide for FRC 38-2 ni. A solenoid is connected to channel 1 of the default solenoid module on the CompactRIO device. A digital line is connected to channel 1 of the digital module in slot 4 of the CompactRIO device. You can use this example VI to operate a solenoid continuously. The following figure demonstrates how to set the value of a solenoid based on a digital input value. The GetValue VI reads a digital input value and passes it to the Set VI.Chapter 38 Solenoid VIs The following figure demonstrates how to control a solenoid connected to solenoid channel 1 of the default solenoid module on the CompactRIO device. which in turn specifies whether the NI 9472 sends a 12 V signal to the solenoid.com .

Use this VI to close each solenoid reference that you open with the Open VI. DevStatus describes the error status before this VI or function runs. Solenoid Module always specifies a value of Slot 8. source specifies the origin of the error or warning and is. The default is no error. © National Instruments Corporation 38-3 LabVIEW Robotics Programming Guide for FRC . the node passes the error in (no error) value to error out. Solenoid Channel can specify a value between Solenoid 1 and Solenoid 8. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.Chapter 38 Solenoid VIs Close. If Solenoid Channel is Invalid. code is the error or warning code. If status is TRUE. The default is an empty string. the name of the node that produced the error or warning. If an error occurred before this node runs. SolenoidDevRef specifies a reference to the solenoid you want to use. in most cases. Use exception control to treat what is normally an error as no error or to treat a warning as an error.vi Closes the reference to the solenoid you specify. If status is FALSE. this VI returns an error. code is an error code. The default is 0. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs. The default is no error. The default is FALSE. code is 0 or a warning code. it runs normally and sets its own error status in error out. Solenoid Module specifies the slot number on the CompactRIO device of the solenoid module you want to use. Solenoid Channel specifies the channel of the Solenoid Module to which the solenoid is connected. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. error in (no error) describes error conditions that occur before this node runs.

code is 0 or a warning code. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. When the solenoid receives the 12 V signal. SolenoidDevRef specifies a reference to the solenoid you want to use. If status is FALSE. LabVIEW Robotics Programming Guide for FRC 38-4 ni. Otherwise. the name of the node that produced the error or warning.vi Returns whether you specified the NI 9472 to send a 12 V signal to the solenoid you specify.com . source specifies the origin of the error or warning and is. Get. If status is FALSE. error out contains the same error information. The default is no error. If status is TRUE. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status before this VI or function runs. thus moving the associated robot part. the name of the node that produced the error or warning. error out contains error information.Chapter 38 Solenoid VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. in most cases. The default is 0. code is the error or warning code. code is an error code. The default is an empty string. source specifies the origin of the error or warning and is. in most cases. it describes the error status that this VI or function produces. code is an error code. If error in indicates that an error occurred before this VI or function ran. the solenoid releases air. code is the error or warning code.

Solenoid Module specifies the slot number on the CompactRIO device of the solenoid module you want to use. code is 0 or a warning code. in most cases. code is 0 or a warning code. code is the error or warning code.Chapter 38 Solenoid VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. If an error occurred before this node runs. code is an error code. If Solenoid Channel is Invalid. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. source specifies the origin of the error or warning and is. this VI returns an error. code is an error code. it runs normally and sets its own error status in error out. If status is TRUE. Solenoid Channel specifies the channel of the Solenoid Module to which the solenoid is connected. the name of the node that produced the error or warning. The default is FALSE. the name of the node that produced the error or warning. error in (no error) describes error conditions that occur before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default is 0. If status is TRUE. If an error occurs while this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. The default is FALSE. The default is no error. If status is FALSE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. in most cases. This node runs normally only if no error occurred before this node runs. The default is an empty string. Solenoid Module always specifies a value of Slot 8. © National Instruments Corporation 38-5 LabVIEW Robotics Programming Guide for FRC . If status is FALSE. Solenoid Channel can specify a value between Solenoid 1 and Solenoid 8. source specifies the origin of the error or warning and is. code is the error or warning code. the node passes the error in (no error) value to error out.

code is the error or warning code. Value returns FALSE. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.com . Solenoid Channel can return a value between Solenoid 1 and Solenoid 8. If Solenoid Channel returns a value of Invalid. Value returns TRUE if you specified the NI 9472 to send a 12 V signal to the solenoid you specify. error out contains the same error information. Otherwise. If status is FALSE. If status is TRUE. If status is FALSE. source specifies the origin of the error or warning and is. Solenoid Module returns the slot number on the CompactRIO device of the solenoid module to which the solenoid is connected. code is an error code. Solenoid Channel returns the channel of the Solenoid Module to which the solenoid is connected. Otherwise. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. it describes the error status that this VI or function produces. in most cases. DevStatus describes the error status that this VI or function produces. code is an error code. the name of the node that produced the error or warning. code is 0 or a warning code. in most cases. source specifies the origin of the error or warning and is. code is the error or warning code. the name of the node that produced the error or warning. error out contains error information. the VI did not find the solenoid you specified.Chapter 38 Solenoid VIs SolenoidDevRef returns a reference to the solenoid. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. Solenoid Module always returns Slot 8. LabVIEW Robotics Programming Guide for FRC 38-6 ni. and this VI returns an error.

Solenoid Module specifies the slot number on the CompactRIO device of the solenoid module you want to use. If Solenoid Channel is Invalid. Solenoid Channel specifies the channel of the Solenoid Module to which the solenoid is connected. code is an error code. You can select a value between Solenoid 1 and Solenoid 8. The default is 0. code is 0 or a warning code. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.vi Opens a reference to the solenoid you specify. If status is FALSE. The default is an empty string. If status is TRUE. error in (no error) describes error conditions that occur before this node runs. the name of the node that produced the error or warning. This node runs normally only if no error occurred before this node runs. the node passes the error in (no error) value to error out. The default is FALSE. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. If an error occurs while this node runs.Chapter 38 Solenoid VIs Open. this VI returns an error. You can select only Slot 8. © National Instruments Corporation 38-7 LabVIEW Robotics Programming Guide for FRC . Use exception control to treat what is normally an error as no error or to treat a warning as an error. in most cases. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If an error occurred before this node runs. code is the error or warning code. it runs normally and sets its own error status in error out. You must open a reference before using any other VIs on this palette.

If Solenoid Channel returns a value of Invalid. Otherwise. the name of the node that produced the error or warning. code is 0 or a warning code. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces. Solenoid Channel returns the channel of the Solenoid Module to which the solenoid is connected. If status is TRUE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. error out contains error information. Solenoid Module always returns Slot 8. If status is FALSE. the name of the node that produced the error or warning. code is 0 or a warning code. code is the error or warning code. in most cases. Solenoid Channel can return a value between Solenoid 1 and Solenoid 8. and this VI returns an error. LabVIEW Robotics Programming Guide for FRC 38-8 ni. in most cases.com . error out contains the same error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DevStatus describes the error status that this VI or function produces. If error in indicates that an error occurred before this VI or function ran. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 38 Solenoid VIs SolenoidDevRef returns a reference to the solenoid. code is an error code. code is an error code. code is the error or warning code. If status is FALSE. If status is TRUE. Solenoid Module returns the slot number on the CompactRIO device of the solenoid module to which the solenoid is connected. source specifies the origin of the error or warning and is. the VI did not find the solenoid you specified.

when TRUE.Chapter 38 Solenoid VIs Set. SolenoidDevRef specifies a reference to the solenoid you want to use. If status is FALSE. When the solenoid receives the 12 V signal. Value specifies. thus moving the associated robot part. that the NI 9472 sends a 12 V signal to the solenoid. If Solenoid Channel is Invalid. code is an error code. The default is 0. in most cases. this VI returns an error. Solenoid Channel can specify a value between Solenoid 1 and Solenoid 8. Solenoid Module always specifies a value of Slot 8. the solenoid releases air. code is the error or warning code. The default is FALSE. Solenoid Channel specifies the channel of the Solenoid Module to which the solenoid is connected. DevStatus describes the error status before this VI or function runs. The default is an empty string. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. the name of the node that produced the error or warning. Solenoid Module specifies the slot number on the CompactRIO device of the solenoid module you want to use. If status is TRUE. code is 0 or a warning code. © National Instruments Corporation 38-9 LabVIEW Robotics Programming Guide for FRC .vi Specifies whether the NI 9472 sends a 12 V signal to the solenoid you specify.

The default is no error. code is the error or warning code. DevStatus describes the error status that this VI or function produces. If status is FALSE. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. the node passes the error in (no error) value to error out. source specifies the origin of the error or warning and is. If status is TRUE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is an error code. Solenoid Channel returns the channel of the Solenoid Module to which the solenoid is connected.Chapter 38 Solenoid VIs error in (no error) describes error conditions that occur before this node runs. The default is FALSE. in most cases. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Solenoid Module returns the slot number on the CompactRIO device of the solenoid module to which the solenoid is connected. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If an error occurs while this node runs. If Solenoid Channel returns a value of Invalid. the VI did not find the solenoid you specified. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . code is the error or warning code. the name of the node that produced the error or warning. in most cases. If an error occurred before this node runs. If status is FALSE. The default is 0. Solenoid Channel can return a value between Solenoid 1 and Solenoid 8. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. and this VI returns an error. code is 0 or a warning code. code is an error code. it runs normally and sets its own error status in error out. Solenoid Module always returns Slot 8. code is 0 or a warning code. LabVIEW Robotics Programming Guide for FRC 38-10 ni. SolenoidDevRef returns a reference to the solenoid. The default is an empty string. This node runs normally only if no error occurred before this node runs.

Chapter 38 Solenoid VIs error out contains error information. Otherwise. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. If status is FALSE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. code is the error or warning code. If status is TRUE. in most cases. If error in indicates that an error occurred before this VI or function ran. the name of the node that produced the error or warning. code is an error code. error out contains the same error information. © National Instruments Corporation 38-11 LabVIEW Robotics Programming Guide for FRC .

SPIDevRef specifies a reference to the SPI Engine you want to use. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string. Use this VI to close each SPI reference that you open with the Open VI. code is 0 or a warning code.vi Closes a reference to the SPI Engine. The default is no error. Use the Serial Peripheral Interface (SPI) VIs to communicate with sensors or custom circuits. in most cases. If status is TRUE. The default is 0. code is an error code. available by selecting Help»Search the LabVIEW Help. Close. The default is FALSE. If status is FALSE. Use the Open VI to create an SPIDevRef reference cluster that you then can wire to the other SPI VIs. DevStatus describes the error status before this VI or function runs.SPI VIs 39 Refer to the LabVIEW Help. for the latest information about the SPI VIs. code is the error or warning code. © National Instruments Corporation 39-1 LabVIEW Robotics Programming Guide for FRC . the name of the node that produced the error or warning. The hardware currently supports only Master Mode SPI.

the node passes the error in (no error) value to error out. The default is FALSE. If status is TRUE. LabVIEW Robotics Programming Guide for FRC 39-2 ni. code is an error code. If an error occurred before this node runs. error out contains the same error information.com . If an error occurs while this node runs. error out contains error information. If status is FALSE. code is an error code. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 39 SPI VIs Close Dependencies specifies to close any digital inputs when you close the reference to the SPI Engine. This node runs normally only if no error occurred before this node runs. The default is 0. Close Dependencies closes the digital inputs. it runs normally and sets its own error status in error out. The default is an empty string. in most cases. code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. source specifies the origin of the error or warning and is. The default is no error. If status is TRUE. Otherwise. in most cases. If status is FALSE. When TRUE. If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. the name of the node that produced the error or warning. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is 0 or a warning code. code is 0 or a warning code. error in (no error) describes error conditions that occur before this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. source specifies the origin of the error or warning and is. code is the error or warning code.

code is an error code. code is the error or warning code. SPIDevRef specifies a reference to the SPI Engine you want to use. the most significant bit is sent first. When TRUE.Chapter 39 SPI VIs ConfigureAdvancedOptions. DevStatus describes the error status before this VI or function runs.628 Hz. this VI might not be required. The default is an empty string. source specifies the origin of the error or warning and is. the most significant bit is sent last. Chip Select Active Low specifies that the active state of the chip select output line is high. that the active state of the chip select output line is low. When FALSE. Frame Mode specifies the behavior of the chip select line in relation to the duration of the frame.vi Allows you to set more advanced SPI controls. in most cases. code is 0 or a warning code. © National Instruments Corporation 39-3 LabVIEW Robotics Programming Guide for FRC . the name of the node that produced the error or warning. when TRUE. When FALSE. Chip Select Active Low specifies. The default and maximum value is 76. If status is FALSE. If status is TRUE. Depending on the definition of your interface. The default is no error. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Most Significant Bit First specifies the the order the SPI VIs send and receive the bits. The default is 0. Clock Rate (Hz) specifies the rate of the generated clock signal.

This node runs normally only if no error occurred before this node runs. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. DevStatus describes the error status that this VI or function produces. The default is FALSE. Otherwise. the name of the node that produced the error or warning. when TRUE. source specifies the origin of the error or warning and is. Clock Phase (Data On Falling) specifies that the data changes on the falling edge and the data is stable on the rising edge. code is an error code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is an error code. that the data is stable on the falling edge and the data changes on the rising edge. in most cases. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. SPIDevRef returns a reference to the SPI Engine. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. it describes the error status that this VI or function produces. the node passes the error in (no error) value to error out. The default is an empty string. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. error out contains the same error information. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 39 SPI VIs error in (no error) describes error conditions that occur before this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is 0 or a warning code. code is 0 or a warning code. in most cases. error out contains error information. If status is FALSE. If status is FALSE. If an error occurred before this node runs. The default is no error. If an error occurs while this node runs. Clock Phase (Data On Falling) specifies. When FALSE. If status is TRUE.com . it runs normally and sets its own error status in error out. Right-click the error out front panel indicator and select LabVIEW Robotics Programming Guide for FRC 39-4 ni.

The default is 0. Chip Select specifies a digital output reference that outputs according to Frame Mode and ChipSelectActiveLow from the VI. If status is FALSE. the name of the node that produced the error or warning. © National Instruments Corporation 39-5 LabVIEW Robotics Programming Guide for FRC .vi Opens a reference to the SPI Engine. DevStatus describes the error status before this VI or function runs. code is an error code. the name of the node that produced the error or warning. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. After you open a reference to the SPI Engine. Open. you can use the other SPI VIs to access and monitor the sensors or custom circuits from the SPI Engine. code is an error code. You must open a reference before using any other VIs on this palette.Chapter 39 SPI VIs Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. The default is FALSE. code is 0 or a warning code. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. code is 0 or a warning code. source specifies the origin of the error or warning and is. The default is an empty string. code is the error or warning code. code is the error or warning code. If status is TRUE. If status is FALSE. in most cases. If status is TRUE.

LabVIEW Robotics Programming Guide for FRC 39-6 ni. If DIO Channel is Invalid. this VI returns an error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. DIO Channel can specify a value between DIO 1 and DIO 14. this VI uses the default digital module. or the module in slot 4. the name of the node that produced the error or warning. code is 0 or a warning code. Master-Out Slave-In specifies a digital output reference that outputs the written data to the slave. in most cases.Chapter 39 SPI VIs DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. DevStatus describes the error status before this VI or function runs. code is the error or warning code. DIO Module can specify a value of Slot 4 or Slot 6. If DIO Module specifies a value of Default. The default is no error.com . this VI returns an error. DIO Channel specifies the channel of the DIO Module that you want to use. The default is 0. If status is TRUE. source specifies the origin of the error or warning and is. or the module in slot 4. The default digital module is the first digital module. The default is FALSE. DIO Channel can specify a value between DIO 1 and DIO 14. If DIO Channel is Invalid. DevStatus describes the error status before this VI or function runs. Clock specifies a digital output reference that outputs the clock signal. The default is an empty string. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. If status is FALSE. The default is no error. The default digital module is the first digital module. this VI uses the default digital module. DIO Channel specifies the channel of the DIO Module that you want to use. code is an error code. DIO Module can specify a value of Slot 4 or Slot 6. If DIO Module specifies a value of Default.

If DIO Module specifies a value of Default. in most cases. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. code is 0 or a warning code. DIO Module can specify a value of Slot 4 or Slot 6. If DIO Channel is Invalid. code is an error code. code is the error or warning code. The default is an empty string. the name of the node that produced the error or warning. If status is FALSE. © National Instruments Corporation 39-7 LabVIEW Robotics Programming Guide for FRC . the name of the node that produced the error or warning. The default is no error. The default is 0. If DIO Module specifies a value of Default. DIO Channel can specify a value between DIO 1 and DIO 14. The default digital module is the first digital module. or the module in slot 4. The default digital module is the first digital module. this VI uses the default digital module. DevStatus describes the error status before this VI or function runs. DIO Channel specifies the channel of the DIO Module that you want to use. this VI uses the default digital module. DIO Module can specify a value of Slot 4 or Slot 6. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is an empty string.Chapter 39 SPI VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is FALSE. this VI returns an error. DIO Module specifies the slot number on the CompactRIO device of the digital module you want to use. The default is FALSE. or the module in slot 4. If status is TRUE. The default is 0. Master-In Slave-Out specifies a digital input reference that inputs the data from the slave. code is an error code. in most cases. code is 0 or a warning code. source specifies the origin of the error or warning and is. If status is TRUE. code is the error or warning code. source specifies the origin of the error or warning and is.

The default is an empty string. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If an error occurred before this node runs. source specifies the origin of the error or warning and is. code is the error or warning code. If status is FALSE. LabVIEW Robotics Programming Guide for FRC 39-8 ni. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. source specifies the origin of the error or warning and is. in most cases. If an error occurs while this node runs. The default is 0. The default is no error. code is 0 or a warning code. the name of the node that produced the error or warning.com . in most cases. Bits Per Word defines the number of bits in one frame. If status is TRUE. the name of the node that produced the error or warning. Bits Per Word specifies the number of bits from each word that the slave transmits or receives. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. error in (no error) describes error conditions that occur before this node runs. If DIO Channel is Invalid. SPIDevRef returns a reference to the SPI Engine. it runs normally and sets its own error status in error out. DevStatus describes the error status that this VI or function produces.Chapter 39 SPI VIs DIO Channel specifies the channel of the DIO Module that you want to use. this VI returns an error. The range of Bits Per Word is one to 32 bits. The default is FALSE. code is an error code. code is the error or warning code. If status is TRUE. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is FALSE. code is an error code. the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. DIO Channel can specify a value between DIO 1 and DIO 14.

code is 0 or a warning code. when TRUE. Initiate Transfer specifies. code is the error or warning code.vi Reads a word from the slave device.Chapter 39 SPI VIs error out contains error information. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is no error. error out contains the same error information. If error in indicates that an error occurred before this VI or function ran. If status is TRUE. it describes the error status that this VI or function produces. The default is an empty string. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. in most cases. code is an error code. If status is FALSE. that this VI pushes a word into the transmit buffer to initiate a transfer. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. code is an error code. the name of the node that produced the error or warning. DevStatus describes the error status before this VI or function runs. Read. Otherwise. in most cases. Initiate Transfer specifies that data is already in the buffer from a previous write. If status is FALSE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. If status is TRUE. SPIDevRef specifies a reference to the SPI Engine you want to use. When FALSE. source specifies the origin of the error or warning and is. The default is FALSE. code is 0 or a warning code. © National Instruments Corporation 39-9 LabVIEW Robotics Programming Guide for FRC .

Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. SPIDevRef returns a reference to the SPI Engine. This node runs normally only if no error occurred before this node runs. If error in indicates that an error occurred before this VI or function ran. code is 0 or a warning code. code is an error code. the node passes the error in (no error) value to error out. the name of the node that produced the error or warning. in most cases. the name of the node that produced the error or warning. Otherwise. The default is 0. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.com . LabVIEW Robotics Programming Guide for FRC 39-10 ni. If status is TRUE. The default is an empty string. in most cases. it describes the error status that this VI or function produces. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. If an error occurs while this node runs. DevStatus describes the error status that this VI or function produces. it runs normally and sets its own error status in error out. code is the error or warning code. error out contains error information.Chapter 39 SPI VIs error in (no error) describes error conditions that occur before this node runs. If status is TRUE. If status is FALSE. The default is FALSE. If an error occurred before this node runs. If status is FALSE. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Received Data returns one word from the slave device. source specifies the origin of the error or warning and is. error out contains the same error information. code is 0 or a warning code. The default is no error.

The default is FALSE. This node runs normally only if no error occurred before this node runs. the node passes the error in (no error) value to error out. SPIDevRef specifies a reference to the SPI Engine you want to use. If an error occurs while this node runs. source specifies the origin of the error or warning and is. If status is TRUE. Use error in © National Instruments Corporation 39-11 LabVIEW Robotics Programming Guide for FRC . code is an error code. the name of the node that produced the error or warning. the name of the node that produced the error or warning. code is the error or warning code. The default is no error. Write. code is the error or warning code. The default is 0. The default is no error. If status is FALSE. it runs normally and sets its own error status in error out. If an error occurred before this node runs. error in (no error) describes error conditions that occur before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 39 SPI VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Data To Send specifies one word to write to the slave device. code is 0 or a warning code. code is 0 or a warning code. in most cases. DevStatus describes the error status before this VI or function runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.vi Writes a word to the slave device. If status is FALSE. code is an error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. in most cases. If status is TRUE. source specifies the origin of the error or warning and is. The default is an empty string.

If status is FALSE. SPIDevRef returns a reference to the SPI Engine. source specifies the origin of the error or warning and is. code is an error code. in most cases. the name of the node that produced the error or warning. code is 0 or a warning code. code is an error code. LabVIEW Robotics Programming Guide for FRC 39-12 ni. If status is TRUE. Otherwise. the name of the node that produced the error or warning. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is FALSE. error out contains error information. The default is FALSE. The default is an empty string. source specifies the origin of the error or warning and is. The default is 0. DevStatus describes the error status that this VI or function produces. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. code is the error or warning code.com . error out contains the same error information. code is 0 or a warning code. in most cases. If status is FALSE. code is an error code. If status is TRUE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 39 SPI VIs (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. it describes the error status that this VI or function produces. If status is TRUE.

and the sensor receives the echo of the ping.Ultrasonic VIs 40 Refer to the LabVIEW Help. for the latest information about the Ultrasonic VIs. Use the Ultrasonic VIs to measure the distance between an ultrasonic sensor on the robot and the closest object in front of the sensor. A counter on the CompactRIO device determines the time the signal on the echo channel is high. the signal on the echo channel goes high. The default is FALSE. Use this VI to close each ultrasonic sensor reference that you open with the Open VI. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in inches or millimeters. between the sensor and the object. The Ultrasonic VIs support only ultrasonic sensors that contain both a ping channel and an echo channel where the signal on the echo channel remains high while the sensor waits for an echo. Close. The echo channel then returns low. UltrasonicDevRef specifies a reference to the ultrasonic sensor you want to use. An ultrasonic sensor emits a ping that bounces off the closest object and returns to the sensor as an echo. available by selecting Help»Search the LabVIEW Help. The default is no error. When you use the Ping VI to emit a ping from an ultrasonic sensor. The ping bounces off the closest object in front of the sensor. You then can use the GetRange VI to determine the distance. DevStatus describes the error status before this VI or function runs. © National Instruments Corporation 40-1 LabVIEW Robotics Programming Guide for FRC .vi Closes the reference to the ultrasonic sensor you specify. The signal on the echo channel is low by default.

it runs normally and sets its own error status in error out. If Echo Channel is Invalid. code is an error code. The default digital module is the first digital module. The default is 0. If status is TRUE. If an error occurred before this node runs. or the module in slot 4. The default is no error. error in (no error) describes error conditions that occur before this node runs. the node passes the error in (no error) value to error out. Echo Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected. LabVIEW Robotics Programming Guide for FRC 40-2 ni. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If an error occurs while this node runs. this VI returns an error.com . the name of the node that produced the error or warning. If Ping Channel is Invalid. CntIndex can specify a value between Ctr 0 and Ctr 7. Echo Module can specify a value of 4 or 6. Echo Channel can specify a value between 1 and 14. If Echo Module specifies a value of Default. this VI returns an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Ping Module can specify a value of 4 or 6. this VI returns an error. this VI uses the default digital module. If Ping Module specifies a value of Default. This node runs normally only if no error occurred before this node runs. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. The default digital module is the first digital module. The default is an empty string. CntIndex specifies the index of the reserved counter. If CntIndex is Invalid. or the module in slot 4. this VI uses the default digital module. Echo Channel specifies the channel on the Echo Module to which the ultrasonic sensor that receives the echo of the ping is connected. Ping Channel specifies the channel on the Ping Module to which the ultrasonic sensor that emits the ping is connected. Ping Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected.Chapter 40 Ultrasonic VIs code is the error or warning code. code is 0 or a warning code. Ping Channel can specify a value between 1 and 14. source specifies the origin of the error or warning and is. in most cases. If status is FALSE.

If status is FALSE. the name of the node that produced the error or warning. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If error in indicates that an error occurred before this VI or function ran. in inches or millimeters.Chapter 40 Ultrasonic VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Otherwise. error out contains error information. source specifies the origin of the error or warning and is. If status is TRUE. code is an error code. The default is 0. © National Instruments Corporation 40-3 LabVIEW Robotics Programming Guide for FRC . source specifies the origin of the error or warning and is. If status is FALSE. between the ultrasonic sensor and the closest object in front of the sensor. The default is FALSE. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. The ultrasonic sensor measures this distance by emitting a ping and calculating the time it takes for the echo of the ping to return. DevStatus describes the error status before this VI or function runs. in most cases. code is 0 or a warning code. The default is an empty string. code is the error or warning code. error out contains the same error information. the name of the node that produced the error or warning. in most cases. If status is TRUE.vi Returns the distance. The default is no error. code is an error code. GetRange. UltrasonicDevRef specifies a reference to the ultrasonic sensor you want to use. it describes the error status that this VI or function produces.

If CntIndex is Invalid. Echo Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected. If Echo Module specifies a value of Default. LabVIEW Robotics Programming Guide for FRC 40-4 ni. The default is an empty string. If Ping Channel is Invalid. Ping Channel specifies the channel on the Ping Module to which the ultrasonic sensor that emits the ping is connected. Ping Channel can specify a value between 1 and 14. code is the error or warning code. this VI uses the default digital module.com . this VI uses the default digital module. CntIndex specifies the index of the reserved counter. this VI returns an error. The default digital module is the first digital module. Ping Module can specify a value of 4 or 6. If status is TRUE. in most cases. Echo Channel specifies the channel on the Echo Module to which the ultrasonic sensor that receives the echo of the ping is connected. The default digital module is the first digital module. If status is FALSE. Echo Module can specify a value of 4 or 6. Echo Channel can specify a value between 1 and 14. the name of the node that produced the error or warning. If Echo Channel is Invalid. code is an error code. The default is 0. Ping Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected. this VI returns an error.Chapter 40 Ultrasonic VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. or the module in slot 4. this VI returns an error. If Ping Module specifies a value of Default. code is 0 or a warning code. CntIndex can specify a value between Ctr 0 and Ctr 7. Range Units specifies the units in which you want to measure the distance between the ultrasonic sensor and the closest object in front of the sensor. or the module in slot 4. source specifies the origin of the error or warning and is. The default is FALSE.

The default is 0. If an error occurred before this node runs. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. code is 0 or a warning code. or the module in slot 4. Ping Module can return a value of Slot 4 or Slot 6. The default is an empty string. source specifies the origin of the error or warning and is. it runs normally and sets its own error status in error out. The default digital module is the first digital module. This node runs normally only if no error occurred before this node runs. code is an error code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. UltrasonicDevRef returns a reference to the ultrasonic sensor. in most cases. If status is TRUE. code is the error or warning code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If status is FALSE. code is an error code. The default is FALSE. The default is no error. DevStatus describes the error status that this VI or function produces. If status is TRUE. If an error occurs while this node runs. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the node passes the error in (no error) value to error out.Chapter 40 Ultrasonic VIs error in (no error) describes error conditions that occur before this node runs. © National Instruments Corporation 40-5 LabVIEW Robotics Programming Guide for FRC . the name of the node that produced the error or warning. If status is FALSE. code is 0 or a warning code. the ultrasonic sensor is connected to the default digital module. Ping Module returns the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected. code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If Ping Module returns a value of Default.

Chapter 40 Ultrasonic VIs Ping Channel returns the channel on the Ping Module to which the ultrasonic sensor that emits the ping is connected. CntIndex returns the index of the reserved counter. or the module in slot 4. If CntIndex returns a value of Invalid. If Echo Channel returns a value of Invalid. and this VI returns an error. Echo Module can return a value of 4 or 6. the VI did not find the ultrasonic sensor you specified. If status is FALSE. The default digital module is the first digital module. CntIndex can return a value between Ctr 0 and Ctr 7. Otherwise. LabVIEW Robotics Programming Guide for FRC 40-6 ni. Ping Channel can return a value between 1 and 14. the VI did not find the ultrasonic sensor you specified. and this VI returns an error. the ultrasonic sensor is connected to the default digital module. it describes the error status that this VI or function produces. the VI did not find the counter you specified. between the ultrasonic sensor and the closest object in front of the sensor. code is 0 or a warning code. Distance returns the distance. in the Range Units you specified. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. If status is TRUE. error out contains the same error information. error out contains error information. If Echo Module returns a value of Default. code is an error code. the name of the node that produced the error or warning. and this VI returns an error. Echo Channel returns the channel on the Echo Module to which the ultrasonic sensor that receives the echo of the ping is connected. Echo Channel can return a value between 1 and 14. code is the error or warning code. source specifies the origin of the error or warning and is. If Ping Channel returns a value of Invalid. Echo Module returns the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected.com . If error in indicates that an error occurred before this VI or function ran. in most cases. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.

If an error occurs while this node runs. error in (no error) describes error conditions that occur before this node runs. If Ping DIO Channel is Invalid. The default digital module is the first digital module. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Ping DIO Channel specifies the channel on the Ping DIO Module to which the ultrasonic sensor that emits the ping is connected. Select 4 or 6. or the module in slot 4. Ping DIO Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected. The default digital module is the first digital module. If an error occurred before this node runs. The default is no error. the node passes the error in (no error) value to error out. Select a value between 1 and 14. You must open a reference before using any other VIs on this palette. Echo DIO Channel specifies the channel on the Echo DIO Module to which the ultrasonic sensor that receives the echo of the ping is connected.vi Creates a reference to the ultrasonic sensor you specify. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. this VI returns an error. Select 4 or 6. You also can select Default to specify the slot of the default digital module. Echo DIO Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected. © National Instruments Corporation 40-7 LabVIEW Robotics Programming Guide for FRC . or the module in slot 4. This node runs normally only if no error occurred before this node runs. You also can select Default to specify the slot of the default digital module. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.Chapter 40 Ultrasonic VIs Open. it runs normally and sets its own error status in error out. Select a value between 1 and 14. If Echo DIO Channel is Invalid. this VI returns an error.

code is the error or warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the name of the node that produced the error or warning. or the module in slot 4. If Ping Channel returns a value of Invalid. If status is FALSE. Echo Module can return a value of 4 or 6. Ping Module can return a value of Slot 4 or Slot 6. The default digital module is the first digital module. The default is FALSE.Chapter 40 Ultrasonic VIs status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. code is an error code. the VI did not find the ultrasonic sensor you specified. in most cases. Ping Channel can return a value between 1 and 14. DevStatus describes the error status that this VI or function produces. code is an error code. Ping Channel returns the channel on the Ping Module to which the ultrasonic sensor that emits the ping is connected. If Echo Module returns a value of Default. Ping Module returns the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected.com . UltrasonicDevRef returns a reference to the ultrasonic sensor. code is 0 or a warning code. The default is 0. Echo Module returns the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected. the ultrasonic sensor is connected to the default digital module. and this VI returns an error. If Ping Module returns a value of Default. code is 0 or a warning code. source specifies the origin of the error or warning and is. in most cases. LabVIEW Robotics Programming Guide for FRC 40-8 ni. code is the error or warning code. the ultrasonic sensor is connected to the default digital module. The default digital module is the first digital module. If status is FALSE. The default is an empty string. or the module in slot 4. If status is TRUE. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning.

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If error in indicates that an error occurred before this VI or function ran. the name of the node that produced the error or warning. and this VI returns an error. source specifies the origin of the error or warning and is. CntIndex returns the index of the reserved counter. code is 0 or a warning code. the VI did not find the ultrasonic sensor you specified. UltrasonicDevRef specifies a reference to the ultrasonic sensor you want to use. code is an error code. If status is TRUE. and this VI returns an error. Ping. error out contains the same error information. CntIndex can return a value between Ctr 0 and Ctr 7. If CntIndex returns a value of Invalid. If Echo Channel returns a value of Invalid. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. it describes the error status that this VI or function produces. DevStatus describes the error status before this VI or function runs. the VI did not find the counter you specified. Echo Channel can return a value between 1 and 14.Chapter 40 Ultrasonic VIs Echo Channel returns the channel on the Echo Module to which the ultrasonic sensor that receives the echo of the ping is connected. Otherwise. in most cases. The default is FALSE.vi Emits a single ping from the ultrasonic sensor you specify. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. error out contains error information. If status is FALSE. © National Instruments Corporation 40-9 LabVIEW Robotics Programming Guide for FRC .

in most cases. source specifies the origin of the error or warning and is. Ping Module can specify a value of 4 or 6.Chapter 40 Ultrasonic VIs code is the error or warning code. the name of the node that produced the error or warning. If CntIndex is Invalid. code is 0 or a warning code. Echo Module can specify a value of 4 or 6. this VI uses the default digital module. If Ping Module specifies a value of Default. CntIndex can specify a value between Ctr 0 and Ctr 7. Echo Channel can specify a value between 1 and 14. in seconds. this VI returns an error. Ping Channel can specify a value between 1 and 14. it runs normally and sets its own error status in error out. the node passes the error in (no error) value to error out. error in (no error) describes error conditions that occur before this node runs. Echo Channel specifies the channel on the Echo Module to which the ultrasonic sensor that receives the echo of the ping is connected. this VI returns an error. this VI uses the default digital module. If Ping Channel is Invalid. The default is an empty string. CntIndex specifies the index of the reserved counter. pingtime (Sec) specifies the duration. The default is 0. The default digital module is the first digital module. This node runs normally only if no error occurred before this node runs. The default is 1E-5. or the module in slot 4. Ping Channel specifies the channel on the Ping Module to which the ultrasonic sensor that emits the ping is connected. this VI returns an error. The default is no error. If an error occurred before this node runs. If status is TRUE. or the module in slot 4. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. of the ping the ultrasonic sensor emits.com . Ping Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected. If Echo Module specifies a value of Default. The default digital module is the first digital module. If status is FALSE. Use exception control to treat what is LabVIEW Robotics Programming Guide for FRC 40-10 ni. If an error occurs while this node runs. If Echo Channel is Invalid. code is an error code. Echo Module specifies the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected.

Ping Channel can return a value between 1 and 14. source specifies the origin of the error or warning and is. the name of the node that produced the error or warning. and this VI returns an error. code is the error or warning code. If status is FALSE. If status is TRUE. The default is an empty string. code is 0 or a warning code. The default digital module is the first digital module. code is 0 or a warning code. If status is TRUE.Chapter 40 Ultrasonic VIs normally an error as no error or to treat a warning as an error. code is the error or warning code. Ping Channel returns the channel on the Ping Module to which the ultrasonic sensor that emits the ping is connected. DevStatus describes the error status that this VI or function produces. If Ping Channel returns a value of Invalid. or the module in slot 4. UltrasonicDevRef returns a reference to the ultrasonic sensor. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. the VI did not find the ultrasonic sensor you specified. If status is FALSE. The default is FALSE. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. © National Instruments Corporation 40-11 LabVIEW Robotics Programming Guide for FRC . code is an error code. in most cases. If Ping Module returns a value of Default. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. Ping Module returns the digital module on the CompactRIO device to which the ultrasonic sensor that emits the ping is connected. source specifies the origin of the error or warning and is. the ultrasonic sensor is connected to the default digital module. Ping Module can return a value of Slot 4 or Slot 6. the name of the node that produced the error or warning. code is an error code.

in most cases. or the module in slot 4. and this VI returns an error.com . If Echo Channel returns a value of Invalid. Echo Channel can return a value between 1 and 14. and this VI returns an error.Chapter 40 Ultrasonic VIs Echo Module returns the digital module on the CompactRIO device to which the ultrasonic sensor that receives the echo of the ping is connected. CntIndex can return a value between Ctr 0 and Ctr 7. If status is FALSE. Otherwise. error out contains the same error information. Echo Module can return a value of 4 or 6. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. CntIndex returns the index of the reserved counter. If Echo Module returns a value of Default. The default digital module is the first digital module. source specifies the origin of the error or warning and is. If status is TRUE. If CntIndex returns a value of Invalid. the name of the node that produced the error or warning. Echo Channel returns the channel on the Echo Module to which the ultrasonic sensor that receives the echo of the ping is connected. LabVIEW Robotics Programming Guide for FRC 40-12 ni. code is the error or warning code. it describes the error status that this VI or function produces. error out contains error information. If error in indicates that an error occurred before this VI or function ran. code is 0 or a warning code. the ultrasonic sensor is connected to the default digital module. the VI did not find the ultrasonic sensor you specified. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. the VI did not find the counter you specified. code is an error code.

code is the error or warning code.Utilities VIs 41 Refer to the LabVIEW Help. Use exception control to treat what is normally an error as no error or to treat a warning as an error. for the latest information about the Utilities VIs. The default is 0. it runs normally and sets its own error status in error out. the state of the LEDs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurs while this node runs. available by selecting Help»Search the LabVIEW Help. code is 0 or a warning code. If status is TRUE. and the version of the FPGA. error in (no error) describes error conditions that occur before this node runs. If status is FALSE.vi Returns the version and revision of the FPGA image on the CompactRIO device. the node passes the error in (no error) value to error out. The default is FALSE. Use the Utilities VIs to return information about the CompactRIO device. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. This node runs normally only if no error occurred before this node runs. If an error occurred before this node runs. © National Instruments Corporation 41-1 LabVIEW Robotics Programming Guide for FRC . FRC FPGAVersion. code is an error code. such as the temperature of the chassis.

the name of the node that produced the error or warning. If error in indicates that an error occurred before this VI or function ran. the name of the node that produced the error or warning.com . error out contains the same error information. LabVIEW Robotics Programming Guide for FRC 41-2 ni. and C correspond to the revision A. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.C.vi Sets the state. error out contains error information. Version returns the version of the FPGA image. FRC LEDs. code is the error or warning code. Otherwise. of the USER1 LED or the FPGA LED on the CompactRIO device. in most cases. the LED changes to the opposite of the current state. Revision returns 0x0010A00F for revision 1. B. If you want the LED to blink. You can define both the USER1 LED and the FPGA LED to meet the needs of your application. where A. Revision returns the revision of the FPGA image in the format 0xAAABBCCC. The default is an empty string. If status is TRUE.Chapter 41 Utilities VIs source specifies the origin of the error or warning and is. the version of the FPGA image corresponds to the year of the competition. For example. If status is FALSE. source specifies the origin of the error or warning and is. in most cases. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.15. For the FIRST Robotics Competition (FRC). you must call this VI continuously.10. Note If you set the State of the USER1 LED or the FPGA LED to Toggle.B. code is 0 or a warning code. code is an error code. either on or off.

This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs. Use exception control to treat what is normally an error as no error or to treat a warning as an error. The default is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LED State returns TRUE if the LED is on and FALSE if the LED is off. code is 0 or a warning code. If status is TRUE. If status is TRUE. The default is no error. error out contains the same error information. code is the error or warning code. it describes the error status that this VI or function produces. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. code is an error code. The default is 0. If status is FALSE. the name of the node that produced the error or warning. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. in most cases. the name of the node that produced the error or warning. The default is an empty string. © National Instruments Corporation 41-3 LabVIEW Robotics Programming Guide for FRC . If status is FALSE. code is 0 or a warning code. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. If error in indicates that an error occurred before this VI or function ran. it runs normally and sets its own error status in error out.Chapter 41 Utilities VIs LED Type specifies the LED whose state you want to set. either on or off. code is an error code. If an error occurred before this node runs. Otherwise. error in (no error) describes error conditions that occur before this node runs. State specifies the state. error out contains error information. to which you want to set the LED you specify with the LED Type control. in most cases. the node passes the error in (no error) value to error out. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. source specifies the origin of the error or warning and is. code is the error or warning code.

vi Returns the position of the USER1 switch on the CompactRIO device.Chapter 41 Utilities VIs FRC ReadSwitch. error in (no error) describes error conditions that occur before this node runs. it describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If status is TRUE. If an error occurs while this node runs. The default is FALSE. the node passes the error in (no error) value to error out. The default is 0. The default is an empty string. If error in indicates that an error occurred before this VI or function ran. code is the error or warning code. error out contains the same error information. code is an error code. the name of the node that produced the error or warning. code is 0 or a warning code. The default is no error. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If an error occurred before this node runs. Otherwise. source specifies the origin of the error or warning and is. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. it runs normally and sets its own error status in error out. This node runs normally only if no error occurred before this node runs. If status is FALSE. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. LabVIEW Robotics Programming Guide for FRC 41-4 ni. error out contains error information.com . Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. in most cases. switch state returns TRUE if the USER1 switch is in the ON position and FALSE if the USER1 switch is in the OFF position. Use the RT Read Switch VI to define the USER1 switch for your application.

code is 0 or a warning code. in most cases. source specifies the origin of the error or warning and is. code is an error code. © National Instruments Corporation 41-5 LabVIEW Robotics Programming Guide for FRC . If status is TRUE. the name of the node that produced the error or warning.Chapter 41 Utilities VIs code is the error or warning code. If status is FALSE.

if a network failure occurs. © National Instruments Corporation 42-1 LabVIEW Robotics Programming Guide for FRC . During the FIRST Robotics Competition (FRC). The system watchdog can time out if the driver station sends a “disabled” signal. state. the system watchdog is alive as long as it receives an “enabled” signal from the driver station. or if the driver station is in an emergency stop. available by selecting Help»Search the LabVIEW Help. for the latest information about the Watchdog VIs. The watchdogs ensure that the robot does not continue moving if the robot loses communication with the driver station or field management system (FMS). If you enable the user watchdog. Use the Open VI to create a WatchdogDevRef reference cluster that you then can wire to the other Watchdog VIs. Close. You can use the SetEnabled VI to specify whether the user watchdog is enabled. relay. a system watchdog and a user watchdog. and solenoid outputs of the CompactRIO device if the watchdog times out. Use this VI to close each watchdog reference that you open with the Open VI. A watchdog times out if it is not fed during a specified amount of time. Each CompactRIO device consists of two watchdogs.vi Closes the reference to the user watchdog you specify.Watchdog VIs 42 Refer to the LabVIEW Help. Use the Watchdog VIs to control the user watchdog if you choose to enable the user watchdog. The system watchdog is always enabled. or e-stop. Each watchdog can disable the PWM. you must specify a timeout period and ensure that the program you write feeds the watchdog regularly.

Chapter 42

Watchdog VIs

WatchdogDevRef specifies a reference to the user watchdog. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

LabVIEW Robotics Programming Guide for FRC

42-2

ni.com

Chapter 42

Watchdog VIs

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

Delay and Feed.vi
Delays execution for a specified amount of time but continues feeding the user watchdog to avoid timing out. You can use this VI in autonomous code to hold the settings of the motors for a certain amount of time without the user watchdog timing out.

WatchdogDevRef specifies a reference to the user watchdog. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. Delay (s) specifies the amount of time, in seconds, for which to delay execution. The default is 0. Feed time (s) specifies the interval, in seconds, at which to feed the user watchdog while execution is delayed. The default is 0.05.

© National Instruments Corporation

42-3

LabVIEW Robotics Programming Guide for FRC

Chapter 42

Watchdog VIs

error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. WatchdogDevRef returns a reference to the user watchdog. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

LabVIEW Robotics Programming Guide for FRC

42-4

ni.com

Chapter 42

Watchdog VIs

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

Feed.vi
Sends a signal to, or feeds, the user watchdog.

WatchdogDevRef specifies a reference to the user watchdog. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node.

© National Instruments Corporation

42-5

LabVIEW Robotics Programming Guide for FRC

Chapter 42

Watchdog VIs

status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. WatchdogDevRef returns a reference to the user watchdog. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

LabVIEW Robotics Programming Guide for FRC

42-6

ni.com

Chapter 42

Watchdog VIs

GetStatus.vi
Returns whether the user watchdog is alive and whether the system is active. The system is active when both the system and user watchdogs are either disabled or enabled and alive.

WatchdogDevRef specifies a reference to the user watchdog. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code.

© National Instruments Corporation

42-7

LabVIEW Robotics Programming Guide for FRC

Chapter 42

Watchdog VIs

source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. WatchdogDevRef returns a reference to the user watchdog. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. Is Alive returns TRUE if the user watchdog is alive. Otherwise, Is Alive returns FALSE. SystemActive returns TRUE if the system is active. The system is active when both the system and user watchdogs are either disabled or enabled and alive. If either watchdog is enabled and has timed out, SystemActive returns FALSE. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

LabVIEW Robotics Programming Guide for FRC

42-8

ni.com

Chapter 42

Watchdog VIs

Kill.vi
Forces the user watchdog to time out immediately. When the user watchdog times out, it disables the PWM, relay, and solenoid outputs of the CompactRIO device.

WatchdogDevRef specifies a reference to the user watchdog. DevStatus describes the error status before this VI or function runs. The default is no error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. error in (no error) describes error conditions that occur before this node runs. The default is no error. If an error occurred before this node runs, the node passes the error in (no error) value to error out. This node runs normally only if no error occurred before this node runs. If an error occurs while this node runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use exception control to treat what is normally an error as no error or to treat a warning as an error. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. code is the error or warning code. The default is 0. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code.

© National Instruments Corporation

42-9

LabVIEW Robotics Programming Guide for FRC

Chapter 42

Watchdog VIs

source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. The default is an empty string. WatchdogDevRef returns a reference to the user watchdog. DevStatus describes the error status that this VI or function produces. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning. error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is the error or warning code. If status is TRUE, code is an error code. If status is FALSE, code is 0 or a warning code. source specifies the origin of the error or warning and is, in most cases, the name of the node that produced the error or warning.

Open.vi
Opens a reference to the user watchdog. You must open a reference before using any other VIs on this palette.

LabVIEW Robotics Programming Guide for FRC

42-10

ni.com

The default is 0. If an error occurs while this node runs. source specifies the origin of the error or warning and is. code is an error code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. If an error occurred before this node runs. The default is an empty string. in most cases.5s) specifies the time. code is the error or warning code. © National Instruments Corporation 42-11 LabVIEW Robotics Programming Guide for FRC . code is an error code. it runs normally and sets its own error status in error out. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. relay. If status is FALSE. it disables the PWM. If status is TRUE. that the user watchdog waits to be fed.5 seconds. the node passes the error in (no error) value to error out. If status is TRUE. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code.Chapter 42 Watchdog VIs Expiration (0. the name of the node that produced the error or warning. and solenoid outputs of the CompactRIO device. the name of the node that produced the error or warning. DevStatus describes the error status that this VI or function produces. This node runs normally only if no error occurred before this node runs. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is the error or warning code. error in (no error) describes error conditions that occur before this node runs. WatchdogDevRef returns a reference to the user watchdog. in seconds. in most cases. The default is FALSE. The default is 0. If status is FALSE. The default is no error. Use exception control to treat what is normally an error as no error or to treat a warning as an error. If the user watchdog is not fed during this time. source specifies the origin of the error or warning and is. code is 0 or a warning code. code is 0 or a warning code.

or solenoid outputs of the CompactRIO device. error out contains the same error information. LabVIEW Robotics Programming Guide for FRC 42-12 ni. code is the error or warning code. relay. the name of the node that produced the error or warning. If status is FALSE. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.vi Specifies whether the user watchdog is enabled. Otherwise. DevStatus describes the error status before this VI or function runs. code is 0 or a warning code. source specifies the origin of the error or warning and is. it describes the error status that this VI or function produces.com . If error in indicates that an error occurred before this VI or function ran. WatchdogDevRef specifies a reference to the user watchdog. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is 0. code is the error or warning code. If status is TRUE. in most cases. The default is an empty string. in most cases. If status is FALSE. source specifies the origin of the error or warning and is.Chapter 42 Watchdog VIs error out contains error information. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. if the user watchdog is disabled. using the Kill VI does not disable the PWM. code is an error code. Furthermore. If status is TRUE. the system is still active as long as the system watchdog also is disabled or is enabled and alive. The default is FALSE. The default is no error. the name of the node that produced the error or warning. SetEnabled. code is an error code. If the user watchdog is disabled.

source specifies the origin of the error or warning and is. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. If the user watchdog is not fed during the expiration period you specify with the VI. source specifies the origin of the error or warning and is. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. code is 0 or a warning code. relay. The default is 0. This node runs normally only if no error occurred before this node runs. code is an error code. The default is an empty string.Chapter 42 Watchdog VIs Enabled specifies. the name of the node that produced the error or warning. when TRUE. and solenoid outputs of the CompactRIO device. If the user watchdog is enabled. the name of the node that produced the error or warning. the watchdog disables the PWM. Use error in (no error) and error out to check errors and to specify execution order by wiring error out from one node to error in (no error) of the next node. code is an error code. WatchdogDevRef returns a reference to the user watchdog. The default is TRUE. If status is FALSE. DevStatus describes the error status that this VI or function produces. that the user watchdog is enabled. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran. The default is FALSE. the application you develop must account for feeding the watchdog at regular periods. If status is TRUE. code is the error or warning code. If status is TRUE. © National Instruments Corporation 42-13 LabVIEW Robotics Programming Guide for FRC . the node passes the error in (no error) value to error out. error in (no error) describes error conditions that occur before this node runs. in most cases. If status is FALSE. in most cases. If an error occurs while this node runs. it runs normally and sets its own error status in error out. Use exception control to treat what is normally an error as no error or to treat a warning as an error. code is the error or warning code. code is 0 or a warning code. If an error occurred before this node runs. The default is no error.

If error in indicates that an error occurred before this VI or function ran. it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error. in most cases. Otherwise. code is an error code. the name of the node that produced the error or warning. If status is FALSE. code is the error or warning code. source specifies the origin of the error or warning and is. If status is TRUE. error out contains the same error information.com . LabVIEW Robotics Programming Guide for FRC 42-14 ni. code is 0 or a warning code. status is TRUE (X) if an error occurred before this node ran or FALSE (checkmark) to indicate a warning or that no error occurred before this node ran.Chapter 42 Watchdog VIs error out contains error information.

Sign up to vote on this title
UsefulNot useful