|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: [FTC]: [FTC]: Reason found why robot runs slower in Auto
The first thing that made me think the problem had something to do with PID was your performance data graph.
It doesn't necessarily have to be within your block diagram of your code to be running. In RobotC the motors and sensors setup has a built-in PID control function. Which I have personally noticed does not allow the motors to reach a speed past 65%. ![]() In RobotC the run to position command is the same as our Encoder-target command. We assign a fixed motor power to move the motor to the specified target. The motor uses that speed as the maximum "allowed speed." It then begins to approach the speed based upon Proportional gain. The Integral is defiantly what you see on your graph where the curve is created approaching the set target. Then if you notice there is a oscillation there is your Derivative. Here your problem is noted basically on how the PID is based. Speed = ⌂ANGLE/⌂TIME There is a line of code in RobotC to fix this though and there should be a similar code in LabVIEW. nSyncMotors = motor[motorD] && motor[motorE] My first thought is that LabVIEW DOES have it's own PID algorithm running in the motor.vi. In RobotC this is the case. |
|
#2
|
|||||
|
|||||
|
Re: [FTC]: [FTC]: Reason found why robot runs slower in Auto
Quote:
That Motor configuration page looks like it's being used to set the mode bits that are being sent to the DC controller when commands are issued. (just like with LabVIEW's Motor Configurator utility) eg: The "Reversed" checkbox decides whether to set the "Invert" bit in the Controller that is used to flip the motor polarity and encoder count direction. The "PID" checkbox sets the bit that decides whether the controller should run in Constant Power, or Constant Speed Mode. I would propose that if you ran some tests you'd find that running a motor at a speed of 100% with the PID box checked, it would run at full speed, but if you ran the same motor at 100% with the PID box checked AND telling it to go 10000 encoder counts, it would run at 65% speed. Indicating that it's not the Speed PID that is causing the problem. It's the Run to position code. You may not believe me, but please don't refute it until you actually run this very specific test. As for LabVIEW running a PID function... I assure you it's not. I've traced these calls all the way down to where they assemble and issue the specific I2C register commands to the Motor Controller. I've mapped the individual bits the published Hitechnic control registers and there is NO LabVIEW PID running. It's all in the DC Motor controller. If you are interested, here is the Motor Controller Register Specification. http://stuyfissionfusiondevelopment....ief%20v1.3.pdf Phil. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|