View unanswered posts | View active topics It is currently Thu Jul 10, 2014 4:08 pm






Reply to topic  [ 4 posts ] 
Error after long non-stop use 
Author Message
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Post Error after long non-stop use
Hi,

whenever I have my NXT running the same program for a long time (more than 6 hours, probably) I get some strange error message and the program is stopped. Is there any way to turn this off? Or is there any way to restart a program, or even reboot the entire NXT and then have it start the program again (programmatically)?

The NXT is on a rechargeable battery, which is constantly plugged in.

Thx,

_________________
leonoverweel.com


Sat Jan 07, 2012 1:01 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3155
Location: Rotterdam, The Netherlands
Post Re: Error after long non-stop use
Maybe you have some kind of bug in your program that causes this issue. It's hard to tell without the code, though.
Mentioning the error in question would also help.

More info == better help.

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Jan 07, 2012 1:21 am
Profile WWW
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Post Re: Error after long non-stop use
Oh yeah I'm sorry. The thing is I clicked the error away :/ I'll let the program run again tonight and tell you if the problem shows up again. And yes I think it might be the code, because there's another robot that's set up in a similar way, and is behaving fine (it doesn't have any motors attached to it, though, if that makes a difference. It also has the newer rechargeable battery). So here's the code (this is for my Skype robot):
Code:
#pragma config(Sensor, S1,     signalLight,         sensorCOLORFULL)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

void motorPID(bool motorPID){
  if(motorPID){
    nMotorPIDSpeedCtrl[motorB] = mtrSpeedReg;
    nMotorPIDSpeedCtrl[motorC] = mtrSpeedReg;
  }
  else{
    nMotorPIDSpeedCtrl[motorB] = mtrNoReg;
    nMotorPIDSpeedCtrl[motorC] = mtrNoReg;
  }
}

task main(){
  ubyte messageReceived[1];
  int lastMessageReceived;
  setBluetoothOn();
  ClearTimer(T1);
  nxtDisplayCenteredTextLine(2, "Just received:");
  while(true){
    lastMessageReceived = messageReceived[0];
    cCmdMessageRead(messageReceived,1,1);
    if(messageReceived[0] != lastMessageReceived){
      ClearTimer(T1);
    }
    if(time100(T1) <= 600){
      SensorType[signalLight] = sensorCOLORRED;
    }
    else{
      SensorType[signalLight] = sensorCOLORNONE;
    }
    switch(messageReceived[0]){
      case 0:
        nxtDisplayCenteredTextLine(4, "NOTHING");
        motor[motorB] = 0;
        motor[motorC] = 0;
        motorPID(false);
      break;
      case 1:
        motorPID(true);
        nxtDisplayCenteredTextLine(4, "FORWARD");
        motor[motorB] = 20;
        motor[motorC] = 20;
      break;
      case 2:
        motorPID(true);
        nxtDisplayCenteredTextLine(4, "RIGHT");
        motor[motorB] = 15;
        motor[motorC] = -15;
      break;
      case 3:
        motorPID(true);
        nxtDisplayCenteredTextLine(4, "LEFT");
        motor[motorB] = -15;
        motor[motorC] = 15;
      break;
      case 4:
        nxtDisplayCenteredTextLine(4, "STOP");
        motor[motorB] = 0;
        motor[motorC] = 0;
        motorPID(false);
      break;
    }
    wait10Msec(5);
    alive();
  }
}
Thanks

_________________
leonoverweel.com


Sat Jan 07, 2012 1:32 am
Profile WWW
Expert

Joined: Wed Jun 30, 2010 7:15 am
Posts: 181
Post Re: Error after long non-stop use
This is the error code (I'm not sure if it's even an error, but it definitely aborts my program):
Code:
PgmCnt: 000184
Type: 2

_________________
leonoverweel.com


Sat Jan 07, 2012 10:54 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

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.