Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Autonomous not working (http://www.chiefdelphi.com/forums/showthread.php?t=83897)

Brandon_L 05-03-2010 20:28

Autonomous not working
 
Our auto mode is programed in but it wont start. Its based on time, like from the object that gives match time. I dont know if that would cause it? But parts of it that have nothing to do with match time dont work either. Is there anything special I have to pit in the auto int case?

byteit101 05-03-2010 20:42

Re: Autonomous not working
 
Could you post your code? People can only help and find errors if we can see it.
Quote:

like from the object that gives match time
what object?

Brandon_L 05-03-2010 20:43

Re: Autonomous not working
 
Match info. The codes in the classmate locked in our tookbox at the moment.

Vikesrock 05-03-2010 21:26

Re: Autonomous not working
 
Sounds like you're using Labview, is this correct?

I'm not sure if they changed this from last year or not, but that "Autonomous Elapsed Seconds" part of the cluster in the default Auto Iterative code was in milliseconds last year not seconds. Had to find that out by probing it while trying to fix a similar issue last year.

Brandon_L 05-03-2010 21:44

Re: Autonomous not working
 
Still, we have a motor that should run at a set speed that has nothing to do with the time at all. Its just when auto starts, motor should turns and not stop.

Vikesrock 05-03-2010 21:51

Re: Autonomous not working
 
I would double check that you have set the proper Autonomous to execute in Begin.VI. The default is Autonomous Independent if I recall correctly.

Also, make sure that you are feeding the watchdog appropriately in Autonomous mode.

The best way to debug what's going on is going to be by running your Autonomous on the practice field. Look for errors on the driver station Diagnostics tab. If you don't see any and Autonomous is still not do anything, run your code from a computer instead of deploying it, this will allow you to use probes to see what is happening in your code.

Brandon_L 05-03-2010 21:56

Re: Autonomous not working
 
Ill stick it on blocks in the pit.

Now wait a sec, were supposed to tell auto to execute in begin.vi? THATS news to me.

How does one do this?

Vikesrock 05-03-2010 22:13

Re: Autonomous not working
 
1 Attachment(s)
Quote:

Originally Posted by Brandon_L (Post 931910)
Ill stick it on blocks in the pit.

Now wait a sec, were supposed to tell auto to execute in begin.vi? THATS news to me.

How does one do this?

At the top of Begin.VI is a selector for whether you are using Autonomous Independent or Autonomous Iterative. You need to set this enum to match the mode you put your code in.

I have circled the setting you need to change to use Autonomous Iterative in red in the attached picture. You DO NOT need to modify the two things I have crossed out in blue

Brandon_L 05-03-2010 22:15

Re: Autonomous not working
 
Thanks a ton. If I cant get it working I'll ask someone there.

Brandon_L 06-03-2010 21:02

Re: Autonomous not working
 
Thanks, thats exactly what was wrong. Changed it and ran it and the robot almost ran away

Vikesrock 07-03-2010 00:49

Re: Autonomous not working
 
Fantastic! Glad I could help, and glad you got your issues ironed out.

palmyhomebots 18-03-2010 20:29

Re: Autonomous not working
 
we the palmy home bots have a better solution just do this:
//When channel 5 down the below code runs
//When channel 5 down the below code runs
if(vexRT(Ch5) > -100)
{
motor[LTrack] = motor[RTrack] = 0;
motor[LMotors] = 127;
motor[RMotors] = 127;
wait10Msec(400);
motor[LMotors] = 0;
motor[RMotors] = 0;
motor[LTrack] = motor[RTrack] = 127;
wait10Msec(1600);
motor[LTrack] = motor[RTrack] = 0;
}

but you may have a different robot

Jimmy Cao 18-03-2010 23:30

Re: Autonomous not working
 
Quote:

Originally Posted by palmyhomebots (Post 939394)
we the palmy home bots have a better solution just do this:
//When channel 5 down the below code runs
//When channel 5 down the below code runs
if(vexRT(Ch5) > -100)
{
motor[LTrack] = motor[RTrack] = 0;
motor[LMotors] = 127;
motor[RMotors] = 127;
wait10Msec(400);
motor[LMotors] = 0;
motor[RMotors] = 0;
motor[LTrack] = motor[RTrack] = 127;
wait10Msec(1600);
motor[LTrack] = motor[RTrack] = 0;
}

but you may have a different robot

The OP was programming in LV for the cRIO, your code is C for the VEX controller =P

They both work, but porting this code over is more difficult than just re-writing it. (Just a side note, motor power is -1 to 1 now, not 0 to 255 anymore).


All times are GMT -5. The time now is 03:37.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi