Answered: Was it just the vex arena

We recently went to a vex competition in Syracuse, Utah during the tournament are robot kept shorting out in the middle of all our matches. At first we thought it was our vex net keys than we swapped them out and used another teams vex net keys the same problem happened then we swapped our controllers the problem still occurred one of the tournament directors told us that it was our motors kept shutting off because they were working to hard to move our robot which our robot was the lightest one at the competition and also after the tournament we went on the course without plugging the controllers into the arena and drove it around for 30 minutes then we drove it on carpet which was pulling one of my teammates who was on a chair with wheels on it who probably weighed about 145 pounds and yet we still couldn’t get it to repeat itself. It seemed like every time we plugged the competition cord into the controller we would loose connection in the middle of the match i have attached our code we used robot C for our program and yes we have an autonomous program also this problem was not occurring when we were at the Hailey, Idaho Vex robotics tournament i was just wondering could it be that the arena had a bug when they were downloading the software for the competition.

#pragma config(Sensor, in1, armPot, sensorPotentiometer)
#pragma config(Sensor, in2, LCD, sensorReflection)
#pragma config(Sensor, dgtl1, btn1, sensorTouch)
#pragma config(Sensor, dgtl2, btn2, sensorTouch)
#pragma config(Sensor, dgtl3, btn3, sensorTouch)
#pragma config(Sensor, dgtl4, btn4, sensorTouch)
#pragma config(Sensor, dgtl5, btn5, sensorTouch)
#pragma config(Sensor, dgtl6, rightEncoder, sensorQuadEncoder)
#pragma config(Sensor, dgtl8, leftEncoder, sensorQuadEncoder)
#pragma config(Motor, port2, rightMotor, tmotorNormal, openLoop)
#pragma config(Motor, port4, rightTilt, tmotorNormal, openLoop)
#pragma config(Motor, port5, leftTilt, tmotorNormal, openLoop)
#pragma config(Motor, port6, tread, tmotorNormal, openLoop)
#pragma config(Motor, port7, leftMotor, tmotorNormal, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

// *!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//


#pragma autonomousDuration(20)
#pragma userControlDuration(200)


#include "Vex_Competition_Includes.c"  //Main competition background code...do not modify!



////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Pre-Autonomous Functions

// You may want to perfrom some actions before the copetition starts. Do them in the following function.





//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////





void pre_auton()
{
  SensorValue[rightEncoder] = 0;
  SensorValue[leftEncoder] = 0;


}



/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Autonomous Task

// This task is used to control your robot during the autonomous phase of a VEX competition.
// You must modify the code to add your own roboto specific commands here.





////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool tiltDone;
bool forwardDone;
  bool reverseDone;


  void clearBools()
{
   tiltDone=false;
 forwardDone=false;
   reverseDone=false;
}

 void armUp(int angle)
{
   if(SensorValue[armPot] < angle)
   {
     motor[rightTilt] = 100;
     motor[leftTilt] = 100;
   }
   else
   {
	   motor[rightTilt] = 0;
	   motor[leftTilt] = 0;

	   tiltDone= true;
   }

	}



void moveForward(int Distance, int speed)
{

  if(SensorValue[rightEncoder] < Distance )
  {
    motor[rightMotor] = speed;
    motor[leftMotor] = speed;
  }
  else
  {
    motor[rightMotor] = 0;
    motor[leftMotor] = 0;
    forwardDone = true;
  }


}



void moveRevers(int Distance, int speed)
{

  if(SensorValue[rightEncoder] > 0 )
  {
    motor[rightMotor] = -speed;
    motor[leftMotor] = -speed;
  }
  else
  {
    motor[rightMotor] = 0;
    motor[leftMotor] = 0;
    reverseDone = true;
  }

}





		    void score(int forwardDistance, int angle, int scoreingTime, int reversDistance, int speed)
		    {

		       SensorValue[rightEncoder] = 0;
		       wait10Msec(10);
		       //*********************************
		       // Move In to Place
		       //*********************************
		       ClearTimer(T1);
		       while(!forwardDone  || !tiltDone)
		       {


		           armUp(angle);
		         moveForward(forwardDistance,speed);
		         if(time1[T1] > 5000)
		         {
		           forwardDone = true;
		           tiltDone = true;
		           motor[leftMotor] = 0;
		           motor[rightMotor] = 0;


		         }

		        }

		        //*********************************
		        // DUMP
		        //*********************************

		        clearBools();
		        int i=0;
		        while(i < scoreingTime)
			       {
			         armUp(angle);
			         motor[tread] = -127;
			         wait1Msec(1);
			         i++;
			        }
		        motor[tread] = 0;

		        //*********************************
		        // Go Back HOME
		        //*********************************
		        clearBools();
					 while(!reverseDone)
		       {
		         moveRevers(reversDistance,speed);//(distance, speed)
		        }


		      }


            void gather(int waitTime)
		    {


		      motor[tread] = 127;
		      motor[rightMotor] = 80;
		      motor[leftMotor] = 80;
		      wait1Msec(waitTime); //
		      motor[tread] = 0;
		      motor[rightMotor] = -80;
		      motor[leftMotor] = -81;
		      wait1Msec(waitTime);
		      motor[rightMotor] = 0;
		      motor[leftMotor] = 0;

		    }

task autonomous()
{

SensorValue[leftEncoder] = 0;
SensorValue[rightEncoder] = 0;

while(true)
{

if(SensorValue[btn1] ==1)
{
  // Gather Balls and come back home
  gather(2000);//(waitTime)
}


if(SensorValue[btn2]==1)
{
  // Scores in the 20" goal in the isolation zone and then returns back
  score(600,23,2500,700,100);   //    forwardDistance, angle, scoreingTime, reversDistance, speed)
}




if(SensorValue[btn3]==1)
{
  // Scores in the 11" goal in the isolation zone and then returns back
  score(600,15,2500,600,100);   //    forwardDistance, angle, scoreingTime, reversDistance, speed)
}



if(SensorValue[btn4]==1)
{
  // Scores in the 11" goal in the interaction zone and then returns back
  score(0,15,2000,0,100);   //    forwardDistance, angle, scoreingTime, reversDistance, speed)
}


if(SensorValue[btn5]==1)
{
  // Scores in the 30" goal in the interaction zone and then returns back
  score(1015,29,4000,700,100);   //    forwardDistance, angle, scoreingTime, reversDistance, speed)
}

}

}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// User Cntorl Task
// This task is used to contorl your robot during the user control phase of a VEXx Competition.
// You must modify the code to add your own robot specific commands here.



///////////////////////////////////////////////////////////////////////////////////////////////////////////////




task usercontrol()
{
  while(true)
				{

				  motor[tread] = 0;
				  
				  if (vexRT[Btn6U])
				  {
				    motor[tread] = 100;
				  }
				  if (vexRT[Btn6D])
				  {
				    motor[tread] = -100;
				  }
				  if (!vexRT[Btn6U] && !vexRT[Btn6D])
				  {
				    motor[tread] = 0;
				  }


				  if (vexRT[Btn5U])
				  {

				    motor[rightTilt] = 127;
				    motor[leftTilt] = 127;
				  }

				  if (vexRT[Btn5D])
				  {
				    motor[rightTilt] = -127;
				    motor[leftTilt] = -127;

				  }
				  if (!vexRT[Btn5U] && !vexRT[Btn5D])
				  {
				    motor[rightTilt] = 0;
				    motor[leftTilt] = 0;

				  }



          motor[rightMotor] = 0;
				    motor[rightMotor] = vexRT[Ch2];
				    motor[leftMotor] = 0;
				   motor[leftMotor] = vexRT[Ch3];
			  	  

				}




}

Personally I think that if the competition field was the problem, then more teams would had the same issue.

What was the status of the LEDs on your Joystick when the robot failed to respond?
Do you have a VEXnet Competition Switch?
If so, are you able to duplicate the issue with the switch?

Unfortunately I’m not very familiar with ROBOTC code.
For feedback on your program, please post your code here: https://vexforum.com/forumdisplay.php?f=286

-Eli

Thats the thing I forgot to mention all but 3 of the teams were having the exact same technical difficulties and all the teams that were having problems never had the problem at any of the other vex competition. So could it have been are code because we were the only ones running robotc or was it the arena.

No we dont have one i dont know if easyc has this but on robotc there is a switch within the software of the program. The box says competition switch
and there is a autonomous box and user control box and disable box within that box switch after we program the competition code to the robot.

The sequence goes all green one second and then all red we have to shut off our controller to get it to work agian.

And no we cant seem to be able to get the contoller to repeat the problem on our own no matter how hard we try.

Yes, there is a possibility that this was caused by the code.
Also keep in mind that all VEX Competition Fields must be tested before the event, in case there is something wrong with the field.

Both easyC and ROBOTC offer a competition switch simulator within their software.
Have you tried using the competition switch simulator for code troubleshooting?

-Eli

Yes we have used the competition switch simulator in the software. We are going to order vex competition switches they will be here in 2-3 weeks but the trouble is we have another competition in Hyrum, Utah on the Jan 14th so we need to be able to fix the problem so we can go and perform at the highest possible level at the competition with our robot do you think that it might be that we need a power expander?

A Power Expander will definitely increase the performance of your robot.
However, it will not fix the problem if its being caused by a code issue.

-Eli

We got our vex net switch today and we are now seeing if we can repeat the problem with our vex net competition switch.

Sounds good.
Pay special attention to the feedback LEDs on the Cortex and Joystick while troubleshooting your system.

Good luck.

-Eli

So we went to a competition in Hyrum, Utah and are robot had no trouble of dropping connection during the competition. I know it couldn’t have been the vex arena is there anything else that can stop are controller communicating with our robot beside power issues.

A weak VEXnet link, but this is not the case since you already tried a known good set of VEXnet Keys.
Also WiFi networks and “Blockers” will interfere with the VEXnet communication.

Maybe what you saw at the Syracuse Competition was just an isolated issue.
Specially since we are not able to duplicate the problem again.

-Eli