Intergrated pids

On our drivetrain we are using four motors with two on each side. The back motors have a ime on them and are linked by chain to the front motor. We know that the pid control can be turned on anf off with nMotorPIDSpeedCtrl[motor1] = mtrSpeedReg;. And I believe the function to utilze pid control is motormovetarget[port1] = encodervalue. I have tried this but the program never seems to meet the value in the competition template.Will pid work too make turning realy accurate? Also i will not be able to post my code until 4:00.

When you give the motors a goal value and watch in the debug window how close do you get?

They go past the value entirely, it makes it to the goal then continues.

It sounds like the pid is looking for a value (positive or negative) but the encoders are counting the opposite direction. Try reversing your wheels(so that they count the other direction) and then try.

Make sure you did not reverse motors by connecting black to red wire at a connector. Did you slave front and back wheels? Perhaps post the code if you can.

will post the code tomorrow, and i reversed the motors so that the values were both positive.