For 393 motors we built a tester jig to test their performance. It was a motor that spun 4 wheels with an encoder on the shaft. We spun them forward for 5 seconds then backwards for 5 seconds and just looked at the values to tell the quality of the motor.
Yup. After it is run you can unplug a motor to get the screen pop up with the button for the log. If the motors reached the temperature limits it’ll list it there.
What I wanted was a quick program students can run between matches to check motor’s working.
While not sophisticated, this is what I’d envisioned and welcome any input. The one thing I haven’t figured out is when motors are directly coupled If the encoder works but motors doesn’t this may send a false positive…
/void pre_auton(void) {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
// set motor defayults
setUpMotor(L_Drive, 10);
setUpMotor(R_Drive, 10);
setUpMotor(L_Lift, 10);
setUpMotor(R_Lift, 10);
setUpMotor(Claw, 10);
} // end pre_auton
// DEFAULT MOTOR SETTINGS
void setUpMotor(motor(M),int D) {
M.value();
M.setMaxTorque(90, percentUnits::pct); // set torque
M.setTimeout(3, timeUnits::sec); // set motor timeout
M.resetRotation(); // reset encoders
M.setStopping(hold); // hold
M.spinTo(D, deg, 15, velocityUnits::pct);
dspMotor();
wait(2, seconds);
}
void dspMotor() {
Controller1.Screen.clearScreen();
Controller1.Screen.setCursor(1, 1);
Controller1.Screen.print("Drive L: %3d R: %3d",
L_Drive.current(amp)/1000,
R_Drive.current(amp)/1000); // L&R DRIVE
Controller1.Screen.setCursor(2, 1);
Controller1.Screen.print("Lift L: %3d R: %3d",
L_Lift.current(amp)/1000,
R_Lift.current(amp)/1000); // L&R LIFT
Controller1.Screen.setCursor(2, 1);
Controller1.Screen.print("Claw: %3d",
Claw.current(amp)/1000); // CLAW
} // END TEST MOTOR
you don’t. My reference to a log was to the one automatically generated by your brain when you plug in motors, unplug them, when a motor overheats, etc.
got to look at that! I knew the brain would throw messages and display real-time stats - must be a way to query this
Again - our kids are middle school and it’s hard enough getting them to remember to check fasteners - asking them to rifle through brain menus equates to work & guarantees they won’t…
that’s mighty kind of you - you prompted a change in code - instead of using motor position I am reading the motor current! seeing motor.stop(hold) anything with a load should show up - the problem is drive motor but that’s easy to tell anyway…
Still got to look at the brain’s data - that’s a good one…