![]() |
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. |
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.
|
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 |
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:
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()? |
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.
|
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). |
Re: cRIO - motor controller code (esp. victor)
Quote:
In this post on the IFI forum, you can see them list neutral as 1260139 which puts the deadband center between 131 and 132. |
Re: cRIO - motor controller code (esp. victor)
Quote:
Quote:
Quote:
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. |
Re: cRIO - motor controller code (esp. victor)
Quote:
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. |
| All times are GMT -5. The time now is 13:34. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi