ROBOTC.net forums
http://www.robotc.net/forums/

Ghost programs?
http://www.robotc.net/forums/viewtopic.php?f=11&t=13320
Page 1 of 1

Author:  ken.hubbard [ Wed Feb 03, 2016 12:59 pm ]
Post subject:  Ghost programs?

Some of my robots have issues. When the students download their program to the cortex and then unplug the orange cable they turn the cortex off and put the robot on the ground and turn the cortex back on to run the program. The robot "sputters" as if it is running the beginning of an old program then continues on with the newest program downloaded. Some of the robots will also "sputter" after about 3 seconds and pauses, starts, pauses and starts moving again as if there is a ghost program still in the memory.

How do I completely wipe the memory of old downloaded programs? Assuming that is the issue.

Author:  Tabor473 [ Wed Feb 03, 2016 5:45 pm ]
Post subject:  Re: Ghost programs?

It is very unlikely that is the issue. The sputtering sounds like you are setting the motors multiple times in a loop without any delay. If you post your code inside the code tags I would be happy to take a look.

Author:  ken.hubbard [ Wed Feb 03, 2016 9:25 pm ]
Post subject:  Re: Ghost programs?

//Move car forward 3 seconds at full speed
startMotor(RightFront,127);
startMotor(LeftFront,127);
startMotor(RightBack,127);
startMotor(LeftBack,127);
wait(3);
stopMotor(RightFront);
stopMotor(LeftFront);
stopMotor(RightBack);
stopMotor(LeftBack);

//Move car backwards 6 seconds 1/2 speed
startMotor(RightFront,-63.5);
startMotor(LeftFront,-63.5);
startMotor(RightBack,-63.5);
startMotor(LeftBack,-63.5);
wait(6);
stopMotor(RightFront);
stopMotor(LeftFront);
stopMotor(RightBack);
stopMotor(LeftBack);

Author:  ken.hubbard [ Tue Feb 09, 2016 3:21 pm ]
Post subject:  Re: Ghost programs?

I am not sure where the Code Tags are to post them into. I did post what the basic programming is (Previous post). Hope this helps.

Author:  CARBOT [ Tue Feb 09, 2016 11:11 pm ]
Post subject:  Re: Ghost programs?

Your code is missing the pragma and task main lines similar to the following.

Code:
#pragma config(Motor,  port2,           RightFront,    tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           LeftFront,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port8,           RightBack,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port9,           LeftBack,      tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
//Move car forward 3 seconds at full speed
startMotor(RightFront,127);
startMotor(LeftFront,127);
startMotor(RightBack,127);
startMotor(LeftBack,127);
wait(3);
stopMotor(RightFront);
stopMotor(LeftFront);
stopMotor(RightBack);
stopMotor(LeftBack);

//Move car backwards 6 seconds 1/2 speed
startMotor(RightFront,-63.5);
startMotor(LeftFront,-63.5);
startMotor(RightBack,-63.5);
startMotor(LeftBack,-63.5);
wait(6);
stopMotor(RightFront);
stopMotor(LeftFront);
stopMotor(RightBack);
stopMotor(LeftBack);
}

Author:  ken.hubbard [ Wed Feb 10, 2016 3:24 pm ]
Post subject:  Re: Ghost programs?

I did actually have it in, I just didn't type it in. Still any idea on why it is not working correctly?

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/