VEX PID Control

Jump to: navigation, search
Line 28: Line 28:
  
 
== Enabling PID (Advanced) ==
 
== Enabling PID (Advanced) ==
 +
 +
=== Motors and Sensors Setup ===
  
 
'''Caution: Changing the default PID parameters may cause motor behavior which can potentially damage your robot with unexpected movements. As such, we advise that all PID testing be done in a safe area to help mitigate any possible damage.'''
 
'''Caution: Changing the default PID parameters may cause motor behavior which can potentially damage your robot with unexpected movements. As such, we advise that all PID testing be done in a safe area to help mitigate any possible damage.'''

Revision as of 12:02, 7 December 2012

VEX → VEX PID Control

For ROBOTC VEX PID Control Functions, see: VEX PID Control Functions.

Contents

Color Key
Function:
Variable:

Getting Started

Before you can start using PID control for the VEX Cortex in ROBOTC, you must make sure you have all of the required components. There are two main components required to get started: a VEX 269 or 369 motor with an Integrated Motor Encoder (IME) installed, and a copy of ROBOTC for Cortex/PIC version 3.6.1 or higher. If you wish to control more than one motor using PID (on a robot, for example), you will need to make sure each motor that is PID controlled has an IME installed and is connected to the Cortex correctly. If you are unsure of how to configure the IME's inside of ROBOTC, please see our IME programming guide before continuing.

VEX motors with IME's installed

Enabling PID (Simple)

Enabling basic PID control in ROBOTC is simple; navigate to the 'Robot -> Motors and Sensors Setup' window, find the motor you wish to enable PID control on, and check the 'PID Control'

PID Checkbox.png

This will enable basic PID control for the specified motors using ROBOTC's default parameters.

Enabling PID (Advanced)

Motors and Sensors Setup

Caution: Changing the default PID parameters may cause motor behavior which can potentially damage your robot with unexpected movements. As such, we advise that all PID testing be done in a safe area to help mitigate any possible damage.

1. The first thing you will need to do before you are able to use the advanced features of PID control is change the menu level type to 'Super User'. This is done by navigating to the 'Window -> Menu Level' option in ROBOTC and changing the selected level to 'Super User'.

2. Once the Menu Level has been changed to 'Super User', open the Motors and Sensors setup window (under the Robot menu). You will notice that there is now an additional tab for 'PID Settings'; click on it to open the PID Settings window.

3. All of the motors configured with VEX IME's that have PID enabled will appear in the "PID Settings for Motors in This Single Program" box. Double-clicking on one of the listed motors will bring up a separate 'Edit PID Settings' window that can be used to manually tweak the PID settings for that particular motor.

4. There is also the option to change how ROBOTC handles PID for any particular motor setup, even if it is outside of that particular program. To view this menu option, click the 'More' button.

5. Let's assume you would like to change the PID settings for any VEX 269 motor (without a Motor Controller 29) programmed in ROBOTC. Double click on the appropriate motor and change the settings as needed in the 'Edit PID Settings' box that appears. Remember, any changes to these setting will overwrite ROBOTC's defaults and will be applied to any program using PID control!

6.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox