We’ve been having trouble with the Driver Station status indicating “No Code” intermittently. We’ve done a lot of trouble shooting and we are starting to get some idea what is going on, but we are looking for ideas about what would cause “No code” on the cRio.
We narrowed down a few things:
-
The “No Code” situation most often occurs when we switch between autonomous and tele-operated modes.
-
When switching, the dashboard error log displays seemingly inconsistent messages about PWM channels not being allocated or encoders not be set properly. Systems that would work in Teleop mode, would then stop working entirely after going through autonomous mode. (We are using Autonomous Independent (in the Advanced framework)).
-
We have added “Robot Data” as a global variable.
Our current thinking is that some parts of the system are accessing the Robot Data global information (references) before they are initialized. We have taken to putting many pieces of code in separate parallel VIs to encourage the system to use more independent threads.
However, we can’t see where this would happen, all of the VIs are connected to “Begin” where all of the data is initialized. After Begin, all of the threads branch and run independently, including driving, various on-robot controls, and camera vision and tracking.
Could we be corrupting the references somehow? I expect the references to be mostly “read-only” during operational mode. Is there something about global data that we are missing?
Thank you for any ideas as we head off into competition tomorrow.
…Duane