Allow me to walk you through our issue. Upon upgrading to 4.27, we started experiencing a flurry of issues. We burnt out a transistor on a cortex. We switched to another Cortex, and we found that ports 3-5 were not working. Another cortex was attempted, and we found the same issue. Eli from VEX suggested that we use a sample code that allowed use to use the ports, but when we modified the code for our needs, the ports no longer worked, again. Is there a solution to this issue?
Please post the code that you have modified by using the
tags. From what you are describing though, the problem may be caused with the physical design/setup of your robot (excessive friction causing a higher current draw, etc).
To clarify, does the sample code move the motors correctly, and which sample program is being used?
Thank you in advance!
Yes these ports work correctly with this sample code. The one we used is called ROBOTC VEX Cortex Default Code. We have a competition in two weeks and would very much like to solve this issue before hand in order to complete our robot, as this issue is preventing us from doing so. Also , we’ve submitted a ticket to ROBOTC that was sent on Monday and has since gone unanswered.
We will need to see the modified code (using the code tags) in order to assist with the debugging process. Please post the entirety of the modified code using the
tags and we will be more than happy to assist with the code debugging.
We currently don't see any tickets in our queue with an entry date of that long ago; please PM the email address that was used during the ticket creation and I will be more than happy to look into that further.
-
I’m not sure what you mean by “Burnt out a transistor on the Cortex” - was this a wiring issue? We’ve never heard anything about burning out transitiors simply by using ROBOTC or any programming software.
-
All motor control is done by the “Master” processor - ROBOTC and the Cortex’s User processor simply send messages over the communication link between the two processors to notify the Master processor of the value to set the motor speed at. If the ROBOTC firmware was doing something specifically to ports 3-5, it would be affecting all users, not just your Cortex.
-
The ROBOTC firmware hasn’t really changed from 4.26 to 4.27 other than including support for the new master/joystick firmware and VEXnet 2.0 Key firmware. If you think the issue is related to 4.27, you can continue to use 4.26 with manually installing the latest Master firmware (4.23) on your VEX Cortex system.
We’re happy to take a look at your code to see if there’s any potential programming issues that may be causing a conflict with Ports 3-5… but it sounds VERY strange for just a few motor ports to go “dead”. If you can, send your code to support[at]robotc[dot]net and we’ll take a look at it. As John said before, we do not have any messages in our ticketing system regarding this issue, so I’m not sure which e-mail address you sent your message to.
Thanks.
Alright, I’ll post my code here and there. It is strange that this occurring, thanks to both of you for you help. This’ll take up some space:
while (true)
{
//Program for Riverdale High School Robotics Team Robot 4099-C
//Mecanum Wheels Cake
motor[frontRightMotor] = vexRT[Ch3] - vexRT[Ch1] - vexRT[Ch4];
motor[backRightMotor] = vexRT[Ch3] - vexRT[Ch1] + vexRT[Ch4];
motor[frontLeftMotor] = vexRT[Ch3] + vexRT[Ch1] + vexRT[Ch4];
motor[backLeftMotor] = vexRT[Ch3] + vexRT[Ch1] - vexRT[Ch4];
//Left Top--------------------------------------
{
if(vexRT[Btn5D]==1)
{
motor[TopLeftLift] = 127;
}
else if(vexRT[Btn5U]==1)
{
motor[TopLeftLift] = -127;
}
else if(vexRT[Btn5D]==0)
{
motor[TopLeftLift] = 0;
}
else if (vexRT[Btn5U] ==0)
{
motor[TopLeftLift] = 0;
}
if(vexRT[Btn5D]==1)
{
motor[TopLeftLift] = 127;
}
else if(vexRT[Btn5U]==1)
{
motor[TopLeftLift] = -127;
}
else if(vexRT[Btn5D]==0)
{
motor[TopLeftLift] = 0;
}
else if (vexRT[Btn5U] ==0)
{
motor[TopLeftLift] = 0;
}
//Bottom Left---------------------------------------------
{
if(vexRT[Btn5D]==1)
{
motor[BottomLeftLift] = 127;
}
else if(vexRT[Btn5U]==1)
{
motor[BottomLeftLift] = -127;
}
else if(vexRT[Btn5D]==0)
{
motor[BottomLeftLift] = 0;
}
else if (vexRT[Btn5U] ==0)
{
motor[BottomLeftLift] = 0;
}
if(vexRT[Btn5D]==1)
{
motor[BottomLeftLift] = 127;
}
else if(vexRT[Btn5U]==1)
{
motor[BottomLeftLift] = -127;
}
else if(vexRT[Btn5D]==0)
{
motor[BottomLeftLift] = 0;
}
else if (vexRT[Btn5U] ==0)
{
motor[BottomLeftLift] = 0;
}
//Test Port------------------------------------------
if(vexRT[Btn7D]==1)
{
motor[TestMotor] = 127;
}
else if(vexRT[Btn7U]==1)
{
motor[TestMotor] = -127;
}
else if(vexRT[Btn7D]==0)
{
motor[TestMotor] = 0;
}
else if (vexRT[Btn7U] ==0)
{
motor[TestMotor] = 0;
}
if(vexRT[Btn7D]==1)
{
motor[TestMotor] = 127;
}
else if(vexRT[Btn7U]==1)
{
motor[TestMotor] = -127;
}
else if(vexRT[Btn7D]==0)
{
motor[TestMotor] = 0;
}
else if (vexRT[Btn7U] ==0)
{
motor[TestMotor] = 0;
//IntakeMotor----------------------------------------------
if(vexRT[Btn8D]==1)
{
motor[IntakeMotor] = 127;
}
else if(vexRT[Btn8U]==1)
{
motor[IntakeMotor] = -127;
}
else if(vexRT[Btn8D]==0)
{
motor[IntakeMotor] = 0;
}
else if (vexRT[Btn8U] ==0)
{
motor[IntakeMotor] = 0;
}
if(vexRT[Btn8D]==1)
{
motor[IntakeMotor] = 127;
}
else if(vexRT[Btn8U]==1)
{
motor[IntakeMotor] = -127;
}
else if(vexRT[Btn8D]==0)
{
motor[IntakeMotor] = 0;
}
else if (vexRT[Btn8U] ==0)
{
motor[IntakeMotor] = 0;
//Right Top------------------------------------------------
if(vexRT[Btn6D]==1)
{
motor[TopRightLift] = 127;
}
else if(vexRT[Btn6U]==1)
{
motor[TopRightLift] = -127;
}
else if(vexRT[Btn6D]==0)
{
motor[TopRightLift] = 0;
}
else if (vexRT[Btn6U] ==0)
{
motor[TopRightLift] = 0;
}
if(vexRT[Btn6D]==1)
{
motor[TopRightLift] = 127;
}
else if(vexRT[Btn6U]==1)
{
motor[TopRightLift] = -127;
}
else if(vexRT[Btn6D]==0)
{
motor[TopRightLift] = 0;
}
else if (vexRT[Btn6U] ==0)
{
motor[TopRightLift] = 0;
}
//Right Left--------------------------------------------
if(vexRT[Btn6D]==1)
{
motor[BottomRightLift] = 127;
}
else if(vexRT[Btn6U]==1)
{
motor[BottomRightLift] = -127;
}
else if(vexRT[Btn6D]==0)
{
motor[BottomRightLift] = 0;
}
else if (vexRT[Btn6U] ==0)
{
motor[BottomRightLift] = 0;
}
if(vexRT[Btn6D]==1)
{
motor[BottomRightLift] = 127;
}
else if(vexRT[Btn6U]==1)
{
motor[BottomRightLift] = -127;
}
else if(vexRT[Btn6D]==0)
{
motor[BottomRightLift] = 0;
}
else if (vexRT[Btn6U] ==0)
{
motor[BottomRightLift] = 0;
}
}
}
}
}
}
And here’s our port layout
#pragma config(Motor, port1, frontLeftMotor, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, TestMotor, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port3, IntakeMotor, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port4, TopRightLift, tmotorServoContinuousRotation, openLoop, driveRight)
#pragma config(Motor, port5, BottomRightLift, tmotorServoContinuousRotation, openLoop, reversed, driveRight)
#pragma config(Motor, port6, TopLeftLift, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port7, BottomLeftLift, tmotorServoContinuousRotation, openLoop, reversed, driveLeft)
#pragma config(Motor, port8, frontRightMotor, tmotorServoContinuousRotation, openLoop, driveRight)
#pragma config(Motor, port9, backRightMotor, tmotorServoContinuousRotation, openLoop, driveRight)
#pragma config(Motor, port10, backLeftMotor, tmotorVex393_HBridge, openLoop, reversed)
A bit of a mess, but I’ve never come across an issue of this nature.
Just a followup, we finally got around to fixing our issue, and the repeated “cakes” of code were the culprit. Thank you for your help.