Go to Post Only one full day of brainstorming on the hint? Boy are they behind... This thread's been busy for a week! - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 11-02-2011, 15:26
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Programming Motors for Arm

Quote:
Originally Posted by Egg 3141592654 View Post
the process variable is the raw instantanious pot reading, the array of 3 values that are used to tune the loop (bottom always 0, mid is 0 or really small, top is the tuning number >0).
What should I set the top to? Can it be any number I want? And if so what would be the difference between, for example, 2 and 3?

And one of the posts said the top value is the one you set your motor to, so I figured this was just the motor output. However, one of the pics of code had a box with 1 on top and -1 on the bottom and the actual motor set leading from the left edge of the PID. Which is the correct way for our robot?
__________________

Last edited by dmitch : 11-02-2011 at 15:30.
Reply With Quote
  #17   Spotlight this post!  
Unread 12-02-2011, 11:47
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Programming Motors for Arm

The PID block has quite a few terminals which you want to wire specific things to.

I'll start at the top and rotate around the VI counterclockwise.

On the top you want to wire a constant to the Output Range terminal by right clicking and selecting "Create->Constant". For most FRC applications you want to change the default 100 and -100 to 1 and -1.

Setpoint is where you wire the point you want to device to go to.
Process Variable is where you wire the measurement of the device's position.
You must make sure that the Setpoint and Process Variable have the same units, the PID block will try to drive the Process Variable until it matches the Setpoint.

For tuning purposes you likely want to make a control for the PID gains terminal. A good starting place for the tuning of a position loop is to set the Integral Time and Derivative Time to 0.

To find a starting point for the Proportional Gain, estimate the smallest error you want to still result in the maximum output. Then take the max output (usually 1) and divide by the error and you will have a starting point for the P gain. I would actually start the tuning with a gain lower than this number. I highly recommend reading this paper to understand the basic concepts so you can tune your PID loop.

One thing to be careful of is the Labview implementation of PID is different than the implementation described in the paper. Labview uses Integral Time(Ti) and Derivative Time(Td) instead of Integral Gain(Ki) and Derivative Gain(Kd). The conversion is Kp equals Kc, Ki equals Kc/Ti, and Kd equals KcTd.

The output terminal of the PID block should be wired into the Motor Set Speed VI.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi