Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Autonomous does not run during first enable (http://www.chiefdelphi.com/forums/showthread.php?t=93485)

Bmcdonnell 11-03-2011 21:31

Autonomous does not run during first enable
 
When we run our code from start up, our autonomous mode won't run until after we enable in autonomous mode, then disable and renable. However, when we just run deployed code, it will work the first time. This is fine for testing, but when we put the robot on the field, it just sits there because it is the first time to autonomous is enabled. Teleop mode will work the first time deployed or ran at start up.

We do get this error on the driver station:

−44036 An invalid set operation occurred, and the PWM channel was not allocated.
We have not been able to find the source of this error yet.
Has anyone had a problem with this and found a solution?

We could really use an autonomous mode for tomorrow.

Thanks,
Brandon

WizenedEE 11-03-2011 23:34

Re: Autonomous does not run during first enable
 
I remember having the error, I don't remember how to solve it. Is your main loop running too slow? The elapsed times vi included in the framework is very useful for that (we have it outputting to the dashboard).

Have you tried running the code (not at startup) and looking at what value the robot mode outputs? Is autonomous independent.vi running at all? Are correct outputs being put to the motors?

If all of those check out, try putting diagram disable structures around some motors, and see when you stop getting the error.

Good luck!

Alan Anderson 12-03-2011 14:00

Re: Autonomous does not run during first enable
 
Make sure you are opening all your motors in Begin.

Greg McKaskle 13-03-2011 08:41

Re: Autonomous does not run during first enable
 
If you don't find it, post code.

Greg McKaskle

Bmcdonnell 13-03-2011 10:23

Re: Autonomous does not run during first enable
 
We never found the problem, but we did just redo our autonomous code and got it working.

Thanks for the advice.

404'd 25-04-2011 23:15

Re: Autonomous does not run during first enable
 
This happened to us every time starting at our first regional. We never figured out what the problem was, but we did fix it. The NI guy at the competition came over and used the NI Measurement & Automation explorer to completely reformat the cRIO. Once we re-imaged and re-deployed it worked perfectly

j.cole 26-04-2011 18:03

Re: Autonomous does not run during first enable
 
ours does something similar to this. The problem is that the autonomous runs too many things at once which slows it down the first time. AKA do you have multiple while loops acting independently? Thats what our problem is we have a PID loop and a drive loop. The PID loop delays the drive loop a couple seconds then it runs. So everything works but it just takes a couple seconds extra.

NOW FOR YOUR ANSWER IF IT DOESNT WORK SORRY

Preface- If you have a working one DONT TOUCH THE OLD ONE TILL OFFSEASON
1 Run your robot in Autonomous mode (if your not already). And after about a minute or 2 it should execute something (if nothing happens go no further)
2 If something happens remove/combine some of your while loops.
3 Profit

Greg McKaskle 26-04-2011 20:26

Re: Autonomous does not run during first enable
 
If your autonomous loops are taxing the CPU too much, it is likely because one or more of them is running full speed, with no sleep function in it. This is very easy to spot and very easy to fix. Come by the NI booth or ask the CSE folks if you need assistance.

Greg McKaskle


All times are GMT -5. The time now is 09:35.

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