Go to Post Also you NEVER need to apologize for asking questions. Asking questions is how you learn. - akoscielski3 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-12-2008, 17:00
ericand's Avatar
ericand ericand is offline
Registered User
AKA: Eric Anderson
FRC #3765 (Terrabots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: St. Paul, MN
Posts: 148
ericand is a jewel in the roughericand is a jewel in the roughericand is a jewel in the rough
cRIO - motor controller code (esp. victor)

I think there is a bug in the speed controller init code for the victors.

The default settings for the victor speed controler set the center position as 132. The comments state that the values
used were established "empirically"

The default bounds are:
max 210
Dead Band Top 138
Dead Band Mid 132
Dead Band Bot 126
min 56


Given, as the comments state, the values can vary from victor to victor, and given the values can chage if the victors
are calibrated using the Victor calibration procedure of (give them max PWM and min PWM and push the switch on the
victor)

I think a better default would be centered around 127, with max and min at 254 and 0 respectively.

Better yet would be to have a motor controller constructor that allows these to be set whe the controller is created.

At the very least we need a note to teams to call SetBounds() on their controllers to get values that match their
hardware (instead of values that match the hardware of the WPI library developers.

This may explain why we were seeing the drive moters creep and hum when the joysticks were neutral. For those motors,
neutal was actually just a little bit on.

The code for the Jaguar controller looks more like what I would expect.
  #2   Spotlight this post!  
Unread 05-12-2008, 23:39
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: cRIO - motor controller code (esp. victor)

Those empirically established values match the factory calibration of every Victor I have taken the time to characterize. I suspect that if you restore the factory calibration to your Victors, you'll see the "creep and hum" at neutral go away.
  #3   Spotlight this post!  
Unread 06-12-2008, 03:44
BornaE's Avatar
BornaE BornaE is offline
Registered User
FRC #0842 (Formerly 39)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Gilbert, Arizona
Posts: 359
BornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant future
Re: cRIO - motor controller code (esp. victor)

The robotdrive is a high level function created for ease of programmin, and there are multiple assumption in it.
If you was low level of controll you can always use the lowest level dunctions that are in the PWM pallet. then you can set your mins and maxes and centers easily
__________________
-Borna Emami
Team 0x27
  #4   Spotlight this post!  
Unread 06-12-2008, 11:17
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: cRIO - motor controller code (esp. victor)

I was testing with servos controlled by a Victor class and noticed that I wasn't getting full range on the output. That got me digging through the source of the library (an excellent reason for open source code) and noticed the output limits based on empirical data as well.

Quote:
Originally Posted by Alan Anderson View Post
Those empirically established values match the factory calibration of every Victor I have taken the time to characterize.
Any idea why they chose to limit to the default factory values instead of letting the full range out and using the manual calibration of the Victors like years past? If a veteran team pulls Victors from a previous year's robot, they're going to have problems if their Victor is calibrated (as Eric has already found out)

Alan, you mentioned setting the factory defaults for the Victor. What's the procedure for that for teams that don't want to mess with SetBounds()?
  #5   Spotlight this post!  
Unread 06-12-2008, 13:51
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,367
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: cRIO - motor controller code (esp. victor)

Seams the victor manual is not on the IFI website any more. Maybe someone could post excerpts from the manual. As far as servo's, The Jag VI's allow pulses less than 1 ms and grater than 2ms. This would allow a team to use the full mechanical range of hobby servo's. Care must be taken not to stress the servos against the mechanical stops. Good way to make a servo eat it's self. This can be useful when using hobby servo's to control a pan-tilt assemble for the camera or Sharp IR range sensors.
  #6   Spotlight this post!  
Unread 06-12-2008, 14:08
ericand's Avatar
ericand ericand is offline
Registered User
AKA: Eric Anderson
FRC #3765 (Terrabots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: St. Paul, MN
Posts: 148
ericand is a jewel in the roughericand is a jewel in the roughericand is a jewel in the rough
Re: cRIO - motor controller code (esp. victor)

I was just looking at the specs and manual (found via google search at
http://www.ifirobotics.com/victor-88...r-robots.shtml and http://www.ifirobotics.com/docs/ifi-...al-9-25-06.pdf)

The spec sheet states that the dead band is centered around 127. The manual describes the calibration process.

I would expect the defaults in the code to match the specs, not some empirical test (with out a lot of explanation as to why the specs are wrong and must be overridden by default).
  #7   Spotlight this post!  
Unread 06-12-2008, 17:17
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: cRIO - motor controller code (esp. victor)

Quote:
Originally Posted by ericand View Post
I would expect the defaults in the code to match the specs, not some empirical test (with out a lot of explanation as to why the specs are wrong and must be overridden by default).
What kind of explanation would you like? If you search around on the forums there are numerous teams who have collected data on the Victor's transfer curve and found that the center of the deadband is 132 in factory calibration. The reason why would be a question for IFI.

In this post on the IFI forum, you can see them list neutral as 1260139 which puts the deadband center between 131 and 132.
__________________


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)
  #8   Spotlight this post!  
Unread 06-12-2008, 20:46
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: cRIO - motor controller code (esp. victor)

Quote:
Originally Posted by Dave Scheck
I was testing with servos controlled by a Victor class...
That's the root of the problem right there. Why weren't you using a Servo class? The software knows about and exploits the difference between the various output devices. If you lie to it about what you're connecting, you shouldn't be surprised that it doesn't give the results you want.

Quote:
Originally Posted by Dave Scheck View Post
Any idea why they chose to limit to the default factory values instead of letting the full range out and using the manual calibration of the Victors like years past? If a veteran team pulls Victors from a previous year's robot, they're going to have problems if their Victor is calibrated (as Eric has already found out)
If you use a Victor that was calibrated in a different system, you're asking for trouble in any case. It's easier to reset to factory defaults than it is to calibrate to a new system. In my experience, every Victor acts the same, so it seems quite reasonable to set up the control software to match their behavior.

Quote:
Alan, you mentioned setting the factory defaults for the Victor. What's the procedure for that for teams that don't want to mess with SetBounds()?
For teams unwilling to mess with reading the manual, you mean?

Remove power from the Victor. Press and hold the Victor's CAL button. Apply power. Wait for the Victor's LED to blink green. Release the Victor's CAL button. All done.
  #9   Spotlight this post!  
Unread 06-12-2008, 22:09
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: cRIO - motor controller code (esp. victor)

Quote:
Originally Posted by Alan Anderson View Post
That's the root of the problem right there. Why weren't you using a Servo class? The software knows about and exploits the difference between the various output devices. If you lie to it about what you're connecting, you shouldn't be surprised that it doesn't give the results you want.
There is nothing in any documentation that I've read that clearly states that this is the case. The only reason that I ever found out about it is that I observed something through experimentation and dug into the source code to figure out what was going on. For years we've tested basic drive code by watching servo behavior on a benchtop setup. When we tested for the first time with the new system, it didn't seem unreasonable to try the same thing. Now we know, and can deal with it.

I have quickly learned that the new system is not the old system. Things that used to work, no longer do. For example, we used to set all motor output to neutral at the start of every loop for safety, then only set the motors that needed setting. With the new system, as soon as a Set is called, the output is set (which makes sense). When we initially tested, we were getting choppy response. It took a little bit to figure out what was going on, but it's a learning process.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Motor to Victor jumpe1990 Motors 11 20-02-2008 09:34
Window Motor on a Victor? DavidGitz Kit & Additional Hardware 1 13-01-2007 09:42
Non-Victor Speed Controller FourPenguins Electrical 6 31-10-2006 15:46
What Victor for VEX Controller? Chris_Elston Electrical 5 25-04-2006 21:00
Victor controller problem llambele Technical Discussion 3 14-11-2001 23:00


All times are GMT -5. The time now is 15:02.

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