View unanswered posts | View active topics It is currently Sun Aug 28, 2016 8:09 am






Reply to topic  [ 6 posts ] 
Ghost programs? 
Author Message
Rookie

Joined: Tue Feb 02, 2016 3:54 pm
Posts: 12
Post 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.


Wed Feb 03, 2016 12:59 pm
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post 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.


Wed Feb 03, 2016 5:45 pm
Profile
Rookie

Joined: Tue Feb 02, 2016 3:54 pm
Posts: 12
Post 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);


Wed Feb 03, 2016 9:25 pm
Profile
Rookie

Joined: Tue Feb 02, 2016 3:54 pm
Posts: 12
Post 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.


Tue Feb 09, 2016 3:21 pm
Profile
Expert

Joined: Thu Dec 01, 2011 12:07 am
Posts: 139
Post 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);
}


Tue Feb 09, 2016 11:11 pm
Profile
Rookie

Joined: Tue Feb 02, 2016 3:54 pm
Posts: 12
Post 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?


Wed Feb 10, 2016 3:24 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron



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