![]() |
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 |
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! |
Re: Autonomous does not run during first enable
Make sure you are opening all your motors in Begin.
|
Re: Autonomous does not run during first enable
If you don't find it, post code.
Greg McKaskle |
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. |
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
|
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 |
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