View Single Post
  #4   Spotlight this post!  
Unread 17-12-2012, 15:08
zsnow's Avatar
zsnow zsnow is offline
Head of Satire
AKA: Zachary Snow
FRC #2122 (Team Tators)
Team Role: Programmer
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Boise, Idaho
Posts: 17
zsnow has a spectacular aura aboutzsnow has a spectacular aura about
Re: cRIO Silent Crash Immediately on Enable

I'd like to prefix this by noting that I am currently not next to the robot, and I am operating on memory for the moment. I'd also like to thank the both of you for your assistance.

When I saw the "No Robot Code" message, I do not recall the Robot Communication light in the Driver Station going red.

We have tried both wired and wireless connections, both producing the same results.

There isn't an air compressor on the robot, nor any other power-intensive component, unless the Victors, Jaguars, and cRIOs could be considered as such.

I'm not sure as to what the battery voltage showed. Looking at the Driver Station Log Viewer, I see the voltage consistently at 12 V. On top of that, we tried replacing the battery with one we knew was fully charged, but it made no difference.

I am unsure as to what the D-Link's power source is. However, I have a gut feeling that this is not the cause for the behavior.

At this time, I have no output from NetConsole, but will work on that next time I attempt to run the code.

This line of code is what I think might be contributing to the behavior:
Code:
if (m_controller == NULL)
	m_controller = new SendablePIDController(P, I, D, this, this);
This is a line from a class which controls a motor. This line is run on DisabledInit(), however, m_controller->Enable(); is not called until TeleopInit(). The object which contains and initializes the PIDController follows the interfaces for PIDSource and PIDOutput. Thus, I could say that instance of that class contains a PIDController, which contains two references to instances of that class, each of which contains a PIDController... so on and so forth. I know that this is bad practice, but i think that when this situation is combined with the fact that the PID control loop runs on a separate thread, you get a recipe for disaster.

I may be able to ask my mentors to run some tests or try out code changes you may suggest in order to diagnose the issue.