I’ve been bored, so I’m working on the autonomous program that our robot never had last year, but it’s not working, and I have no idea what the problem is. I’ve attached what I think are the important VIs to this, if you want to see others I’ll be happy to put them up.
Autonomous Independent.vi (27.4 KB)
Begin.vi (40 KB)
Robot Main.vi (23.5 KB)
Autonomous Independent.vi (27.4 KB)
Begin.vi (40 KB)
Robot Main.vi (23.5 KB)
So what do you want it to do, and what is it doing instead?
You didn’t include your Kicker timed.vi, but it looks like you want to drive full speed for 4.25 minutes, kicking once every 1.4 minutes or so., then reverse engines in a curve for 1.25 minutes. Kicking must involve a solenoid sequence, but that’s all I can tell.
You don’t want a while loop that ends right away though…
You probably don’t want a while loop at all…
You can right-click on the While loop to select “Remove While Loop” and it would work (or not) just the same.
Everything is chained together okay to create your drive/kick sequence.
I’m not having any trouble with the kick vi, it’s the same one we use in teleop. My goal was to have it drive forward for 75 milliseconds, kick, and repeat 2 more times, then go backwards and to one side. I didn’t realize the values were in seconds. I figure there will be some fine tuning with the values, but right now it says watchdog not fed in the bottom left of the driver’s station. Do you think adjusting the times for seconds should help?
Depends on how Kicker handles the Watchdog too.
If the Watchdog isn’t fed inside Kicker (and Kicker takes more than half a second) then you’d see that error, but it seems like you should get 75 seconds of drive time before it threw the Watchdog error if Kicker was a problem.
Are you just turning on Autonomous at the Driver Station and staying in it the whole time?
The Watchdog error happens immediately after Enabling?
The Feed and the first Delay & Feed you don’t need, but they shouldn’t hurt either.
P.S.
You’d probably see “Watchdog Not Fed” flash on the screen for a second when you started Autonomous, but then it should immediately change to “Autonomous Enabled”
P.P.S.
FYI, a Watchdog error does not stop your code from continuing to run. It only cuts off any output commands it gives. So if Kicker isn’t blocked by waiting for an event that may never happen, then it’ll eventually return to your Autonomous Independent.vi, the Watchdog will get fed again, your outputs will get re-enabled, and your robot will suddenly take off again…
I could provide all sorts of style suggestions.
However, none of those actually solve your issue.
I would reccommend checking the error window on the Driver Station to see if it’s user or system watchdog issues (it will give a count for both).
Like Mark suggested, make sure you’re in Autonomous mode, not Practice mode.
Also, could you confirm that you have this issue only in Autonomous, and not in Teleop?