FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with the FIRST Default Robot Project - Watchdog error issues?

Hi everyone.

I've been having some issues with the default robot project. Basically, the only changes I've made to it were to replace the default arcade vi with the tank drive vi and initialize/attach a second joystick to the Begin and Teleop VIs, respectively. Whenever I ran the code, I got an error on the robot station that showed a watchdog expiration and that the RobotDrive loop was not running fast enough. Kevin was gracious enough to answer my call when I inquired about this at National Instruments.

Before I talk about what steps we took, here are some conditions that were already checked.

The electrical board seems to work. We had the ribbon cable issue and I fixed that. We were able to get the motors running by dropping the motor drive code in the Begin VI. Our PWMs gave signals to the jaguar when this happened and the motors spun. Therefore, we've been able to deploy code successfully and have the motors run, just not in the way the code should run for competition.

Anyway,

He had me check the joysticks to see if an output value was present in the teleop VI...and they did.

He had me drill down into the actual tank drive subVI and check the joystick values before the motor inputs. They were present.

We used the tank drive example.vi to see if the problem could be isolated there. Once again, the joysticks outputted values and updated correctly, but the motors did not move.

He had me check the voltages between the pins on both the digital and analog side of the sidecar. The digital pins outputted a value of 5 V when a VI was running (I think it was the Tank Drive Example, not sure) and 0 V when the VI was turned off. Analog pins outputted 0 (actually, values very close to 0 V) when checked with the simple digital output example.

After all this, I made the VI located at the bottom of the Basic Motor Control Tutorial.pdf except without the joystick. Instead, a fixed value of .5 was inputted into the Motors subVI. The error log listed below (truncated due to duplicate errors) is what was seen in the driver station.

If anyone has any idea or possible solutions, I and my team would greatly appreciate them.

ERROR <Code> -63195 occurred at Read/Write Control in FPGA_ReadAI.vi->FPGA_AIReadAveraged.vi->WPI_AnalogModuleGetAverageVoltage.vi->WPI_AnalogChannelGetAverageVoltage.vi->WPI_DriverStationStart Communication.vi->Untitled 1.vi

NI-RIO:  (Hex 0xFFFF0925) The handle for device communication is invalid or has been closed. Restart the application.

ERROR <Code> -63195 occurred at Read/Write Control in FPGA_WatchDogReadCount.vi->WPI_DriverStationStart Communication.vi->Untitled 1.vi

NI-RIO:  (Hex 0xFFFF0925) The handle for device communication is invalid or has been closed. Restart the application.

Watchdog Expiration: System 0, User 0

Watchdog Expiration: System 440, User 0

Thanks,

Virgille

Message was edited by: varquisola - Current Robot Project Attached

0 Kudos
Message 1 of 14
(11,657 Views)

Didn't think to check this on the phone,

If you put the motor control back in Begin does it still work?

The FPGA error can generally be fixed with this:http://digital.ni.com/public.nsf/allkb/CB82AC9CBC6C3F2386257241007A06EF but Im not confident thats the issue here.

I would also try reimaging the controller.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 2 of 14
(4,955 Views)

Other things to try

-Direct connect the computer with the driver station on it to the cRIO (avoid the bridge or at least wireless)

-Run the test program we tried and the robot project as a startup executable instead of in interactive mode - make sure you enable teleop as soon as possible

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 3 of 14
(4,955 Views)

varquisola wrote:

ERROR <Code> -63195 occurred at Read/Write Control in FPGA_ReadAI.vi->FPGA_AIReadAveraged.vi->WPI_AnalogModuleGetAverageVoltage.vi->W PI_AnalogChannelGetAverageVoltage.vi->WPI_DriverStationStart Communication.vi->Untitled 1.vi

NI-RIO:  (Hex 0xFFFF0925) The handle for device communication is invalid or has been closed. Restart the application.

ERROR <Code> -63195 occurred at Read/Write Control in FPGA_WatchDogReadCount.vi->WPI_DriverStationStart Communication.vi->Untitled 1.vi

NI-RIO:  (Hex 0xFFFF0925) The handle for device communication is invalid or has been closed. Restart the application.

Watchdog Expiration: System 0, User 0

Watchdog Expiration: System 440, User 0

What does your vi "Untitled 1.vi" do?

0 Kudos
Message 4 of 14
(4,955 Views)

Untitled 1.vi is the VI at the very bottom of FRC 2012 Basic Motor Control.pdf found here: https://decibel.ni.com/content/docs/DOC-14723.

Instead of a joystick, the constant value 0.5 is substituted into the set output input.

0 Kudos
Message 5 of 14
(4,955 Views)

Updates to what my team has tried to do to get this to work:

We tried inputting the drive code in the Begin.vi to see if we could get some response from the motors again, and that did not work.

We checked voltages between the signal and ground pins on the analog side of the digital side car, and there wasn't a change in voltage when the code was run.

We reimaged the controller.

We tried Kevin's link concerning the FPGA.

We tried to direct connect to the controller.

We tried switching out the digital sidecar.

So far, no resolution.

So, my other programmer is convinced that the code is good (if other teams could use the default setup, then there shouldn't be an issue here). Has anyone else had issues with a RobotDrive loop not running fast enough? We may just have to recheck our electrical board to see if that's the issue.

0 Kudos
Message 6 of 14
(4,955 Views)

The other team that was running into this issue turned out to be a noise issue from the DC-DC converter when running in wireless mode. Since you are running directly connected I think its less likely this is the issue. I will do some more research today and see if we can come up with some more debug ideas.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 7 of 14
(4,955 Views)

Can you describe (or better yet, post your project) how you integrated VI at the end of the Basic Motor Control PDF with your robot project? For example, Both the default project and the Basic Motor Control the driver station start Com VIs, and calling that VI twice would conflict and could cause the problems you're seeing. Another example is that the Basic Motor Control PDF has an infinite loop in it. If you put an infinite loop in teleop, you would get similar problems.

0 Kudos
Message 8 of 14
(4,955 Views)

Since it is the system watchdog that is incrementing it means its something in the framework that is missing timing.  If you lose 5 packets in a row it will trigger a watchdog error. I suspect this may be what is happening here. When we are running the code you can track the lost packets in the charts page of the driver station. Do you see any lost packets there?

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 9 of 14
(4,955 Views)

Hey Virgille,

Any updates on this?

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 10 of 14
(4,955 Views)