View unanswered posts | View active topics It is currently Sat Aug 02, 2014 4:47 am






Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Updated to RobotC v 3.06, doesn't work anymore 
Author Message
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Updated to RobotC v 3.06, doesn't work anymore
I downloaded and installed RobotC v3.06, but now I'm having an issue with my robot. The motors don't move at all, even during autonomous and they're entirely loose. (meaning I can move them by hand) However, I've got a gyro outputting to a LCD during driver control, and it updates just like normal. I have updated firmware on both the joystick and Cortex. Here are the lights on the robot and joystick:
Robot:
ROBOT: Slow red blink
VEXNET: Fast green blink
GAME: Not lit

Joystick:
JOYSTICK: Fast green blink
ROBOT: Solid green
VEXNET: Fast green blink

I think it might be a problem with my config. Here's my config:
Code:
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, in1,    ,               sensorGyro)
#pragma config(Sensor, dgtl1,  ,               sensorRotation)
#pragma config(Sensor, dgtl2,  ,               sensorRotation)
#pragma config(Sensor, I2C_1,  ,               sensorQuadEncoderOnI2CPort,    , AutoAssign)
#pragma config(Sensor, I2C_2,  ,               sensorQuadEncoderOnI2CPort,    , AutoAssign)
#pragma config(Sensor, I2C_3,  ,               sensorQuadEncoderOnI2CPort,    , AutoAssign)
#pragma config(Sensor, I2C_4,  ,               sensorQuadEncoderOnI2CPort,    , AutoAssign)
#pragma config(Motor,  port1,           ,              tmotorVex269, openLoop, encoder, encoderPort, I2C_1, 1000)
#pragma config(Motor,  port2,           ,              tmotorVex269, openLoop)
#pragma config(Motor,  port3,           LeftFront,     tmotorVex393HighSpeed, openLoop)
#pragma config(Motor,  port4,           RightFront,    tmotorVex393HighSpeed, openLoop)
#pragma config(Motor,  port5,           ,              tmotorVex269, openLoop)
#pragma config(Motor,  port6,           ,              tmotorVex269, openLoop)
#pragma config(Motor,  port7,           LeftBack,      tmotorVex393HighSpeed, openLoop, encoder, encoderPort, I2C_2, 1000)
#pragma config(Motor,  port8,           RightBack,     tmotorVex393HighSpeed, openLoop, encoder, encoderPort, I2C_3, 1000)
#pragma config(Motor,  port9,           ,              tmotorVex269, openLoop)
#pragma config(Motor,  port10,          ,              tmotorVex269, openLoop, encoder, encoderPort, I2C_4, 1000)

Can anybody figure out what's going on? Nobody else seems to have had this problem.


Sun Feb 12, 2012 3:56 pm
Profile
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Re: Updated to RobotC v 3.06, doesn't work anymore
It's available at the top of this page: http://www.robotc.net/blog/2012/02/08/p ... -encoders/


Sun Feb 12, 2012 4:27 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Updated to RobotC v 3.06, doesn't work anymore
wrathofmobius -

Can you share your entire program? I compiled, downloaded, and ran a blank program with your configuration above, but did not experience your results. I also downloaded and ran another basic program that just turned on a few motors and it also worked. I do not get the slow blinking red light:

Image

Your Motors and Sensors Setup appears to be valid, but I'm having a hard time visualizing your physical robot.
Image

Can you tell me how the motors/encoders on ports 1 and 10 are used? Do you really have every motor slot filled? (Trying to recreate your motor setup as much as possible).

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Feb 13, 2012 10:28 am
Profile
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Re: Updated to RobotC v 3.06, doesn't work anymore
Yeah, we have all 10 ports used up because this is a robot for VRC Gateway. The encoders in ports 1 and 10 are for a sliding lifter system, one on each side. I don't know if it'll make a difference, but we have one of the original Cortexes.
Here's the rest of our code:
Code:
#pragma platform(VEX)
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)
#include "Vex_Competition_Includes.c"

//Variable definitions
int gyroRawInput;
int leftSideMotorSpeed;
int rightSideMotorSpeed;
int gyroCurrentValue = 0;
int gyroPreviousValue = 0;
int gyroRunningTotal = 0;
int gyroSampleRate = 1000;
int gyroCalibrate = 0;
int currentMotorSpeedRight = 0;
int currentEncoderValueRight = 0;
int pastMotorSpeedRight = 0;
int pastEncoderValueRight = 0;
int currentMotorSpeedLeft = 0;
int currentEncoderValueLeft = 0;
int pastMotorSpeedLeft = 0;
int pastEncoderValueLeft = 0;
int tipGyroSpeed;
int programSelected = 0;
//Function definitions

task sampleMotorSpeeds()
{
  while(true)
  {
    currentEncoderValueLeft = SensorValue[dgtl1];
    currentEncoderValueRight = SensorValue[dgtl2];
    currentMotorSpeedRight = (currentEncoderValueRight - pastEncoderValueRight)/.1;
    currentMotorSpeedLeft = (currentEncoderValueLeft - pastEncoderValueLeft)/.1;
    pastEncoderValueRight = currentEncoderValueRight;
    pastEncoderValueLeft = currentEncoderValueLeft;
    wait1Msec(100);
  }
}

task sampleTipGyro()
{
  int currentTipGyroPos;
  int pastTipGyroPos;
  while(true)
  {
    currentTipGyroPos = SensorValue[in2];
    tipGyroSpeed = (currentTipGyroPos - pastTipGyroPos)/.001;
    wait1Msec(1);
    pastTipGyroPos = currentTipGyroPos;
  }
}

//snipped functions

void pre_auton()
{
  clearLCDLine(0);
  clearLCDLine(1);
  displayLCDCenteredString(0, "Select A Program:");
  bLCDBacklight = true;
  ClearTimer(T1);
  while(time100[T1] < 300)
  {
    if(nLCDButtons == 1 && programSelected != 0)
    {
      programSelected--;
    }
    else if(nLCDButtons == 4 && programSelected != 4)
    {
      programSelected++;
    }
    switch(programSelected)
    {
    case 0:
      clearLCDLine(1);
      displayLCDCenteredString(1, "Red Inter 3");
      break;
    case 1:
      clearLCDLine(1);
      displayLCDCenteredString(1, "Blue Inter 3");
      break;
    default:
      clearLCDLine(1);
      displayLCDCenteredString(1, "Unknown");
      break;
    }
    wait10Msec(50);
  }
}

task autonomous()
{
  StartTask(sampleMotorSpeeds);
  if(programSelected == 0)
  {
    MoveForward(275, 67);
    wait10Msec(100);
    TurnLeft(750, 67);
    wait10Msec(100);
    MoveBackward(250, 67);
    motor[port5] = 127;
    motor[port6] = -127;
  }
  else if(programSelected == 1)
  {
    MoveForward(275, 67);
    wait10Msec(100);
    TurnRight(750, 67);
    wait10Msec(100);
    MoveBackward(250, 67);
    motor[port5] = 127;
    motor[port6] = -127;
  }
}

task usercontrol()
{
  StartTask(sampleMotorSpeeds);
  StartTask(sampleTipGyro);
  while (true)
  {
    motor[port1] = vexRT[Ch3Xmtr2];
    motor[port2] = vexRT[Ch3Xmtr2];
      motor[LeftFront] = vexRT[Ch3];
      motor[RightFront] = -vexRT[Ch2];
      motor[LeftBack] = vexRT[Ch3];
      motor[RightBack] = -vexRT[Ch2];
    motor[port9] = -vexRT[Ch3Xmtr2];
    motor[port10] = -vexRT[Ch3Xmtr2];
    if(vexRT[Btn6UXmtr2] == 1)
    {
      motor[port5] = 127;
      motor[port6] = -127;
    }
    else if(vexRT[Btn6DXmtr2] == 1)
    {
      motor[port5] = -127;
      motor[port6] = 127;
    }
    else
    {
      motor[port5] = 0;
      motor[port6] = 0;
    }
    clearLCDLine(0);
    //displayNextLCDNumber(nMotorEncoder[LeftBack],1);
  }
}
//End program



I know that there's a while loop that terminates after 30 seconds. After the 30 seconds is over, it still doesn't work. Also, we've been having this problem since before that was added.

I snipped a few functions, MoveForward, MoveBackward, TurnLeft, and TurnRight because I don't want to post them on the Internet. If the rest of the code isn't helpful, I'd rather email our code directly to you instead of posting it on the forum.

BTW, I'm getting the same slow red blink on the robot light even after downgrading to v.3.05 and upgrading back to v.3.06. I didn't have the same red blinking light with v.3.05.

Thank you very much for helping us with this.


EDIT: This seems to be a firmware problem because I downgraded to v.3.05 but the same problem and light pattern is there. I would manually download the latest firmware, but the IFI Firmware Update doesn't seem to work for me. It won't start at all.


Mon Feb 13, 2012 7:56 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Updated to RobotC v 3.06, doesn't work anymore
Thanks for posting your code. I ran it using empty versions of the functions you took out, and haven't been able to duplicate the problem yet.

ROBOTC 3.04 uses Master Firmware 3.16. ROBOTC 3.05 and 3.06 both use Master Firmware 3.20. I'm looking to see if that might be the root of the problem...

I am curious about the bootloader version of your Cortex. If you can, please follow these steps:
- Go to Window > Menu Level > and select "Super User"
- Go to View > Preferences > Detailed Preferences...
- On the Internal tab, select "Messages" under Message Tracing
- With the Cortex connected to the computer (preferably over VEXnet), go to Robot > Advanced Tools > Software Inspection
- Copy and Paste the data that ROBOTC Spits out in the Message Log, as follows:

Quote:
133.773 Send cmd: 'VEX Net Serial Get Config' command (C9 36 B8 47 30)
133.804 VEXnet Serial 'Get Config' Results
F/W Version: 3.20
Bootload Version: 6
Board Type: VEXNET Joystick
Mode: Normal


133.808 Send cmd: 'VEX Net Serial Query 1' command (C9 36 B8 47 21)
133.831 VEXnet Serial 'Query 1' Results
Link Type: Wi-Fi Link
Master CPU F/W: 3.20
VEXNET Joystick F/W: 3.20
Competition Status: Standalone
VEXNET Joystick Battery: 4.5V
Controller Battery:
Controller Backup Battery:


133.837 Send cmd: 'VEX Net Serial Query 2' command (C9 36 B8 47 22)
133.863 VEXnet Serial 'Query 2' Results
Joystick LED: JSTAT_POWERUP
Robot LED: LSTAT_TX1_ONLY
VEXNET LED: LSTAT_LINKED
Game LED: LSTAT_OFF
Joystick Calibrated: YES


133.868 Send cmd: 'VEX Net Serial Query 3' command (C9 36 B8 47 20)
133.895 VEXnet Serial 'Query 3' Results
Team Name:

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Feb 14, 2012 11:14 am
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Updated to RobotC v 3.06, doesn't work anymore
It's looking more and more like this issue may require an update to the Master CPU firmware from VEX. I'll keep you posted as we figure out more details.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Feb 14, 2012 4:18 pm
Profile
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Re: Updated to RobotC v 3.06, doesn't work anymore
Code:
429.225 Open HID port '0000029C' '\\?\hid#vid_046d&pid_c52f&mi_00#7&28ec2721&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}' for Query,

429.244 Close HID port '0000029C' (Query, ) '\\?\hid#vid_046d&pid_c52f&mi_00#7&28ec2721&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'

429.244 Open HID port '0000029C' '\\?\hid#vid_046d&pid_c52f&mi_01&col01#7&514e95f&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}' for Query,

429.264 Close HID port '0000029C' (Query, ) '\\?\hid#vid_046d&pid_c52f&mi_01&col01#7&514e95f&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'

429.264 Open HID port '0000029C' '\\?\hid#vid_046d&pid_c52f&mi_01&col02#7&514e95f&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}' for Query,

429.284 Close HID port '0000029C' (Query, ) '\\?\hid#vid_046d&pid_c52f&mi_01&col02#7&514e95f&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}'

429.285 Open HID port '0000029C' '\\?\hid#vid_046d&pid_c52f&mi_01&col03#7&514e95f&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}' for Query,

429.304 Close HID port '0000029C' (Query, ) '\\?\hid#vid_046d&pid_c52f&mi_01&col03#7&514e95f&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}'
429.825 Opened COM port 'COM5'
429.910 Setup serial comm link for 'Open File' at 115.2K baud, parity 'None' completed.

429.919 Send cmd:  'VEX Net Serial Get Config' command (C9 36 B8 47 30)
429.946 VEXnet Serial 'Get Config' Results
                   F/W Version: 3.20
              Bootload Version: 5
                    Board Type: VEXNET Joystick
                          Mode: Normal


429.958 Send cmd:  'VEX Net Serial Query 1' command (C9 36 B8 47 21)
429.973 VEXnet Serial 'Query 1' Results
                        Link Type: Wi-Fi Link
                   Master CPU F/W: 3.20
              VEXNET Joystick F/W: 3.20
               Competition Status: Standalone
          VEXNET Joystick Battery: 6.6V
               Controller Battery:
        Controller Backup Battery:


429.979 Send cmd:  'VEX Net Serial Query 2' command (C9 36 B8 47 22)
430.005 VEXnet Serial 'Query 2' Results
           Joystick LED: JSTAT_POWERUP
              Robot LED: LSTAT_TX1_ONLY
             VEXNET LED: LSTAT_LINKED
               Game LED: LSTAT_OFF
    Joystick Calibrated: NO


430.009 Send cmd:  'VEX Net Serial Query 3' command (C9 36 B8 47 20)
430.037 VEXnet Serial 'Query 3' Results
           Team Name:


430.043 Send  Message **<SystemFunction>**; Function: <sysFuncBulkSysParmsRead [0x47]>; length 18; 67  ...
            47 05 11 00 25 11 00 34 11 00 00 11 00 33 11 00 29
430.222 Reply message **<Reply to 'SystemFunction'::sysFuncBulkSysParmsRead>**
            averageBatteryLevel =  0.00 V.
            BackupBatteryLevel =  0.00 V.
            firmwareVersion = 9.10/0x38E.
            nVEXMasterVersion = 0.00.
            nCurrCortexCommType = pgmTypeCompetition/0x3. ; length 22: 67(98)  ...
            05 00 00 00 00 00 00 00 00 8E 03 00 00 00 00 00 00 03 00 00 00
430.624 Closing communications link 'COM5'
430.630 Destroying window


It looks like we're running bootloader version 5. Is this a problem?

We called IFI as wall, and they said that they didn't have anything to say about this.

We're really starting to panic because we have a competition on Saturday and we don't have any autonomous programmed.

Thank you very much for your help.


Tue Feb 14, 2012 7:05 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Updated to RobotC v 3.06, doesn't work anymore
Boot loader 5 should be fine.

At this point, I recommend downgrading to ROBOTC 3.04 for your competition. It uses Master Firmware 3.16 which doesn't seem to have this problem.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Tue Feb 14, 2012 7:16 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Updated to RobotC v 3.06, doesn't work anymore
I did most of the ROBOTC 3.06 development. I'm working with Innovation First on resolving this issue. What I've found so far:

I consistently get the failure of Robot LED flashing RED when I use 3.06. This error message indicates that the Master CPU and Slave CPU have failed to establish the internal SPI communications link that they use to transfer joystick and motor speed control with each other. I only get the error via Wi-Fi and not with tethered link. When this link is not operational, the Master CPU disable all motor operations.

When I load master and joystick firmware 3.16 but continue to run ROBOTC 3.06 Cortex firmware (i.e. version 9.10) the problem disappears. Unfortunately this option is unavailable to non-developers because 3.06 integrity check will not allow you to operate if Master and Joystick firmware are not 3.20; I was able to override this using my PC based development tools to create a modified version of 3.06.

Installing 3.20 firmware and problem re-appears. Going to back to 3.16 and its gone.

I'm working with IFI's firmware development on quickly resolving this issue. I'll post again when I have more news.


Tue Feb 14, 2012 7:36 pm
Profile
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Re: Updated to RobotC v 3.06, doesn't work anymore
OK. Would upgrading to a newer (or different) Cortex resolve the issue? This might also be a lot to ask, but would it be possible for us to use the modified version of RobotC?


Tue Feb 14, 2012 8:19 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Updated to RobotC v 3.06, doesn't work anymore
wrathofmobius wrote:
OK. Would upgrading to a newer (or different) Cortex resolve the issue? This might also be a lot to ask, but would it be possible for us to use the modified version of RobotC?

A different Cortex is unlikely to resolve the issue.

I'll work with Jesse on getting a generally available resolution/update available this week.


Wed Feb 15, 2012 1:03 am
Profile
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Re: Updated to RobotC v 3.06, doesn't work anymore
OK. Is there a way to communicate directly with the I2C port so that we can at least use the integrated encoders for Saturday or is version 3.06 required?


Wed Feb 15, 2012 1:27 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: Updated to RobotC v 3.06, doesn't work anymore
wrathofmobius wrote:
OK. Is there a way to communicate directly with the I2C port so that we can at least use the integrated encoders for Saturday or is version 3.06 required?

Simple answer. No. User control of the I2C bus is not supported at present. It is being considered for inclusion in release this summer.

User control of the I2C bus for the encoders is a big task. It's not something that I would recommend for the average (or even highly skilled) user. You don't just simply start sending I2C messages to the encoders. They have to be properly initialized first. Which is made complex because on power up they all have the same address. So you have to enumerate the daisy chained encoders on the bus, individually isolate them from other devices on the bus and re-assign them a unique address. But before that you have to perform a lot of tricks to get the bus into a known state in case it is corruped which will happen whenver Cortex is reset (or user program is downloaded) while in the middle of polling I2C devices. The state machine to do the initialization is about 35 steps


Sat Feb 18, 2012 11:08 am
Profile
Rookie

Joined: Mon Jan 03, 2011 5:40 pm
Posts: 12
Post Re: Updated to RobotC v 3.06, doesn't work anymore
Sounds like fun. :lol:
We mounted the old encoders and they worked very well for event. Once you have a new version of the firmware, we'd be happy to test it.


Sun Feb 19, 2012 12:40 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Updated to RobotC v 3.06, doesn't work anymore
Hi Everyone,

Sorry for the long delay inbetween posts. We wanted to be positive about the root of the problem before we started sharing information.

As it turns out, it takes a combination of old Cortex hardware and Master Firmware 3.20 for the problem to show up. If you look at the bottom of your VEX Cortex and see either "Rev NC" or "Rev NC1", this indicates that your Cortex is out-of-date. VEX will update it for free; contact them at support@vexrobotics.com or 903.453.0802

We'll also be releasing an updated version of ROBOTC with a new Master CPU Firmware and some of our own enhancements. We want to run the full gauntlet of testing before we push out another version, but I expect that we'll have something this week or early next week.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Mon Feb 20, 2012 5:48 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.