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

Running program issues
http://www.robotc.net/forums/viewtopic.php?f=11&t=13555
Page 1 of 1

Author:  ken.hubbard [ Fri Mar 04, 2016 3:18 pm ]
Post subject:  Running program issues

My students are programming cars to follow a path. They are not using a loop (while statement) but the car's program loops. When we re-download the program and use "clear all" first the program says it downloads, but it will run an older program and acts like it is on a loop and repeats it. When we turn the cpu off then back on a couple of times (not consistent) it will run the newest program. When we turn the cpu off again and then on again it will go back and run the old program even though we did noit down load anything different.

We have re-downloades the firmware and for the master cpu and the Robotic firmware and this does not solve the issue.
We have this issue on all five of the robots that we are using. It must be a problem we are creating, how do we solve it?

Author:  CARBOT [ Sun Mar 06, 2016 8:30 pm ]
Post subject:  Re: Running program issues

Please post your code.

Author:  ken.hubbard [ Mon Mar 07, 2016 3:25 pm ]
Post subject:  Re: Running program issues

#pragma config(Motor, port2, FrontLeft, tmotorVex269_MC29, openLoop, reversed)
#pragma config(Motor, port3, FrontRight, tmotorVex269_MC29, openLoop)
#pragma config(Motor, port4, BackLeft, tmotorVex269_MC29, openLoop, reversed)
#pragma config(Motor, port5, BackRight, tmotorVex269_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

task main()
{

stopMotor(FrontLeft);
stopMotor(FrontRight);
stopMotor(BackLeft);
stopMotor(BackRight);
// Move forward 3 seconds at full speed

startMotor(FrontLeft,127);
startMotor(FrontRight,127);
startMotor(BackLeft,127);
startMotor(BackRight,127);
wait(5);
stopMotor(FrontLeft);
stopMotor(FrontRight);
stopMotor(BackLeft);
stopMotor(BackRight);
// turn to the left 90 degrees

startMotor(FrontLeft,-63.5);
startMotor(FrontRight,127);
startMotor(BackLeft,-63.5);
startMotor(BackRight,127);
wait(2);
stopMotor(FrontLeft);
stopMotor(FrontRight);
stopMotor(BackLeft);
stopMotor(BackRight);

// Move forward 3 seconds at full speed

startMotor(FrontLeft,127);
startMotor(FrontRight,127);
startMotor(BackLeft,127);
startMotor(BackRight,127);
wait(5);
stopMotor(FrontLeft);
stopMotor(FrontRight);
stopMotor(BackLeft);
stopMotor(BackRight);
// Spin to the right 90 degrees

startMotor(FrontLeft,127);
startMotor(FrontRight,-127);
startMotor(BackLeft,127);
startMotor(BackRight,-127);
wait(2);
stopMotor(FrontLeft);
stopMotor(FrontRight);
stopMotor(BackLeft);
stopMotor(BackRight);

// Move foward 3 seconds at full speed

startMotor(FrontLeft,127);
startMotor(FrontRight,127);
startMotor(BackLeft,127);
startMotor(BackRight,127);
wait(3);
stopMotor(FrontLeft);
stopMotor(FrontRight);
stopMotor(BackLeft);
stopMotor(BackRight);

}

Author:  ken.hubbard [ Mon Mar 07, 2016 3:32 pm ]
Post subject:  Re: Running program issues

We are running RobotC firmware VEX_Cortex 1050.hex
and the Master CPU Firmware Cortex_V4_25.bin

Author:  CARBOT [ Tue Mar 08, 2016 10:20 pm ]
Post subject:  Re: Running program issues

Try selecting ROBOT/ADVANCED TOOLS/FILE MANAGEMENT and you will see what is loaded on the Cortex.
I am running 4.52 and startMotor(FrontLeft,127); does not compile but setMotor(FrontLeft,100); does.

Author:  ken.hubbard [ Wed Mar 09, 2016 3:22 pm ]
Post subject:  Re: Running program issues

Thanks. This seemed to help. Now we are noticing that the CPU will flash the top Robot light the middle VexNet light and the bottom Game light will flash red twice and then the program seems to restart from the beginning. What do these flashing lights mean? Is there a site that lists all CPU error codes?

Author:  CARBOT [ Thu Mar 10, 2016 11:29 pm ]
Post subject:  Re: Running program issues

I use the VEX Cortex in an autonomous mode without a joystick and NOT connected to a PC.
The LEDS are:
ROBOT flash green fast
VEXNET OFF
GAME flash green fast

There are some diagnostics here: http://content.vexrobotics.com/docs/VEX ... 081811.pdf

Are you using it with the Joystick or do you run it with the program cable attached to a PC?

Author:  ken.hubbard [ Fri Mar 11, 2016 11:49 am ]
Post subject:  Re: Running program issues

No joystick.
Overall the robots are working better.

Author:  ken.hubbard [ Fri Mar 11, 2016 3:44 pm ]
Post subject:  Re: Running program issues

Newest problem is that 2 of the CPUs will only accept using 3 motor ports. We are using 4 motor. I have changed which motor port is being used. Yes I applied after changes. I have checked that each motor works by switching the wires into different ports. All motors work. All wiring is good. Just the first three motors work. The fourth motor, no matter which port it is plugged into, will not work.

Is there some location that says that you can only use a certain number of ports? I have not had this issue before. Any ideas?

Author:  CARBOT [ Sun Mar 13, 2016 5:40 pm ]
Post subject:  Re: Running program issues

Make sure your Motor Controllers are OK in addition to checking the motors.
There are two fuses on the motor ports, one for 1-5 and one for 6-10. Try putting one pair of motors on each fuse.
Try running 4 spare motors not connected to the robot in case there is binding.
Make sure you have the VEX Cortex selected. The Lego NXT only has 3 motor ports.

Author:  ken.hubbard [ Tue Apr 19, 2016 1:38 pm ]
Post subject:  Re: Running program issues

How do I test if my motor controller is working?
How do I test if I have blown fuses in the CPU?

Programs work if it is still connected via the cable to the computer. When the robot is not connected I get 3 lights and then no pattern of 2 reds, one red, something, something.

Author:  ken.hubbard [ Tue Apr 19, 2016 2:13 pm ]
Post subject:  Re: Running program issues

When my students were testing things, they found out that there were no flashing red lights if we ran only 3 of the 4 motors. Hope this helps.

Author:  CARBOT [ Thu Apr 28, 2016 9:40 pm ]
Post subject:  Re: Running program issues

You may have multiple pieces of bad hardware. I recommend you try a simple program to test each motor, controller, and cable.

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