PDA

View Full Version : C++ Sample Code not working...


hm29168
01-24-2010, 04:00 PM
Our team is trying to run the sample code from FIRST Forge and Cross the Road Electronics on our kitbot. All of the Jaguars work correctly, we have updated them to the correct firmware, and the programs used are just the default code from those websites. However, our 2CAN is stubbornly blinking red and green, possibly showing there might be some issue with the connection from the 2CAN to the cRIO. Anyone have any recommendations or advice on how to fix the problem? Thanks.

Mike Copioli
01-24-2010, 08:35 PM
Our team is trying to run the sample code from FIRST Forge and Cross the Road Electronics on our kitbot. All of the Jaguars work correctly, we have updated them to the correct firmware, and the programs used are just the default code from those websites. However, our 2CAN is stubbornly blinking red and green, possibly showing there might be some issue with the connection from the 2CAN to the cRIO. Anyone have any recommendations or advice on how to fix the problem? Thanks.

Have you updated the firmware on the 2CAN? The color sequence you mentioned is from an earlier version of the firmware. The latest version is 1.5 and can be downloaded from our site: www.crosstheroadelectronics.com or the AndyMark website. You will also need to download the firmware utility.

hm29168
01-25-2010, 05:10 PM
Just updated the firmware for CAN (version 1.5) on to the 2CAN, but we're still having problems. Now, the CAN is blinking red, despite of whether we load the FIRST Forge code or Cross the Road Electronics code. Any advice? Everything seems to be working: we can read the Jaguars from the web interface, the code builds and delivers properly, even put a new battery in for good measure.

Gazoogleheimer
01-25-2010, 09:13 PM
Essentially:

Even though we've upgraded to 1.5, the disabled/no communication message has simply changed from flashing red/green to blinking red. We have installed the plugin and altered the *.ini file. We have successfully upgraded all the Jaguar firmwares and can connect to them with the 2CAN to receive telemetry data successfully.

The 2CAN is at 192.168.0.42 (does the gateway have to be something special?) and is connected between the cRIO and the camera. We can successfully retrieve live image data from the camera in this configuration.

Which sample code should we be using--FirstForge or yours?

Is there any way to confirm communication between the cRIO and the 2CAN, or even if the plugin is successfully starting? It seems like a mysterious problem, and we must have something misconfigured. Is there no field to input the 2CAN IP? (does it use broadcast / ARP sniffing in the CAN plugin on the cRIO?) I'm tempted to try and hook up a packet sniffer just to be able to see what is going on (or not going on, as the case may be.)

We have had a deadline imposed on us of Thursday, and I was really looking forward to using CAN this year--so any guidance would be greatly appreciated, especially because we are planning on using 8 (tan) jaguars for our robot.

hm29168
01-26-2010, 03:40 PM
Finally decided to open up the target console when testing the program, after changing cRIOs, and realized that we were having the same error message as this thread (http://www.chiefdelphi.com/forums/showthread.php?t=80821) (-52010). Is it probably the same plugin problem?

Gazoogleheimer
01-27-2010, 07:59 PM
Problem resolved, thanks to the new *.out plugin!

Green-flashing 2CAN's are happy 2CAN's!