I sent the following to RobotC tech support. I am reposting it here in hopes that someone out there has found a solution…
We are experiencing an issue in which robotc thinks our external battery is not connected after our teleop.c program runs for a variable amount of time. If we run our program in debug mode, and bring up the “System Parameters” debug window, at first the “externalBattery” variable will show some value like 12.8V or 13.0V. But after some time, not always the same amount of time, the value of externalBattery will show “Not Avail”. At this point, while the rest of the debugger windows make it look like all is well, no commands from the joysticks have any effect on the robots motors. The only way to remedy this state is to power cycle the robot.
We have tried everything we can think of. We have searched the web and found a couple references to other teams having the same issue.
Could this be due to our NXT unit running an old firmware version? Our NXT unit says it is running v955, but we think maybe this is an old version??
Could this be a bug in RobotC? We are running v3.5.4
We made sure we were using fully charged external battery.
We made sure the NXT has fully charged.
We made sure all power wires going to the motor controllers are well seated and not shorting out.
Please Help if you can, our Regional FTC competition is this Saturday (2/23/13)
Hello. I have experienced a similar (nearly identical) issue, and it was a Robot C version issue in my case. I would definitely recommend downgrading to version 3.08. It can be found here; http://www.robotc.net/download/nxt/
Make sure to uninstall your current version of Robot C as well. This worked for me, although if that isn’t the case for your robot, I would check all your wiring, especially the NXT Data Cables to ensure that the NXT brick of getting a battery signal from the Tetrix components of the robot. Hope this helps!
Just a quick follow-up for future teams that may have this problem…
It turned out to be a bad MC (motor controller). We figured this out by switching the around the connection order between the MCs and the NXT.
Our original config had 3 MCs and 1 SC daisy-chained together and connected to NXT port S1. Remember that the NXT only polls the first MC on port S1 to determine the state of the external battery. So, if that MC reports “No External Battery”, back to RobotC, nothing will work, and no commands will get to your motors, even though the red MC light is on (visually telling you that there is actually power getting to that MC. This is the really frustrating part!)
While trying to diagnose the issue, we disconnected the first MC in the chain and then connected it to NXT port S2 by itself. We then hooked the remaining chain of 2 MCs and 1 SC back up to NXT port S1 and ran our Teleop program again in the RobotC debugger. Using the “External Controllers” debug window, we were able to watch as the voltage of the MC on S2 went from 12.8V to “Not Avail” while the chain of controllers on S1 continued to work and report appropriate voltage. Again, the red led on that MC was on all the time, even when it was reporting that it had no power.
Bottom line… When you have an issue in a complex system that seems to make no sense, breaking the problem down into the most atomic pieces you can, and scrutinizing each piece individually can help identify the issue.