Hi, team #3063 here. We’re having problems with our cortex at competition, and since our next competition is States in three weeks, we want to troubleshoot this issue before then. This issue has occurred at two separate competitions one month apart, on different microcontrollers, two completely redesigned robots, same programmer’s computer, a variety of VEXnet keys, and a variety of download methods (programming wire and USB both). We’re a rookie team to VEX so any help at all would be appreciated!
The issue with our microcontroller is that at competition, our program works fine for maybe the first two matches, but by the third or fourth match, the conveyor or shooter in autonomous would stop working, and the next match, most if not all of our motors stop working maybe 10-20 seconds into driver control.
The first time this happened we figured out it was the cortex, so I tried redownloading the master CPU firmware manually but the download would get interrupted and I would get an error msg (see attached).
I tried switching USB cables, vexNET keys, power cycling the cortex, changing the USB ports on my computer, restarting robotc, and restarting my computer, but it didn’t work and we had to switch out the cortex, and by then it was too late for our alliance match ( sorry, 2616D and F!).
At the time we wrote it off as the cortex’s fault until our second competition, where the exact same situation happened. The conveyor ( mtr in port 10) lost function first in autonomous, then the following match it did not work at all. Then, our shooter stopped working. Again, when I tried redownloading the firmware, I got the error message. We had to borrow a microcontroller from Robot Revolution (thanks!) and were forced to miss a match with team 7405M ( sorry, guys!) as we switched out the microcontroller and redownloaded the firmware and everything. Even after we switched out the microcontroller, our integrated motor encoders still were not working (they returned values of zero) so our motor velocity control program was basically useless and we could no longer shoot accurately.
We thought this issue only happened at competition because in the weeks of testing at home we never came across this problem, and when we got back I first tried to download a program to the corrupted microcontroller to see if it was just competition control or something that was messing up the cortex. When that didn’t work (the error message popped up immediately), I took our sister team’s cortex (which I assumed worked), but then I corrupted that too. I fiddled with the config button and USB cables to get the connection linked again, but in the end, I worked it out by switching the port on my computer, reconfiguring both cortexes, and redownloading the firmwares to each cortex.
The thing is, I distinctly remember testing all of my computer’s USB ports at competition, and that didn’t work then. My computer is really the only constant in all of this (it’s the only computer we program on and download programs from), but I didn’t know it was possible for a USB port to corrupt a microcontroller. I mean we might have kept the same encoders between competitions, but that shouldn’t affect the conveyor. And no other teams seemed to be experiencing issues with ESD, so pretty sure it’s not static either. I really don’t know what it could be. I attached both programs’ pragma config. and also my computer specs, if that helps any. Hope someone can help us out!
1st program pragma config:
#pragma config(Motor, port2, leftFront, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, rightFront, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, leftBack, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, rightBack, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, wheelLeft, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port7, wheelRight, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, conveyorTop, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, conveyorBottom, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port1, wheelRightHelp, tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#pragma platform(VEX)
//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)
#include "Vex_Competition_Includes.c" //Main competition background code...do not modify!
2nd progra pragma config:
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, I2C_1, imeWheelR, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Sensor, I2C_2, imeWheelL, sensorQuadEncoderOnI2CPort, , AutoAssign )
#pragma config(Motor, port10, mtrConveyor, tmotorVex393_HBridge, openLoop, reversed)
#pragma config(Motor, port2, leftFront, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, rightFront, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, leftBack, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, rightBack, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, leftTop, tmotorVex393_MC29, openLoop, reversed, encoderPort, I2C_2)
#pragma config(Motor, port7, leftBottom, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port8, rightTop, tmotorVex393_MC29, openLoop, encoderPort, I2C_1)
#pragma config(Motor, port9, rightBottom, tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#pragma platform(VEX)
//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)
#include "Vex_Competition_Includes.c" //Main competition background code...do not modify!