View unanswered posts | View active topics It is currently Sun Aug 18, 2019 2:00 pm






Reply to topic  [ 7 posts ] 
Autonomous program not running correctly 
Author Message
Rookie

Joined: Mon Nov 09, 2015 7:23 pm
Posts: 4
Post Autonomous program not running correctly
Good evening. I am very new to vex and robotc. we are having problems getting an autonomous program to run on our swervebot. we have put it in the usb only mode and downloaded the code that I included. When the start switch is pressed the leds go red and one motor runs forward briefly and then the cortex waits for us to hit the button again and never runs the actual program. every once in a while it will run correctly and we have noticed when it does work, the leds stay green. Being new, we have tried many things but nothing ever helps. thanks

sorry, I guess program didn't attach

here is what we have programmed:
The start switch is in dgtl12
and the motors in port 2 and 3.

task main()
{
while(SensorValue(startswitch) == 0)
{}
motor(motor1L) = 127;
motor(motor1R) = -127;
wait(5);
}


Mon Nov 09, 2015 8:00 pm
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post Re: Autonomous program not running correctly
So I tested out what you put here in a Virtual World without issue. Maybe upload the file or email it to me at gtabor@nrec.ri.cmu.edu.


Tue Nov 10, 2015 11:04 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: Autonomous program not running correctly
Quote:
When the start switch is pressed the leds go red


To clarify with this, do you mean that the Robot/Game/VEXNet lights on the Cortex turn red, or that a VEX LED plugged into a digital port turns on?

If it is the former, then there may be a short in one of your sensors; try swapping out the touch sensor for another one and check for any frayed wires that could be causing the issue. Note that the red wire is not connected to a VEX Touch sensor by default, but if the white or black wires are frayed you could be running into the shorting issue.

If it is an LED (plugged into a digital port) that is turning on, then the problem may be with the port designations being used by your program and what is actually plugged into the Cortex. In this case, I suggest checking each port individually and ensuring that each motor and sensor is plugged into the correct port, and that this port assignment matches the port configuration of the program's Motors and Sensors Setup.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Tue Nov 10, 2015 11:13 am
Profile
Rookie

Joined: Mon Nov 09, 2015 7:23 pm
Posts: 4
Post Re: Autonomous program not running correctly
it is the robot/game/vexnet leds. this problem is happening with multiple robots. we are running a total of 6 robots and this problem exist on 3 of them. when we look at what is different, there is not any difference. thanks!!


Tue Nov 10, 2015 11:25 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: Autonomous program not running correctly
Which version of ROBOTC is being used when you encounter these issues? You can find the version number under the 'Help -> About ROBOTC' menu option in ROBOTC; I don't recall any recent versions of ROBOTC/firmware having this particular issue, but an outdated build could cause undesired behaviors.

If the build is currently up to date (3.65 or 4.50, respectively), I suggest redownloading both the VEX Master firmware and the ROBOTC firmware; this can be done through the 'Robot -> Download Firmware -> Automatically Update VEX Cortex' option in ROBOTC.

Please let us know if the firmware reload resolved the issue and, if not, which version of ROBOTC is being used.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Tue Nov 10, 2015 5:53 pm
Profile
Rookie

Joined: Mon Nov 09, 2015 7:23 pm
Posts: 4
Post Re: Autonomous program not running correctly
we are using version 4.5 with a build date of 1 sept 2015.


Tue Nov 10, 2015 6:14 pm
Profile
Rookie

Joined: Mon Nov 09, 2015 7:23 pm
Posts: 4
Post Re: Autonomous program not running correctly
I did a firmware update, created a new file, typed the program and I still have the same issue. again we are using version 4.5. thanks!!


Tue Nov 10, 2015 6:44 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.